nhc98 libraries


Standard Libraries

nhc98 supports all the standard libraries from the official Haskell '98 Library Report. Here is a summary of the status of each.

library namecomplete?notes
Array yes implementation based on vectors
CPUTime yes .
Char yes .
Complex yes .
Directory yes .
IO no missing: hReady, hWaitForInput, hLookAhead, hIsOpen, hIsClosed, hIsReadable, hIsWritable, hIsSeekable
Ix yes .
List yes additional fns: deleteFirsts, elemBy, elemIndexBy, lookupBy, notElemBy, permutations, subsequences, sums, products
Locale yes .
Maybe yes .
Monad yes additional fn: untilM
Numeric yes additional fn: showIntBase
Prelude yes .
Random yes identical to Hugs implementation
Ratio yes .
System yes .
Time yes .

Extension libraries

Many of the standard hierarchical libraries are provided in nhc98. To use these, you must add the compile-time option -package pkg, where pkg is the name of the package. See here for ghc's documentation of many of these.

Packages supplied with nhc98-1.20 are: base, Cabal, directory, filepath, fps, haskell-src, HaXml, html, HUnit, old-locale, old-time, parsec, polyparse, pretty, process, QuickCheck, random, xhtml

The following non-standard libraries are provided only in nhc98, not in any other compiler. They are available without any special compiler options.

library namedescription
NHC.BinArray imperative binary arrays
NHC.Binary binary I/O and binary representations of values
NHC.Bit bit-twiddling operations, e.g. and, or, xor
NHC.FFI foreign function interface
NHC.GreenCard just the standard %dis definitions and constructors you need in order to write your own GreenCard files
NHC.IOExtras contains IORefs, IOArrays, unsafePerformIO, etc.
NonStdTrace the common side-effecting trace function
NHC.PackedString a space-efficient representation of strings
NHC.Vector primitives underlying IO (mutable) arrays


The latest updates to these pages are available on the WWW from http://www.haskell.org/nhc98/

This page last updated: 17th December 2003
York Functional Programming Group