panglesd / odoc

Documentation compiler for OCaml and Reason
Other
0 stars 0 forks source link

In module type, everything links to the whole module type #21

Open panglesd opened 1 year ago

panglesd commented 1 year ago

See for instance in odoc's doc in document/generator_signature/syntax: every link in this is to the whole module type definition.

https://choum.net/panglesd/source_demo/odoc/odoc_document/Odoc_document/Generator_signatures/module-type-SYNTAX/Type/index.html

(the uid version makes it clear that the whole module type def is selected: https://choum.net/panglesd/source_demo2/odoc_document/Odoc_document/Generator_signatures/module-type-SYNTAX/Type/index.html)

panglesd commented 1 year ago

This might be some kind of merlin limitation. I was surprised that the following does not compile:

module type S = sig
   val x : int
end

module type B = sig
   val x : S.x
end
File "functor.t/s.ml", line 7, characters 11-14:
7 |    val x : S.x
               ^^^
Error: Unbound module S
Hint: There is a module type named S, but module types are not modules