MIN_VERSION_foo() macro vs. CABAL-flag directed API-adaption

Ben Millwood haskell at benmachine.co.uk
Tue Sep 18 14:43:39 CEST 2012

On Tue, Sep 18, 2012 at 12:05 PM, Henning Thielemann
<lemming at henning-thielemann.de> wrote:
> I prefer the Cabal approach since it requires one (hacky) tool less in the
> tool chain. I use different Hs-Source-Dirs depending on a Cabal flag. With
> ghci you can choose the different modules using the -i option.

I have sympathy with this argument in general, but in this particular
case CPP is used anyway, so that's not much of an argument.

Where CPP is unavoidable, I'd always prefer the MIN_VERSION_ macros
for doing this job.

More information about the Libraries mailing list