Why is there a cabal file at all?

Henning Thielemann lemming at henning-thielemann.de
Wed Jan 10 11:11:02 EST 2007


On Wed, 10 Jan 2007, Marc Weber wrote:

> On Wed, Jan 10, 2007 at 06:53:43AM -0800, Isaac Jones wrote:
> > The original design of Cabal was more like Marc suggests.  There was
> > only the Setup file and no .cabal file, and my hope was that we'd
> > build an EDSL for package configurations.  Original cabal code would
> > probably look like:
> > 
> > main = defaultMain defaultPackageDescription{ name="foo"
> >                                             , synopsys="bar"}
> > complex, so why not just start out with Haskell, which would give us
> > room to grow :) But there are also lots of advantages to having the
> > .cabal file.  Maybe someone can dig up the debate on the libraries
> > mailing list from a few years back.
>  
> > Anyway, with the hooks interface, you can override just about all of
> > cabal's behavior 
> 
> Sure I can. But I'd like to have it the other way round with a function:
> readDescription from Cabal file..

Actually, you can do this. Probably the biggest part of Cabal is a Haskell
library. You can read package description or you can create a
PackageDescription manually and then call some of the Cabal routines.


More information about the cabal-devel mailing list