This repository was archived by the owner on Aug 3, 2024. It is now read-only.
This repository was archived by the owner on Aug 3, 2024. It is now read-only.
Document --hoogle more thoroughly in the users guide #807
Open
Description
Currently, the users' guide only gives a brief mention to the --hoogle
flag (in https://github.com/haskell/haddock/blob/b347a8c47edafa6bb3df7d35f0189619294831c4/doc/invoking.rst#invoking-haddock). But there is a good deal more that we ought to document, such as:
- An example of how to use it in practice. One thing that caught me off guard was that
haddock --hoogle Foo.hs
is not enough to generate a.txt
file—you need to also pass--package-name=foo
and--package-version=x.y.z
. It would be nice to document this. - There is an invariant that Hoogle backend output should be line-oriented (so sayeth @ndmitchell in Search doesn't find top-level type families ndmitchell/hoogle#249 (comment)). That is, each entity in the
.txt
file should begin and end on its own line, ending with a semicolon (with the possible exception of classes, see Hoogle backend improvements #432 (comment)). There have been a number of bugs where Haddock did not respect this invariant (such as Hoogle backend oddities with type families #806), so it would be nice to officially enshrine this into the users' guide for future reference. - There are some conventions in the Hoogle backend output that could use explaining, such as the fact that square brackets around an entity name mean that is was exported indirectly (see runReaderT has the wrong type #413 (comment)).