first cut at configurations patch, and a couple more
simonmarhaskell at gmail.com
Wed Aug 2 06:11:22 EDT 2006
Simon Marlow wrote:
> Ok, spurned on by the possibiliy of worse merges to come, I've cleaned
> up my current code, merged it up to date, and made it work (where "work"
> means "doesn't make anything worse" - i.e. there is no new functionality
> exposed to the user yet).
A little bit more about configurations. Here's what you can do with them:
(a) enable some compiler options if --enable-debug is given to 'setup configure'
ghc-options: -DDEBUG -O0
(b) depend on HUnit if --enable-debug is given:
(c) if the base package is <2.0, depend on fps:
configuration: package(base-any, <2.0)
(d) build executable E only if package P is available. Actually I'm not really
sure we want this, the executable could always go in a separate package.
Anyway, if we want it, perhaps something like:
(e) Change dependencies depending on the operating system:
The conditional in a "configuration:" field has the following syntax:
cond ::= STRING
| cond || cond
| cond && cond
| 'package'(dependency, version-range)
More information about the cabal-devel