[Haskell] base libraries

Simon Marlow simonmarhaskell at gmail.com
Fri Nov 24 05:55:33 EST 2006

Bulat Ziganshin wrote:

> ByteString is most offending example, but not alone. what is the base
> library now? is it about data structures, I/O, concurrency or monads?
> there is no answer - this lib contains everything developed by peoples
> having accounts at darcs.haskell.org.

ByteString went into base because we felt that it was likely to be used in other 
libraries in the base package in the future, and since packages cannot be 
mutually recursive it would therefore have to be in base.  This was the *only* 

> why it's impossible to use
> Applicative class with ghc 6.4? because Ross Paterson was so kind to
> include this in a base lib. why peoples get a problems with their
> mutable arrays in 6.6? because arrays interface was changed and there
> is no way to use old lib in 6.6. why ForeignPtrs in 6.4 are slow?
> because it's a part of base lib and it's impossible to use faster
> ForeignPtr implementation without upgrading entire compiler. and so
> on, so on

In 6.6 you can, in theory, upgrade the base package.  We've never tried it, but 
at least we did design the package system in GHC such that it should be 
possible, as long as the replacement base package is sufficiently compatible 
with the old one, and agrees with GHC on the representation of certain wired-in 
types and classes and the names and location of certain functions.

However, it's highly unlikely that you'll ever be able to separate ForeignPtr 
from the base library, because of the dependencies: ForeignPtr is part of the 
FFI, the FFI is used by other libraries, etc. etc.  The dependencies in base are 
very intertwined, as you well know.


More information about the Libraries mailing list