[Haskell-cafe] developer docs with haddock: cabal or make?
avatar at hot.ee
Mon May 26 09:26:30 EDT 2008
for the project I am doing, I would like to be able to create two
- the user documentation, done with normal Setup.hs --haddock and
- the developer documentation, where all modules are exposed and
haddock is run with --ignore-all-exports
What is the right way to do this? I see two options, but both are
1. Write a custom Setup.hs, using the Cabal library. Ideally, it would
accept a new command, like "Setup.hs --haddock-devel". However Cabal
doesn't seem to be designed for adding new commands or options to them -
the interface is hardcoded. For instance, I can't add a command in such
a way that it would be listed alongside others when calling
2. Call haddock from a makefile. This is a one-liner with haddock 0.8,
but not with haddock 2.0 and above. The problem is that haddock 2.0 only
supports --read-interface and doesn't support --use-package any more.
Thus I have to find all the haddock interfaces by hand, for instance by
calling ghc-pkg for each library I depend on. This is of course
straightforward, but I feel that it shouldn't be my job.
Any comments or ideas?
More information about the Haskell-Cafe