> 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.
>

I certainly might!

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.
>

That's good to know. And I just found the documentation:
http://www.haskell.org/ghc/docs/latest/html/Cabal/authors.html#cpp

This sounds like it only works with package dependencies. Does it also work
with Haddock as a processing tool?

Still, you might find something useful in the discussion for this ticket:
>
>   Cabal should support Cabal-version-dependent Setup.hs
>   http://hackage.haskell.org/trac/hackage/ticket/326
>

Thanks for the tip.

Regards,
Sean
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to