GHC options in Cabal

Duncan Coutts duncan.coutts at
Sat Jan 19 09:02:31 EST 2008

On Fri, 2008-01-18 at 11:50 +0000, Adrian Hey wrote:

> Personally I'm not at all sure that having users specify all this stuff
> on the command line is a good idea.
> I thought policy was that (ideally) all users should have to do is
> type..
> runghc Setup configure
> runghc Setup build
> ..etc

Or even better:

cabal install

Or even better than that, is to not bother downloading, untaring and
just say:

cabal install xmonad

This works now, and I encourage everyone on this list to try it out and
report issues. Currently you need the darcs versions of the Cabal lib
and cabal-install. It also needs released versions of the zlib and HTTP

> If users don't like the defaults defined in the .cabal file they
> can always edit it (that way they have a record of what was actually
> used to build the package). I habitually add -split-objs to the
> ghc-options of stuff I download, for example. I have read about
> --enable-split-objs, I just don't like using it.

The idea is that end users do not need to edit the .cabal flags. That
requires too much manual intervention and gets in the way of
automatically installing dependencies if each one has to be customised
by manually downloading, unpacking, editing and installing.

> I do use --enable-library-profiling habitually, but only because I
> haven't figured out how to put this in the .cabal file :-)

You'll be able to stick your favourite defaults in the config file for
cabal-install, and they'll get used every time. Currently many options
but not all can be set in the cabal-install config file. We should
extend that to all the configure options.

Also, to make life easier, cabal-install already supports bash command
line flag completion to save your typing fingers.


More information about the Libraries mailing list