[Haskell-cafe] Cabal properties with conditionals

Duncan Coutts duncan.coutts at worc.ox.ac.uk
Sat Mar 21 17:25:50 EDT 2009


On Sat, 2009-03-21 at 14:26 +0100, Manlio Perillo wrote:
> Hi.
> 
> Assuming this configuration fragment:
> 
> library xxx
>      cc-options:         -Wall
> 
>      if flag(HAVE_URANDOM)
>          cc-options:    -DHAVE_URANDOM
> 
> In case the HAVE_URANDOM flag is defined, what will be the value of the 
> used cc-options?
> 1) -DHAHE_URANDOM
> 2) -Wall -DHAHE_URANDOM

The latter. Try it.

In general all fields get `mappend`ed which for list-like fields means
appending. For single value fields like True/False then latter fields
win.

Duncan



More information about the Haskell-Cafe mailing list