[Haskell-cafe] What Functions are Standard?

Glynn Clements glynn.clements at virgin.net
Wed Oct 6 00:52:06 EDT 2004

John Goerzen wrote:

> Hello,
> I have been writing code using the docs over at
> http://www.haskell.org/ghc/docs/latest/html/libraries/index.html, which
> is the only comprehensive library reference I could find.
> I am using some code from System.IO, supposedly from base.  When I try
> to build this with nhc98, it doesn't know about hGetBuf, hPutBuf, or
> openBinaryFile from there or about mallocForeignPtrArray from the
> Foreign.* area.  But all these look standard to me.

They aren't; they are GHC extensions, except for
mallocForeignPtrArray, which is specified by the FFI addendum:


> What am I missing here?  Does nhc98 really completely lack the ability
> to read binary data from a file?

I can't comment on nhc98, but the Haskell98 standard doesn't include
any mechanism for binary I/O.

> Or where should I be finding it, and
> how could I have known for myself that those particular ghc functions
> were unsupported elsewhere?

The Haskell98 report can be found at:


Anything which isn't listed there is essentially a vendor extension.

Glynn Clements <glynn.clements at virgin.net>

More information about the Haskell-Cafe mailing list