[Haskell-cafe] Conditional compilation for different versions of GHC?
Henning Thielemann
schlepptop at henning-thielemann.de
Sun Dec 5 23:05:37 CET 2010
Jason Dagit schrieb:
> I see that others have provided answers on here, but another way is to
> change the check from:
>
> if flag(ghc7)
> build-depends: base >= 4.3 && < 5
> cpp-options: -DGHC7
> else
> build-depends: base >= 4 && < 4.3
>
> to this:
> if impl(ghc >= 7)
> build-depends: base >= 4.3 && < 5
> cpp-options: -DGHC7
> else
> build-depends: base >= 4 && < 4.3
Isn't it better to move the dependency on 'base' out of the If block? I
mean, someone might succeed to use GHC-7 with base-4.2 or GHC<7 or a
different compiler with base-4.3.
More information about the Haskell-Cafe
mailing list