Packages within a package

Duncan Coutts duncan.coutts at worc.ox.ac.uk
Wed Oct 24 04:51:45 EDT 2007


On Tue, 2007-10-23 at 22:21 +0200, Henning Thielemann wrote:

> > Does Cabal not support things like packages within a package simply
> > because Haskell libraries currently are not complex enough to require
> > such a feature, or is there a guiding design principle with which
> > these features are incompatible?
> 
> It was requested several times but it seems not to be designed and
> implemented so easily.

The design choice is that the Cabal package is the unit of distribution.
Of course what one sees as a system may well consist of multiple
interdependent packages.

The direction I think we're moving in is to try to improve our tools to
make it easier for developers to work with systems that consist of
multiple packages. However from the distribution and installation point
of view, nothing needs to change, the package remains the unit of
distribution.

As far as I can see that covers all the cases where we might want
"distributions", "shipments" or "sub-packages". Of course if anyone has
any examples where they think our model might not cover things we should
bring them up and consider them.

The example I often think about is Gtk2Hs which now consists of 12
libraries, uses two different code generators, two FFI binding tools,
lots of cpp and autoconf and has unified documentation, tutorials and
demo code. Many of the features we have been adding to Cabal recently
have been getting us closer to the stage where we can build and
distribute Gtk2Hs using Cabal.

Duncan



More information about the cabal-devel mailing list