How to move code from GHC to libraries?

Simon Marlow marlowsd at
Mon Sep 14 04:07:28 EDT 2009

On 12/09/2009 00:02, Norman Ramsey wrote:
>   >  Incedentally, the reason I'd like us to make a decision on this now is
>   >  because I'm about to add two new boot libraries...
> While we're on this topic, I've had several requests to pull HOOPL
> (the new dataflow optimization code) out as a library so that we can
> make it into a Hackage package.   I'd like to do this, but the
> situation is complicated because HOOPL depends on UniqFM, which is
> GHC-specific.  I thought that there was a similar implementation out
> in the wild (based on Okasaki-Gill rather than Adams), but I can't
> find it on hackage.

Isn't Data.IntMap ~= UniqFM?

> Is there an established procedure for moving a part of GHC into a
> library without breaking everybody's build?  If so, where will I find
> it on the developers' wiki?  If not, who can advise me so I can create
> a page on the developers' wiki? :-)

The architecture of our library setup is here:

Basically you'd be adding a new zero-boot package (that terminology 
isn't used in the build system, where they're called "boot packages"). 
The best way to find out how to add another one is to grep for an 
existing zero-boot package (e.g. Cabal) in the top-level to see 
the various things you need to add.

The new package would need to have a repository created on, and you'd need to add it to $(TOP)/packages too. 
When the changes are pushed, everyone has to "./darcs-all get" to get 
the new repository.


More information about the Glasgow-haskell-users mailing list