File: run.t

package info (click to toggle)
ocaml-odoc 2.1.1%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 6,744 kB
  • sloc: ml: 37,049; makefile: 124; sh: 79
file content (49 lines) | stat: -rw-r--r-- 1,167 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
This is an excerpt from ocamlary, showing an issue resolving hidden modules that
aren't roots.
  $ cat test.mli
  module CanonicalTest : sig
    module Base__List : sig
      type 'a t
  
      val id : 'a t -> 'a t
    end
  
    module Base__ : sig
      module List = Base__List
      (** @canonical Test.CanonicalTest.Base.List *)
    end
  
    module Base : sig
      module List = Base__.List
    end
  
    module Base_Tests : sig
      module C : module type of Base__.List
  
      open Base__
      module L = List
  
      val baz : 'a Base__.List.t -> unit
      (** We can't reference [Base__] because it's hidden.
          {!List.t} ([List.t]) should resolve. *)
    end
  end
  
  val test : 'a CanonicalTest.Base__.List.t -> unit
  


  $ ocamlc -c -bin-annot test.mli
  $ odoc compile test.cmti

This shouldn't cause any warnings:

  $ odoc link test.odoc -I .
  File "test.odoc":
  Warning: Failed to lookup type identifier((root Test).CanonicalTest, false).Base__.List.t Parent_module: Parent_module: Find failure
  File "test.mli", line 25, characters 8-17:
  Warning: Failed to resolve reference unresolvedroot(List).t Couldn't find "List"