2 Patches for Haddock
Duncan Coutts
duncan.coutts at worc.ox.ac.uk
Sat Feb 28 05:50:36 EST 2009
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
More information about the Cvs-ghc
mailing list