[Haskell] base libraries

Chris Kuklewicz haskell at list.mightyreason.com
Thu Nov 23 05:20:51 EST 2006


This is a small reply to clarify the regular expression situation:

Bulat Ziganshin wrote:
> Hello libraries,
> 
> after analyzing the situation, i concluded that source of problem, at
> least partially, is GHC HQ's policy of packaging libraries with GHC.
> The list of such libraries is *closed* and odd at first look. why, for
> example, it includes 2 of 4 regexp libs? at last end, we can learn
> that this is the list of libs required to build ghc itself!

Some of the other regex-* libraries are interfaces to c-library backends (pcre
and tre) and it is not GHC's place to come with copies of those libraries.  But
GHC used regex internally, so it must come with at least a single backend.

> [...snip...]
> 
> and while we are here - splitting of Base library should be very easy
> task. its ghc version specific part is in GHC.* modules. these modules
> should be moved into the new Core library. plus a few modules from
> Data.* or System.* hierarchy they imports. plus a few modules imported
> by Hugs/NHC Prelude. the rest of Base library should be pretty portable, at
> least between various GHC versions.
> 
> and independent on this work, we can always look into moving pieces of
> Base into independent libs. as a rule of thumb, everything not used in
> Base lib may be moved outside of it. of course, these new libs should
> be included in base libs set

The regex-* modules that are installed with GHC are not in the "base" package.
They are in "regex-base" and "regex-posix" and "regex-compat" because I took
excellent design advice and finely split the modules.  I see no reason one could
not by able to upgrade these on top of the GHC versions.

> in particular, my hottest hope is that ghc 6.6.1 will be shipped with
> fps 0.8 as separate library that will provide both backward
> compatibility with 6.6 and will allow to upgrade fps without recompiling
> ghc itself :D

By separate library you really mean using a separate package name instead of
"base".  The Text.XHtml is already separate into the "xhtml" package.

You are correct: as far as I can see the only module that is in "base" which
might need to be split out is Data.ByteString.  The same may or may not apply to
Data.Sequence.

Cheers,
  Chris


More information about the Libraries mailing list