Why is there a cabal file at all?

Isaac Jones ijones at syntaxpolice.org
Wed Jan 10 09:53:43 EST 2007


"Conal Elliott" <conal at conal.net> writes:

> Marc points out that the expressiveness of the Cabal language is
> insufficient for some packages, and a DSEL would be more expressive.
> I have the same problem and still have to resort to makefiles to
> augment my .cabal files.

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"}

etc.

Then I was hoping it would evolve to an EDSL.

But most people didn't like this design.  My argument was that if we
created a a.cabal file, eventually the design would get more and more
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 (including inputting the description file) so there's
pleanty of room to experiment with something like an EDSL.
Unfortunitely your package would not be cabal-compliant without a
.cabal file.  We are moving more in the other direction... keeping all
of the information in .cabal and not requiring a Setup.lhs file.  That
seems to be easier for most people.

peace,

  isaac


More information about the cabal-devel mailing list