[Haskell-cafe] Conditional compilation for different versions of GHC?
nominolo at googlemail.com
Wed Dec 1 03:07:57 CET 2010
I think a nicer way to solve that issue is to use Cabal's MIN_VERSION macros.
1. Add CPP to your extensions. This will cause cabal to
auto-generate a file with MIN_VERSION_<pkg> macros for each <pkg> in
2. GHC 6.12.* comes with template-haskell 2.4, so to test for that use:
.. ghc-6.12.* code here.
This should make it more transparent to the user.
On 27 November 2010 16:59, Jinjing Wang <nfjinjing at gmail.com> wrote:
> Dear list,
> >From ghc 7.0.1 release notes:
>> The Language.Haskell.TH.Quote.QuasiQuoter type has two new fields: quoteType and quoteDec.
> Some of my code needs to be conditionally compiled to support both
> version 6 and 7, what is the recommended way to do it?
> * http://new-www.haskell.org/ghc/docs/7.0.1/html/users_guide/release-7-0-1.html
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
Push the envelope. Watch it bend.
More information about the Haskell-Cafe