This document defines the standard Haskell libraries. Although part of the Haskell language, unlike Prelude modules these modules must be explicitly imported if their definitions are to be used in a user module.
The current version of this document is very preliminary. Code from the Prelude of the former Haskell 1.2 report, basic I/O functionality, and a few small utility modules are are currently included. Many other libraries are under development and we expect to publish them shortly. Most Haskell implementations contain extensive unofficial libraries; while not yet part of the language standard, these are a valuable resource for Haskell programmers.
When possible, library functions are described solely by executable Haskell code. Functions which are implementation dependant primitives or which are verbose without being informative are presented using type signatures without definitions. Some data types are also implementation dependent: when a data statement without a right-hand side is used, this indicates an implementation dependant type for which no constructors are exported.
The code found here is a specification, rather than an implementation. Many of these functions can be implemented in a more efficient manner. Implementations, however, must preserve all properties of these specifications, including strictness properties.
Classes defined in libraries may be derivable. This report describes the derivation of such classes when appropriate. The Prelude does not mention library classes in deriving clauses. 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 Haskell Committee | May 1996 |