
On Fri, 2009-01-30 at 18:31 -0600, John Goerzen wrote:
I can't hard-code base >= 4 into .cabal because that would break for GHC 6.8 users. I have CPP code that selects what to compile based on GHC version.
Ahh, but the version of base is no longer determined by the version of GHC, so using cpp tests on the ghc version is not right (besides it does not work for non-ghc if that is relevant). In future (from Cabal-1.6 onwards) you can use macros to test the version of the package rather than the version of ghc: #if MIN_VERSION_base(4,0,0) ... #endif but since you are trying to support ghc-6.8 (and Cabal-1.2) you cannot rely on these macros yet. You can use this trick: flag base4 library if flag(base4) build-depends: base >= 4 cpp-options: -DBASE4 else build-depends: base < 4 Duncan