private type abbreviation becomes non-private when shadowed with an equal type
I put example code for this at https://github.com/leviroth/odoc-bug-demo.
The crux of the example is that I have, in p.mli:
type t = private int
module M : sig
type nonrec t = t
end
and then, in example.ml:
module P = P
include P
include M
The result is that odoc reports that Example contains a type nonrec t = int, despite the fact that this abbreviation should be private.
It appears to be important that P is defined in its own file; if I move the definition to the top of example.ml, the problem goes away.
I noticed this while browsing the documentation for Async_kernel.Synchronous_time_source. The implementation of that module uses a Time_ns module defined here, and you can see that lots of types that should be given as Time_ns.t are instead given as Int63.t in the linked documentation.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. The main purpose of this is to keep the issue tracker focused to what is actively being worked on, so that the amount and variety of open yet inactive issues does not overwhelm contributors.
An issue closed as stale is not rejected — further discussion is welcome in its closed state, and it can be resurrected at any time. odoc maintainers regularly check issues that were closed as stale in the past, to see if the time is right to reopen and work on them again. PRs addressing issues closed as stale are as welcome as PRs for open issues. They will be given the same review attention, and any other help.