[Haskell-cafe] Problem with haddock 2.3.0 (again)
claus.reinke at talk21.com
Thu Dec 11 18:50:54 EST 2008
>> I would be happy to work around it if I could, but I can't. As far as I can
>> tell, I can't pass any flags to Haddock via the Cabal file. I would love to
>> tell Hackage to run Haddock like so, "cabal haddock
>> --haddock-option=--optghc=-D__HADDOCK__", but I don't know how.
> Let's suppose that I do actually want to define __HADDOCK__ for my library.
> Can I do this with a user-defined hook using the Cabal library?
You might want to define it conditionally, depending on version.
Cabal supports package-version macros, and haddock installs both
a package (the paths are wrong in the package description, but you
can find the version number there) and an executable for itself, but the
package version macros are not available in Setup.hs.
Still, you might find something useful in the discussion for this ticket:
Cabal should support Cabal-version-dependent Setup.hs
More information about the Haskell-Cafe