[Haskell-cafe] Macros For Cabal Version
Michael Sloan
mgsloan at gmail.com
Sat Jun 18 01:54:45 UTC 2016
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 <aditya.siram at gmail.com> wrote:
> 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 at haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
>
More information about the Haskell-Cafe
mailing list