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
DynFlagsfrom a.hifile. If there's a.hiefile we can usegetOptionsto reparse them from the source file, but that's a nasty workaround.