Reputation: 51
I am using Haddock (w/ Stack) to generate documentation for a software suite I'm working on. I would like to generate 2 variants of the Haddock docs; one normally (e.g., vanilla stack haddock
), and one with fully exposed modules (e.g., stack haddock --haddock-arguments "--show-all"
). However, I've found that I needed to run stack clean
in-between haddock generation, or else the second command that I run would not generate anything. We would like to try to avoid this stack clean
(which results in needing a recompilation of the entire software suite).
Expected steps (not working):
stack haddock
stack haddock --haddock-arguments "--show-all"
The problem here with the above steps is that the second stack haddock
will just default to using the haddock docs that were already built, ignoring the "--show-all"
change. We can fix this by adding a stack clean
in-between runs:
Working steps:
stack haddock
stack clean
stack haddock --haddock-arguments "--show-all"
However, adding this stack clean
step results in an extra recompilation of the entire software suite for step 4. Is there anyway that I can get around needing this step? I've already tried to manually delete the $(stack path --local-install-root)/doc
folder before the second docs generation, but this didn't work without a full clean.
My Stack version is Version 2.7.3, Git revision 7927a3aec32e2b2e5e4fb5be76d0d50eddcc197f x86_64 hpack-0.34.4
.
Upvotes: 5
Views: 89