The Haskell 98 Library Report
top | back | next | contents

Preface

This document defines the standard libraries for Haskell 98.

The libraries presented here represent a selection of basic functionality that is expected to be useful to many Haskell programmers. Most implementations provide further libraries which are not a recognized part of the Haskell standard.

The latest version of this report, as well many other available libraries, can be found on the web at http://haskell.org.

The August 2001 Revision

Both Haskell 98 Reports were revised in August 2001, to incorporate dozens of typographical errors and presentational improvements. A complete list of all changes can be found at http://haskell.org.

Acknowledgements

We would like to express our thanks to those who have contributed directly or indirectly to this report without being named as authors, including Olaf Chitil, Mark Carroll, Tony Davie, Hal Daume, Sigbjorn Finne, Andy Gill, Mike Gunter, Fergus Henderson, Orjan Johansen, Kent Karlsson, Sandra Loosemore, Graeme Moss, Sven Panne, Keith Wansbrough.

In addition, many people named in the Acknowledgements to the Haskell 98 Language Report also contributed to the Library Report.

1  Introduction

This document defines the standard libraries for Haskell 98. Like the Prelude, these libraries are a required part of a Haskell implementation. Unlike the Prelude, however, these modules must be explicitly imported into scope.

When possible, library functions are described solely by executable Haskell code. Functions which require implementation-dependent primitives are represented by type signatures without definitions. Some data types are implementation-dependent: these are indicated by comments in the source.

The code found here is a specification, rather than an implementation. Implementations may choose more efficient versions of these functions. However, all properties of these specifications must be preserved, including strictness properties.

Classes defined in libraries may be derivable. This report includes the derivation of such classes when appropriate. When Prelude types are instances of derivable library classes a commented empty instance declaration is used. The comment, "as derived", indicates that the instance is the same as would have been generated by a deriving in the Prelude type declaration.

The following table summarises the fixities of all the operators introduced by the standard libraries:

Prec- Left associative Non-associative Right associative
edence operators operators operators
9 Array.!, Array.//
7 Ratio.%
6 Complex.:+
5 List.\\

Precedences and fixities of library operators


The Haskell 98 Library Report
top | back | next | contents
Sept 2002