We often have to write things like:
flag splitBase
description: Choose the new smaller, split-up base package.
library
if flag(splitBase)
build-depends: base >= 3, containers
else
build-depends: base < 3
Which is verbose and annoying. It would be nicer to say:
library
build-depends: base
if package(base >= 3)
build-depends: containers
This is syntactic sugar only. It translates into the existing constructs so no new behaviour is being introduced. It would translate into:
flag _1
library
build-depends: base
if flag(_1)
build-depends: base >= 3
build-depends: containers
else
build-depends: base < 3
It is described in more detail in this thread:
http://www.haskell.org/pipermail/cabal-devel/2007-October/001189.html
http://www.haskell.org/pipermail/cabal-devel/2007-November/001336.html