Macros For Cabal Version

Hi all, I have a non-trivial build script that I'm trying to make compatible with Cabal 1.22 and Cabal 1.24. So far the only macro I can find that helps me determine which version I'm using is __GLASGOW_HASKELL__. Is there a better one? Thanks! -deech

If Cabal itself is a dependency, then you can use the
MIN_VERSION_Cabal macro. That'll only work if your build script is
built via cabal, because it generates cabal_macros.h .
Another approach would be to rely on GHC_PACKAGE_PATH being accurate
(or if the global db is used), and run "ghc-pkg field Cabal version".
-Michael
On Fri, Jun 17, 2016 at 4:14 PM, aditya siram
Hi all, I have a non-trivial build script that I'm trying to make compatible with Cabal 1.22 and Cabal 1.24. So far the only macro I can find that helps me determine which version I'm using is __GLASGOW_HASKELL__. Is there a better one?
Thanks! -deech
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
participants (2)
-
aditya siram
-
Michael Sloan