
9 Aug
2008
9 Aug
'08
3:31 p.m.
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