cabal design

Duncan Coutts duncan.coutts at
Tue Aug 23 06:03:16 EDT 2005

On Mon, 2005-08-22 at 23:08 -0700, Frederik Eaton wrote:
> On Mon, Aug 22, 2005 at 08:27:57PM -0700, Isaac Jones wrote:
> > Frederik Eaton <frederik at> writes:
> > 
> > (snip)
> > > So, the whole point of wigwam, and a feature of toast, is to allow
> > > things to be installed in multiple different "roots" ("playpens" in
> > > wigwam). The idea is that you may want to install, say, a web server
> > > and a bunch of its dependencies in one root, so that it can be tested
> > > and deployed in a completely encapsulated and reliable manner. You may
> > > want to test it independently of different versions of the same things
> > > in other roots, or you may want to deploy it side-by-side with an
> > > older version on a front-end server so that it is possible to
> > > seamlessly switch between old and new versions. If all roots share a
> > > package database, then you end up having to give the things which are
> > > installed in those roots separate version numbers in order to keep the
> > > package registrations from overwriting each other.

So it sounds rather like a "fully relocatable package".

Perhaps you would be satisfied with the same interface that the Gentoo
packaging people are asking for. Instead of getting cabal to register
into an arbitrary package conf file we hope to have cabal give us the
package file(s) which we can then register ourselves using ghc-pkg.

So yes, this would be sort of a back-door. But it would allow you to
hack up whatever you need to do for package registration.

On the other hand, we would have to accept that such a thing is a back
door and so the interface and capabilites might be less stable than the
public interface. It also means of course that you'd have to know all
about ghc-pkg/hugs-pkg/nhc-pkg etc, which is something that cabal is
trying to protect users from (which is why this 'feature' does not fit
the cabal abstraction).

So if we're nice to Isaac and can persuade him that giving us a limited
back door is better than implementing our obscure features generically
in cabal itself (not to mention easier for Isaac since he doesn't have
to implement them!) then we might get it. Though we may also have to
swear not to publicise the back door too much so that it doesn't get
abused as if it were an ordinary public interface. :-)


More information about the Libraries mailing list