issues with configurations

Einar Karttunen ekarttun at cs.helsinki.fi
Thu Aug 10 18:39:30 EDT 2006


And here is the newest after discussion with Duncan Coutts on
#haskell.

build-depends := bexp

bexp = package-name-with-version
     | '(' bexp ')'
     | cexp '?' bexp
     | bexp ',' bexp
     | 'T'

configuration := cexp

cexp = '(' cexp ')'
     | cexp '|' cexp
     | cexp '&' cexp
     | 'T'
     | '!' cexp
     | 'Flag(' string ')'


So dependencies are only on Flags.

A new declaration like:

default := 'default:' flag-name '=' (bexp | Os(...) | ...)  

configure takes the following flags:
--no-default-flags           Defaults are ignored and all flags
                             default to False.
--enable-foo                 Enable flag foo
--disable-foo                Disable flag foo
--auto-foo                   Use default for foo

Now we don't have any of those evil conditional package dependencies.

fps would work like:

default: old_fps = base < 2
build-depends: base, Flag(old_fps) ? fps

configuration: Flag(old_fps)
ghc-options: -DUSE_OLD_FPS


- Einar Karttunen


More information about the cabal-devel mailing list