Cabal --builddir

Duncan Coutts duncan.coutts at worc.ox.ac.uk
Wed Feb 25 08:09:38 EST 2009


On Wed, 2009-02-25 at 12:26 +0100, Johan Tibell wrote:
> On Wed, Feb 25, 2009 at 11:58 AM, Neil Mitchell <ndmitchell at gmail.com> wrote:
> >> Really of course we should notice this earlier and complain that we
> >> cannot use this new feature while using the older lib version. We should
> >> file a ticket about that. In fact the whole issue with what the Setup
> >> command line must accept is a tricky issue when it comes to working with
> >> custom build systems.
> >
> > Meh. Custom build scripts are brittle and evil - in my particular case
> > the custom build script was trivial so adding build-type:Simple fixes
> > everything. However, I'd like to know (before I push a change) that
> > build-type:Simple will work out the box with the Cabal that got
> > installed with ghc-6.8.3. So that means figuring out what Cabal
> > ghc-6.8.3 shipped with, and which Cabal can cope with
> > build-type:Simple - is there any way to figure that out in general,
> > and what is the answer in this specific case?
> 
> It would be nice if the user guide specified in which Cabal version a
> field was first introduced.

If someone has the time that'd be great. I'd certainly accept patches
along those lines. Generally the user guide needs some attention from
someone. It could probably do with being divided into user and author
sections / perspectives. People want to know how to install packages,
all the various user interface to using the command line interface.
Different people (or the same people but doing a different task) want to
know the details of how to write cabal packages.

> Aside: I often wish that Haskell libraries specified the library
> version in which a function was added. Python does this for their
> library APIs. It would be very helpful in figuring out the lower
> bounds when specifying library dependencies. I guess it would be
> possible to write a tool that extracts this information.

Yes, if we extract the api from each older version and feed it as input
to haddock.

> Also, does the user guide specify how Cabal handles unknown fields?

Looks like it does not say.

Unknown fields generate a warning and are otherwise ignored. Unknown
fields starting with "x-" generate no warning and are collected into a
list of name/value pairs that is exposed through the api.

Duncan



More information about the cabal-devel mailing list