Search code examples
ocamlocaml-duneocamldoc

odoc (documentation generator for OCaml) remove 'Stdlib' prefix


I'm using odoc, along with dune to generate documentation for a library. This is made by doing: dune build @doc

However, this generates signatures like:

val print : Stdlib.Format.formatter -> t -> unit

While what i would like is:

val print : Format.formatter -> t -> unit

OCamldoc used to provide the -hide option which could do exactly this. Does odoc have something similar? If yes, how to use it from dune?

Optionnaly, it would be perfect to have a link to the Format module of the Stdlib but this is maybe asking too much


Solution

  • No, odoc did not have something similar at the time i asked the question. However it seems that now it is (or soon wille be) the case, thanks to this PR, which allows you to specify which modules to open by default by doing:

    odoc compile --open=Stdlib