odoc
odoc copied to clipboard
Anonymous includes
How useful is it to have special UI support in odoc for anonymous includes?
Consider this example:
(* x.mli *)
include module type of struct
include Pervasives
end
This is currently done in the new Stdlib
module and here's how the output looks:

I don't think include module type of sig ... end
is informative or useful in any way. I suggest we inline this type of includes in the original module.
Of course a counterargument is that technically it is not inlined and that should be made explicit.
(Rendered version: https://nojb.github.io/ocaml-manual/odoc/stdlib/Stdlib/index.html)
include
s of structure/signatures should indeed always be inlined by default.
We currently haven't gone that way yet because substitution (for example with type _ t := int
) isn't properly implemented, and inlining the include
can sometimes cause information to disappear.
I'd suggest waiting for the backend to be rewritten before adding this specific support, but won't mind to much if people want to go ahead with this right away (as there's always the option to change the default when invoking odoc, or on a case by case basis with @open/closed
tags).
Hello! I am not sure if this is the right place to ask this question, but in general, it would be good to be able to control how include S
should rendered. (I can imagine three choices: show only include S
in the output; show only the content of the signature S
; or show both). Does odoc
offer this feature today? If not, is it planned? Thanks!
It does, see https://ocaml-doc.github.io/octavius/syntax.html (in particular: the "new tags" section).
Thanks!
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
This is not implemented currently and I think makes sense to do.