
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
build-depends.
2. GHC 6.12.* comes with template-haskell 2.4, so to test for that use:
#ifdef MIN_VERSION_template_haskell(2,4,0)
.. ghc-6.12.* code here.
#endif
This should make it more transparent to the user.
On 27 November 2010 16:59, Jinjing Wang
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?
ref:
* http://new-www.haskell.org/ghc/docs/7.0.1/html/users_guide/release-7-0-1.htm...
-- jinjing _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
-- Push the envelope. Watch it bend.