[Haskell] base libraries

Malcolm Wallace Malcolm.Wallace at cs.york.ac.uk
Mon Nov 27 09:42:18 EST 2006


Simon Marlow <simonmarhaskell at gmail.com> wrote:

> > Answer: Hugs has a separate package 'hugs-base' with essential but
> > implementation-dependent things like ForeignPtr in it.  (Likewise
> > nhc98/yhc.)  The 'base' package just imports and uses it.
> 
> As I understand it, Hugs and nhc98 do this by having their own copies
> of a lot  of the library code (up to and including the Prelude?).

Yes.  Essentially, we took the view that the Haskell'98 libraries (+
primitives + FFI) can be assumed, and then built the 'base' package on
top of that.  Whereas GHC took the opposite approach, making 'base' the
bottom of the hierarchy and building 'haskell98' on top of that.  Hence
why lots of GHC-only primitives ended up in 'base', which is not good
for a so-called portable package.

But I do think that eventually every implementation ought to assume some
minimal underlying private libraries, and build 'base' upwards
(portably) from there.

Regards,
    Malcolm


More information about the Libraries mailing list