Cabal-version dependent code in Setup.hs?

Claus Reinke claus.reinke at talk21.com
Sat Aug 9 15:31:30 EDT 2008


What is the Cabal way to have Cabal-version dependent
code in Setup.hs?

Essentially all packages that need a non-standard Setup file are
prone to break with Cabal changes, but if there is code that works
with, say, Ghc 6.8.3's version of Cabal, and other code that works
with Ghc head's version of Cabal, it would be nice if both could be
provided in a single package.

Couldn't it be as simple as having an CPP include file with a
Cabal version macro, which could then be included and used
in Setup.hs? Or are there other workarounds? Optional version
suffixes for Setup.hs might work in future, with cabal-install
choosing the most appropriate file?

Claus






More information about the cabal-devel mailing list