How to specify Haddock options (pragmas) at the project level?

153 views Asked by At

From the Haddock section on Stephen Diehl's "What I Wish I Knew When Learning Haskell" page:

haddock options can also be specified with pragmas in the source, either at the module or project level.

An example of a pragma at the module level is given:

{-# OPTIONS_HADDOCK show-extensions, ignore-exports #-}

but in which section of which file (when using stack) can these options be placed so as to apply to an entire project (or rather, "package")?

1

There are 1 answers

0
Li-yao Xia On BEST ANSWER

https://github.com/haskell/cabal/issues/926

It seems that there is no way to put this in the .cabal file yet. I couldn't find any reference to haddock in the stack documentation. So the next best thing is to run stack haddock --haddock-arguments "...".