[Haskell-cafe] package maintainers: updating your packages to work with GHC 6.8.1

Duncan Coutts duncan.coutts at worc.ox.ac.uk
Mon Nov 5 06:35:11 EST 2007


On Mon, 2007-11-05 at 03:12 +0000, Duncan Coutts wrote:
> If you maintain a Haskell package this is for you.

> 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

By the way, if you have several common deps it's perfectly ok to factor
them out like this:

Flag splitBase
  Description: Choose the new smaller, split-up base package.

Library
  Build-Depends: network, HTTP, HTTP-Simple, MissingH, time>=1.1.1

  if flag(splitBase)
    Build-Depends: base >= 3, containers
  else
    Build-Depends: base < 3



In a future version of Cabal we might have this nicer syntax:

Library
  Build-Depends: base, network, HTTP ,HTTP-Simple, MissingH, time>=1.1.1

  if package(base >= 3)
    Build-Depends: containers


Duncan


More information about the Haskell-Cafe mailing list