
On Tue, 2009-10-27 at 14:33 -0700, Greg Fitzgerald wrote:
my Setup.hs includes an explicit system call to hpc:
exec "hpc" ["markup" , "--include=Language.Idl.Data" , "--include=Language.Idl.Merge" , "--include=Language.Idl.Parser" ...all the same files as above... ]
Why do you want to explicitly specify hpc --include=blah for every module? By default "hpc markup" will generate pages for every module in the program. Am I missing something?
Questions: 1) Is there a way to create haddock docs for /all/ modules, instead of just the ones listed by 'exposed-modules'?
Yes $ cabal haddock --help [...] --executables Run haddock for Executables targets --internal Run haddock for internal modules and include all symbols [...] This is also documented in the Cabal user guide.
2) Is there a way to query cabal for the list of modules? Or by chance has hpc recently been integrated with cabal?
Certainly it'd be nice to have more direct support for making a hpc flavour build using cabal. There's an open ticket on that feature request. But I don't think it's that hard at the moment. I use hpc with cabal frequently. Just cabal build --ghc-option=-fhpc. The only thing you have to watch out for is if you've got multiple executables in the .cabal file since the files that hpc writes out for the Main modules clash with each other. Duncan