Limiting size of global package database

Mathieu Boespflug mboes at
Wed Dec 31 15:34:36 UTC 2014

Hi Herbert,

On 31 December 2014 at 15:25, Herbert Valerio Riedel <hvriedel at> wrote:
> Hello Michael,
> On 2014-12-31 at 15:10:37 +0100, Michael Snoyman wrote:
>> tl;dr: Now that ghc (the library) doesn't depend on Cabal (the library),
>> can we remove Cabal from the global package database installed with GHC?
> [...]
>> For both of these reasons, I think we should limit the number of packages
>> included in the global package database. One seemingly small step we could
>> do on that front is not include extraneous packages. In GHC 7.10rc1, that
>> includes Cabal and xhtml:
> btw, haskeline and terminfo should be considered as well, according to
> your argument.
>> both packages are in the global package database, but could just as
>> easily be removed from there and installed by users. The motivation
>> for that would be to avoid problem (1) above.
> However, as for xhtml, haskeline and terminfo, we had to register/expose
> them in the global pkg DB due to

Thanks for pointing to the root explanation. Though as noted in that
ticket by Joachim, there was another solution to this problem: simply
install DSO's in a location that wouldn't clash with where distros
typically install packages themselves. The other solution is to simply
statically link the GHC binaries that would otherwise require these
DSO's. Is the reason why those solutions were not chosen in the end
documented anywhere? As Michael points out, every additional package
forcefully installed into the global db by GHC is yet another
potential source of problems for users when installing libraries.
Including when doing so in a sandbox! (because global packages leak
inside sandboxes).



More information about the ghc-devs mailing list