Differential documentation with haddock

If I use cabal build in my library, then change the file, and the next time cabal build start cabal build I will have to recompile the files affected by the changes. I do not get the same behavior with the cabal haddock : when I run it after changing the file, cabal / haddock ends up throwing out all the previous work and starting from scratch. It is quite time consuming; is there any way to get differential documentation updates?

Here's a dump of command line issues for creating documentation.

+6
source share
1 answer

processModules documentation says:

Create interfaces and a reference environment by checking the list of modules using the GHC API and processing the resulting syntax trees.

And this is the main function of haddock . So the ATM will answer your question: No.

cabal build does not help cabal haddock , since haddock checks module types with various parameters (for example, __HADDOCK__ CPP variable is enabled)

Creating reliable incremental generation of picks is difficult because the code, which later on the dependency chart, can change the documentation of the modules that precede this point: especially lists of instances. It would probably be possible to build module interfaces.

Taking a look at the processModules code , the first step is something that could be done in stages, and rest using global information.

Try translating verbosity into max ie --haddock-options=--verbosity=2 and check how much time is spent between Creating interfaces... and Attaching instances...

+1
source

All Articles