[Haskell-cafe] How to use cabal macros in .hsc files
schlepptop at henning-thielemann.de
Thu Aug 11 18:14:54 CEST 2011
On 08.08.2011 12:08, Bas van Dijk wrote:
> Currently it's not possible to use cabal macros like
> MIN_VERSION_base(x,y,z) in .hsc files:
> Is there a workaround to get the same effect?
Writing a plain Haskell module that contains the code that depends on
the particular base-version?
Usually I try to stay away from this preprocessor hackery, and this case
seems to support my attempts. What I do is to add Hs-Source-Dirs
depending on some Cabal flag, and connect it with a field like
More information about the Haskell-Cafe