Add haddock one-shot mode
One-shot mode for haddock is meant to be used with build systems like Bazel or Buck. The idea is to be able to incrementally build the documentation one module at a time, while being guaranteed that no recompilation is happening.
There are two big downsides to this approach:
- It is fundamentally incompatible with showing all instances for a class.
- I was not able to get the right
DynFlags
from a.hi
file. If there's a.hie
file we can usegetOptions
to reparse them from the source file, but that's a nasty workaround.