On Sat, 2009-02-28 at 01:13 +0000, Ian Lynagh wrote:
> On Wed, Feb 25, 2009 at 12:28:53AM +0000, Thomas Schilling wrote:
> > 
> > The first patch defines a preprocessor constant;
> 
> Regarding the use of __GHC_PATCHLEVEL__ in haddock, with recent versions
> of Cabal you can instead use MIN_VERSION_ghc defined in
> dist/build/autogen/cabal_macros.h, e.g.:
> 
> /* package ghc-6.10.1.20090227 */
> #define MIN_VERSION_ghc(major1,major2,minor) \
>   (major1) <  6 || \
>   (major1) == 6 && (major2) <  10 || \
>   (major1) == 6 && (major2) == 10 && (minor) <= 1
> 
> (I assume Cabal passes flags so that you can just use
> #include "cabal_macros.h").

It get automagically #included if you're using cpp for that module.

> I'm not sure how recent a Cabal version you need,

1.6+

Duncan

_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to