library reorganisation
Simon Marlow
simonmarhaskell at gmail.com
Fri Mar 3 06:46:30 EST 2006
Einar Karttunen wrote:
> I think it would be nice to have implementation dependent code (GHC.*)
> and implementation independent code in separate packages. Currently
> there is no way to know whether a Cabal package depending on base
> wants Data.List or GHC.Something.
Right, base shouldn't expose anything from GHC.*, and we should have a
separate package that does provide these interfaces.
However, I don't think this is at all easy to arrange. The lowest
package would then be 'ghc', with 'base' on top (it can't be the other
way around, because 'base' is implemented using 'ghc'). Furthermore,
'ghc' would contain a lot of implementation independent parts, simply
because a lot of GHC.* modules use things like Data.List. And there are
recursive dependencies between GHC.* and other implementation-indepenent
modules. This doesn't look terribly practical, I'm afraid.
I just had an interesting idea though: if a package could re-expose
modules from a dependent package, then we could provide a new view of
the base package with the GHC.* modules hidden. This is tantalising,
because it seems easy to implement... I must think about this some more.
Cheers,
Simon
More information about the Libraries
mailing list