If I do a cabal build
on my library, then change a file, the next time I run cabal build
, I only have to recompile files affected by the changes. I'm not getting the same behavior with the cabal haddock
command: when I run it after changing a file, cabal/haddock ends up throwing out all of the previous work and starting from scratch. This is rather time consuming; is there a way to get differential updates to documentation?
Here's a dump of the command cabal issues to generate the documentation.
'MyModule'
and you have noMyModule
available. Because if it simply gives a warning and continue to run then the behaviour is required: any change to existing files or addition of files could modify the output of the other modules' documentation. – Bakuriuimport ModuleDoesNotExist
to the top of a file, haddock short circuits and does not output any documentation. If I force any other sort of compile error (e.g. a syntax error), haddock outputs documentation up to the module with the error, but then short circuits and does not output documentation for the rest of the modules. – crockeeacabal haddock
and it only took a few seconds. However, if I runcabal install
it will take a lot longer because the global index files have to be regenerated. So how big is your code? Exactly what commands are you running and how long are these commands taking? – ErikR