···22module Identifier = struct
23 type 'a id = 'a Paths_types.id = { iv : 'a; ihash : int; ikey : string }
2425- type t = Paths_types.Identifier.any
2627- type t_pv = Paths_types.Identifier.any_pv
002829 let rec name_aux : t -> string =
30 fun x ->
···5253 let name : [< t_pv ] id -> string = fun n -> name_aux (n :> t)
5455- let rec root id =
56- match id.iv with
57- | `Root _ as root -> Some { id with iv = root }
58- | `Module (parent, _) -> root (parent :> t)
59- | `Parameter (parent, _) -> root (parent :> t)
60- | `Result x -> root (x :> t)
61- | `ModuleType (parent, _) -> root (parent :> t)
62- | `Type (parent, _) -> root (parent :> t)
63- | `Constructor (parent, _) -> root (parent :> t)
64- | `Field (parent, _) -> root (parent :> t)
65- | `Extension (parent, _) -> root (parent :> t)
66- | `Exception (parent, _) -> root (parent :> t)
67- | `Value (parent, _) -> root (parent :> t)
68- | `Class (parent, _) -> root (parent :> t)
69- | `ClassType (parent, _) -> root (parent :> t)
70- | `Method (parent, _) -> root (parent :> t)
71- | `InstanceVariable (parent, _) -> root (parent :> t)
72- | `Label (parent, _) -> root (parent :> t)
73- | `Page _ | `LeafPage _ | `CoreType _ | `CoreException _ -> None
74-75- let root id = root (id :> t)
76-77 let rec label_parent_aux =
78- let open Paths_types.Identifier in
79- fun (n : any) ->
80 match n with
81 | { iv = `Result i; _ } -> label_parent_aux (i :> any)
82 | { iv = `CoreType _; _ } | { iv = `CoreException _; _ } -> assert false
···109110 type any = t
1110000000000112 module Any = struct
113 type t = any
114-115 let equal = equal
116-117 let hash = hash
118-119 let compare = compare
120 end
121122 module Signature = struct
123- type t = Paths_types.Identifier.signature
124-125- type t_pv = Paths_types.Identifier.signature_pv
126-127 let equal = equal
128-129 let hash = hash
130-131 let compare = compare
132-133- let rec root = function
134- | { iv = `Root _; _ } as root -> root
135- | {
136- iv =
137- ( `ModuleType (parent, _)
138- | `Module (parent, _)
139- | `Parameter (parent, _) );
140- _;
141- } ->
142- root parent
143- | { iv = `Result x; _ } -> root x
144-145- let root id = root (id :> t)
146 end
147148 module ClassSignature = struct
149- type t = Paths_types.Identifier.class_signature
150-151- type t_pv = Paths_types.Identifier.class_signature_pv
152-153 let equal = equal
154-155 let hash = hash
156-157 let compare = compare
158 end
159160 module DataType = struct
161- type t = Paths_types.Identifier.datatype
162-163- type t_pv = Paths_types.Identifier.datatype_pv
164-165- let equal = equal
166-167- let hash = hash
168-169- let compare = compare
170 end
171172 module Parent = struct
173- type t = Paths_types.Identifier.parent
174-175- type t_pv = Paths_types.Identifier.parent_pv
176-177- let equal = equal
178-179- let hash = hash
180-181- let compare = compare
182 end
183184 module LabelParent = struct
185- type t = Paths_types.Identifier.label_parent
186-187- type t_pv = Paths_types.Identifier.label_parent_pv
188-189 let equal = equal
190-191 let hash = hash
192-193 let compare = compare
194 end
195196 module RootModule = struct
197- type t = Paths_types.Identifier.root_module
198-199- type t_pv = Paths_types.Identifier.root_module_pv
200-201 let equal = equal
202-203 let hash = hash
204-205 let compare = compare
206-207- let name { iv = `Root (_, name); _ } = ModuleName.to_string name
208 end
209210 module Module = struct
211- type t = Paths_types.Identifier.module_
212-213- type t_pv = Paths_types.Identifier.module_pv
214-215 let equal = equal
216-217 let hash = hash
218-219 let compare = compare
220-221- let root id = Signature.root (id :> Signature.t)
222 end
223224 module FunctorParameter = struct
225- type t = Paths_types.Identifier.functor_parameter
226-227- type t_pv = Paths_types.Identifier.functor_parameter_pv
228-229 let equal = equal
230-231 let hash = hash
232-233 let compare = compare
234 end
235236 module FunctorResult = struct
237- type t = Paths_types.Identifier.functor_result
238-239- type t_pv = Paths_types.Identifier.functor_result_pv
240-241- let equal = equal
242-243- let hash = hash
244-245- let compare = compare
246 end
247248 module ModuleType = struct
249- type t = Paths_types.Identifier.module_type
250-251- type t_pv = Paths_types.Identifier.module_type_pv
252-253 let equal = equal
254-255 let hash = hash
256-257 let compare = compare
258 end
259260 module Type = struct
261- type t = Paths_types.Identifier.type_
262-263- type t_pv = Paths_types.Identifier.type_pv
264-265 let equal = equal
266-267 let hash = hash
268-269 let compare = compare
270 end
271272 module Constructor = struct
273- type t = Paths_types.Identifier.constructor
274-275- type t_pv = Paths_types.Identifier.constructor_pv
276-277- let equal = equal
278-279- let hash = hash
280-281- let compare = compare
282 end
283284 module Field = struct
285- type t = Paths_types.Identifier.field
286-287- type t_pv = Paths_types.Identifier.field_pv
288-289- let equal = equal
290-291- let hash = hash
292-293- let compare = compare
294 end
295296 module Extension = struct
297- type t = Paths_types.Identifier.extension
298-299- type t_pv = Paths_types.Identifier.extension_pv
300-301- let equal = equal
302-303- let hash = hash
304-305- let compare = compare
306 end
307308 module Exception = struct
309- type t = Paths_types.Identifier.exception_
310-311- type t_pv = Paths_types.Identifier.exception_pv
312-313- let equal = equal
314-315- let hash = hash
316-317- let compare = compare
318 end
319320 module Value = struct
321- type t = Paths_types.Identifier.value
322-323- type t_pv = Paths_types.Identifier.value_pv
324-325- let equal = equal
326-327- let hash = hash
328-329- let compare = compare
330 end
331332 module Class = struct
333- type t = Paths_types.Identifier.class_
334-335- type t_pv = Paths_types.Identifier.class_pv
336-337 let equal = equal
338-339 let hash = hash
340-341 let compare = compare
342 end
343344 module ClassType = struct
345- type t = Paths_types.Identifier.class_type
346-347- type t_pv = Paths_types.Identifier.class_type_pv
348-349 let equal = equal
350-351 let hash = hash
352-353 let compare = compare
354 end
355356 module Method = struct
357- type t = Paths_types.Identifier.method_
358-359- type t_pv = Paths_types.Identifier.method_pv
360-361- let equal = equal
362-363- let hash = hash
364-365- let compare = compare
366 end
367368 module InstanceVariable = struct
369- type t = Paths_types.Identifier.instance_variable
370-371- type t_pv = Paths_types.Identifier.instance_variable_pv
372-373- let equal = equal
374-375- let hash = hash
376-377- let compare = compare
378 end
379380 module Label = struct
381 type t = Paths_types.Identifier.label
382-383 type t_pv = Paths_types.Identifier.label_pv
384-385 let equal = equal
386-387 let hash = hash
388-389 let compare = compare
390 end
391392 module Page = struct
393- type t = Paths_types.Identifier.page
394-395- type t_pv = Paths_types.Identifier.page_pv
396-397- let equal = equal
398-399- let hash = hash
400-401- let compare = compare
402 end
403404 module ContainerPage = struct
405- type t = Paths_types.Identifier.container_page
406-407- type t_pv = Paths_types.Identifier.container_page_pv
408-409- let equal = equal
410-411- let hash = hash
412-413- let compare = compare
414 end
415416 module SourceDir = struct
417- type t = Paths_types.Identifier.source_dir
418- type t_pv = Paths_types.Identifier.source_dir_pv
419 let equal = equal
420 let hash = hash
421 let compare = compare
···425 end
426427 module SourcePage = struct
428- type t = Paths_types.Identifier.source_page
429- type t_pv = Paths_types.Identifier.source_page_pv
430 let equal = equal
431- let hash = hash
432- let compare = compare
433 let name { iv = `SourcePage (p, name); _ } = SourceDir.name p ^ name
0434 end
435436 module OdocId = struct
437- type t = Paths_types.Identifier.odoc_id
438-439- type t_pv = Paths_types.Identifier.odoc_id_pv
440-441- let equal = equal
442-443- let hash = hash
444-445- let compare = compare
446 end
447448 module Path = struct
449 module Module = struct
450- type t = Paths_types.Identifier.path_module
451-452- type t_pv = Paths_types.Identifier.path_module_pv
453-454 let equal = equal
455-456 let hash = hash
457-458 let compare = compare
459-460- let root id = Signature.root (id :> Signature.t)
461 end
462463 module ModuleType = struct
464- type t = Paths_types.Identifier.path_module_type
465-466 let equal = equal
467-468 let hash = hash
469-470 let compare = compare
471 end
472473 module Type = struct
474- type t = Paths_types.Identifier.path_type
475-476- type t_pv = Paths_types.Identifier.path_type_pv
477-478 let equal = equal
479-480 let hash = hash
481-482 let compare = compare
483 end
484485 module ClassType = struct
486- type t = Paths_types.Identifier.path_class_type
487-488- type t_pv = Paths_types.Identifier.path_class_type_pv
489-490 let equal = equal
491-492 let hash = hash
493-494 let compare = compare
495 end
496497- type t = Paths_types.Identifier.path_any
498 end
499500 module Maps = struct
···774775 let is_hidden m =
776 is_resolved_hidden (m : t :> Paths_types.Resolved_path.any)
777-778- let rec identifier : t -> Identifier.Path.Module.t =
779- fun x ->
780- let r = identifier in
781- match x with
782- | `Identifier id -> id
783- | `Subst (_, x) -> r x
784- | `Hidden p -> r p
785- | `Module (m, n) -> Identifier.Mk.module_ (parent_module_identifier m, n)
786- | `Canonical (p, _) -> r p
787- | `Apply (m, _) -> r m
788- | `Alias (dest, _src) -> r dest
789- | `OpaqueModule m -> r m
790-791- let rec root : t -> string option = function
792- | `Identifier id -> (
793- match Identifier.root (id :> Identifier.t) with
794- | Some root -> Some (Identifier.name root)
795- | None -> None)
796- | `Subst (_, p)
797- | `Hidden p
798- | `Module (p, _)
799- | `Canonical (p, _)
800- | `Apply (p, _)
801- | `Alias (p, _)
802- | `OpaqueModule p ->
803- root p
804 end
805806 module ModuleType = struct
807 type t = Paths_types.Resolved_path.module_type
808-809- let is_hidden m =
810- is_resolved_hidden (m : t :> Paths_types.Resolved_path.any)
811 end
812813 module Type = struct
814 type t = Paths_types.Resolved_path.type_
815-816- let of_ident id = `Identifier id
817-818- let is_hidden m =
819- is_resolved_hidden ~weak_canonical_test:false
820- (m : t :> Paths_types.Resolved_path.any)
821 end
822823 module ClassType = struct
824 type t = Paths_types.Resolved_path.class_type
825-826- let of_ident id = `Identifier id
827-828- let is_hidden m =
829- is_resolved_hidden ~weak_canonical_test:false
830- (m : t :> Paths_types.Resolved_path.any)
831 end
832833 let rec identifier : t -> Identifier.t = function
···866867 module Module = struct
868 type t = Paths_types.Path.module_
869-870- let rec root : t -> string option = function
871- | `Resolved r -> Resolved.Module.root r
872- | `Identifier (id, _) -> (
873- match Identifier.root (id :> Identifier.t) with
874- | Some root -> Some (Identifier.name root)
875- | None -> None)
876- | `Root s -> Some s
877- | `Forward _ -> None
878- | `Dot (p, _) | `Apply (p, _) -> root p
879 end
880881 module ModuleType = struct
···899900 type root = Paths_types.Resolved_fragment.root
901902- let sig_of_mod m =
903- let open Paths_types.Resolved_fragment in
904- (m : module_ :> signature)
905-906- type base_name =
907- | Base of root
908- | Branch of ModuleName.t * Paths_types.Resolved_fragment.signature
909-910- let rec split_parent : Paths_types.Resolved_fragment.signature -> base_name
911- = function
912- | `Root i -> Base i
913- | `Subst (_, p) -> split_parent (sig_of_mod p)
914- | `Alias (_, p) -> split_parent (sig_of_mod p)
915- | `OpaqueModule m -> split_parent (sig_of_mod m)
916- | `Module (p, name) -> (
917- match split_parent p with
918- | Base i -> Branch (name, `Root i)
919- | Branch (base, m) -> Branch (base, `Module (m, name)))
920-921 module Signature = struct
922 type t = Paths_types.Resolved_fragment.signature
923924- let rec split : t -> string * t option = function
925- | `Root _ -> ("", None)
926- | `Subst (_, p) -> split (sig_of_mod p)
927- | `Alias (_, p) -> split (sig_of_mod p)
928- | `OpaqueModule m -> split (sig_of_mod m)
929- | `Module (m, name) -> (
930- match split_parent m with
931- | Base _ -> (ModuleName.to_string name, None)
932- | Branch (base, m) ->
933- (ModuleName.to_string base, Some (`Module (m, name))))
934-935- let rec identifier : t -> Identifier.Signature.t = function
936 | `Root (`ModuleType i) -> Path.Resolved.parent_module_type_identifier i
937 | `Root (`Module i) -> Path.Resolved.parent_module_identifier i
938 | `Subst (s, _) -> Path.Resolved.parent_module_type_identifier s
939 | `Alias (i, _) -> Path.Resolved.parent_module_identifier i
940- | `Module (m, n) -> Identifier.Mk.module_ (identifier m, n)
941- | `OpaqueModule m -> identifier (sig_of_mod m)
942 end
943944 module Module = struct
945 type t = Paths_types.Resolved_fragment.module_
946-947- let rec split : t -> string * t option = function
948- | `Subst (_, p) -> split p
949- | `Alias (_, p) -> split p
950- | `Module (m, name) -> (
951- match split_parent m with
952- | Base _ -> (ModuleName.to_string name, None)
953- | Branch (base, m) ->
954- (ModuleName.to_string base, Some (`Module (m, name))))
955- | `OpaqueModule m -> split m
956 end
957958 module ModuleType = struct
959 type t = Paths_types.Resolved_fragment.module_type
960-961- let split : t -> string * t option = function
962- | `Module_type (m, name) -> (
963- match split_parent m with
964- | Base _ -> (ModuleTypeName.to_string name, None)
965- | Branch (base, m) ->
966- (ModuleName.to_string base, Some (`Module_type (m, name))))
967 end
968969 module Type = struct
970 type t = Paths_types.Resolved_fragment.type_
971-972- let split : t -> string * t option = function
973- | `Type (m, name) -> (
974- match split_parent m with
975- | Base _ -> (TypeName.to_string name, None)
976- | Branch (base, m) ->
977- (ModuleName.to_string base, Some (`Type (m, name))))
978- | `Class (m, name) -> (
979- match split_parent m with
980- | Base _ -> (ClassName.to_string name, None)
981- | Branch (base, m) ->
982- (ModuleName.to_string base, Some (`Class (m, name))))
983- | `ClassType (m, name) -> (
984- match split_parent m with
985- | Base _ -> (ClassTypeName.to_string name, None)
986- | Branch (base, m) ->
987- (ModuleName.to_string base, Some (`ClassType (m, name))))
988 end
989990 type leaf = Paths_types.Resolved_fragment.leaf
···995 | `Subst (s, _) -> Path.Resolved.identifier (s :> Path.Resolved.t)
996 | `Alias (p, _) ->
997 (Path.Resolved.parent_module_identifier p :> Identifier.t)
998- | `Module (m, n) -> Identifier.Mk.module_ (Signature.identifier m, n)
999 | `Module_type (m, n) ->
1000- Identifier.Mk.module_type (Signature.identifier m, n)
1001- | `Type (m, n) -> Identifier.Mk.type_ (Signature.identifier m, n)
1002- | `Class (m, n) -> Identifier.Mk.class_ (Signature.identifier m, n)
1003- | `ClassType (m, n) -> Identifier.Mk.class_type (Signature.identifier m, n)
01004 | `OpaqueModule m -> identifier (m :> t)
10051006 let rec is_hidden : t -> bool = function
1007- | `Root (`ModuleType r) ->
1008- Path.is_resolved_hidden ~weak_canonical_test:false
1009- (r :> Path.Resolved.t)
1010- | `Root (`Module r) ->
1011- Path.is_resolved_hidden ~weak_canonical_test:false
1012- (r :> Path.Resolved.t)
1013- | `Subst (s, _) ->
1014- Path.is_resolved_hidden ~weak_canonical_test:false
1015- (s :> Path.Resolved.t)
1016- | `Alias (s, _) ->
1017- Path.is_resolved_hidden ~weak_canonical_test:false
1018- (s :> Path.Resolved.t)
1019 | `Module (m, _)
1020 | `Module_type (m, _)
1021 | `Type (m, _)
···1026 end
10271028 type t = Paths_types.Fragment.any
1029-1030- type base_name =
1031- | Base of Resolved.root option
1032- | Branch of ModuleName.t * Paths_types.Fragment.signature
1033-1034- let rec split_parent : Paths_types.Fragment.signature -> base_name = function
1035- | `Root -> Base None
1036- | `Resolved r -> (
1037- match Resolved.split_parent r with
1038- | Resolved.Base i -> Base (Some i)
1039- | Resolved.Branch (base, m) -> Branch (base, `Resolved m))
1040- | `Dot (m, name) -> (
1041- match split_parent m with
1042- | Base None -> Branch (ModuleName.make_std name, `Root)
1043- | Base (Some i) -> Branch (ModuleName.make_std name, `Resolved (`Root i))
1044- | Branch (base, m) -> Branch (base, `Dot (m, name)))
10451046 module Signature = struct
1047 type t = Paths_types.Fragment.signature
1048-1049- let split : t -> string * t option = function
1050- | `Root -> ("", None)
1051- | `Resolved r ->
1052- let base, m = Resolved.Signature.split r in
1053- let m = match m with None -> None | Some m -> Some (`Resolved m) in
1054- (base, m)
1055- | `Dot (m, name) -> (
1056- match split_parent m with
1057- | Base _ -> (name, None)
1058- | Branch (base, m) ->
1059- (ModuleName.to_string base, Some (`Dot (m, name))))
1060 end
10611062 module Module = struct
1063 type t = Paths_types.Fragment.module_
1064-1065- let split : t -> string * t option = function
1066- | `Resolved r ->
1067- let base, m = Resolved.Module.split r in
1068- let m = match m with None -> None | Some m -> Some (`Resolved m) in
1069- (base, m)
1070- | `Dot (m, name) -> (
1071- match split_parent m with
1072- | Base _ -> (name, None)
1073- | Branch (base, m) ->
1074- (ModuleName.to_string base, Some (`Dot (m, name))))
1075 end
10761077 module ModuleType = struct
1078 type t = Paths_types.Fragment.module_type
1079-1080- let split : t -> string * t option = function
1081- | `Resolved r ->
1082- let base, m = Resolved.ModuleType.split r in
1083- let m = match m with None -> None | Some m -> Some (`Resolved m) in
1084- (base, m)
1085- | `Dot (m, name) -> (
1086- match split_parent m with
1087- | Base _ -> (name, None)
1088- | Branch (base, m) ->
1089- (ModuleName.to_string base, Some (`Dot (m, name))))
1090 end
10911092 module Type = struct
1093 type t = Paths_types.Fragment.type_
1094-1095- let split : t -> string * t option = function
1096- | `Resolved r ->
1097- let base, m = Resolved.Type.split r in
1098- let m = match m with None -> None | Some m -> Some (`Resolved m) in
1099- (base, m)
1100- | `Dot (m, name) -> (
1101- match split_parent m with
1102- | Base _ -> (name, None)
1103- | Branch (base, m) ->
1104- (ModuleName.to_string base, Some (`Dot (m, name))))
1105 end
11061107 type leaf = Paths_types.Fragment.leaf
···1118 | `Identifier id -> id
1119 | `Hidden s -> parent_signature_identifier (s :> signature)
1120 | `Alias (sub, orig) ->
1121- if Path.Resolved.Module.is_hidden ~weak_canonical_test:false sub then
1122 parent_signature_identifier (orig :> signature)
1123 else
1124 (Path.Resolved.parent_module_identifier sub
1125 :> Identifier.Signature.t)
1126 | `AliasModuleType (sub, orig) ->
1127- if Path.Resolved.ModuleType.is_hidden ~weak_canonical_test:false sub
1128- then parent_signature_identifier (orig :> signature)
1129 else
1130 (Path.Resolved.parent_module_type_identifier sub
1131 :> Identifier.Signature.t)
···22module Identifier = struct
23 type 'a id = 'a Paths_types.id = { iv : 'a; ihash : int; ikey : string }
2425+ module Id = Paths_types.Identifier
2627+ type t = Id.any
28+29+ type t_pv = Id.any_pv
3031 let rec name_aux : t -> string =
32 fun x ->
···5455 let name : [< t_pv ] id -> string = fun n -> name_aux (n :> t)
56000000000000000000000057 let rec label_parent_aux =
58+ let open Id in
59+ fun (n : t) ->
60 match n with
61 | { iv = `Result i; _ } -> label_parent_aux (i :> any)
62 | { iv = `CoreType _; _ } | { iv = `CoreException _; _ } -> assert false
···8990 type any = t
9192+ type any_pv = t_pv
93+94+ module type IdSig = sig
95+ type t
96+ type t_pv
97+ val equal : t -> t -> bool
98+ val hash : t -> int
99+ val compare : t -> t -> int
100+ end
101+102 module Any = struct
103 type t = any
104+ type t_pv = any_pv
105 let equal = equal
0106 let hash = hash
0107 let compare = compare
108 end
109110 module Signature = struct
111+ type t = Id.signature
112+ type t_pv = Id.signature_pv
00113 let equal = equal
0114 let hash = hash
0115 let compare = compare
00000000000000116 end
117118 module ClassSignature = struct
119+ type t = Id.class_signature
120+ type t_pv = Id.class_signature_pv
00121 let equal = equal
0122 let hash = hash
0123 let compare = compare
124 end
125126 module DataType = struct
127+ type t = Id.datatype
128+ type t_pv = Id.datatype_pv
0000000129 end
130131 module Parent = struct
132+ type t = Id.parent
133+ type t_pv = Id.parent_pv
0000000134 end
135136 module LabelParent = struct
137+ type t = Id.label_parent
138+ type t_pv = Id.label_parent_pv
00139 let equal = equal
0140 let hash = hash
0141 let compare = compare
142 end
143144 module RootModule = struct
145+ type t = Id.root_module
146+ type t_pv = Id.root_module_pv
00147 let equal = equal
0148 let hash = hash
0149 let compare = compare
00150 end
151152 module Module = struct
153+ type t = Id.module_
154+ type t_pv = Id.module_pv
00155 let equal = equal
0156 let hash = hash
0157 let compare = compare
00158 end
159160 module FunctorParameter = struct
161+ type t = Id.functor_parameter
162+ type t_pv = Id.functor_parameter_pv
00163 let equal = equal
0164 let hash = hash
0165 let compare = compare
166 end
167168 module FunctorResult = struct
169+ type t = Id.functor_result
170+ type t_pv = Id.functor_result_pv
0000000171 end
172173 module ModuleType = struct
174+ type t = Id.module_type
175+ type t_pv = Id.module_type_pv
00176 let equal = equal
0177 let hash = hash
0178 let compare = compare
179 end
180181 module Type = struct
182+ type t = Id.type_
183+ type t_pv = Id.type_pv
00184 let equal = equal
0185 let hash = hash
0186 let compare = compare
187 end
188189 module Constructor = struct
190+ type t = Id.constructor
191+ type t_pv = Id.constructor_pv
0000000192 end
193194 module Field = struct
195+ type t = Id.field
196+ type t_pv = Id.field_pv
0000000197 end
198199 module Extension = struct
200+ type t = Id.extension
201+ type t_pv = Id.extension_pv
0000000202 end
203204 module Exception = struct
205+ type t = Id.exception_
206+ type t_pv = Id.exception_pv
0000000207 end
208209 module Value = struct
210+ type t = Id.value
211+ type t_pv = Id.value_pv
0000000212 end
213214 module Class = struct
215+ type t = Id.class_
216+ type t_pv = Id.class_pv
00217 let equal = equal
0218 let hash = hash
0219 let compare = compare
220 end
221222 module ClassType = struct
223+ type t = Id.class_type
224+ type t_pv = Id.class_type_pv
00225 let equal = equal
0226 let hash = hash
0227 let compare = compare
228 end
229230 module Method = struct
231+ type t = Id.method_
232+ type t_pv = Id.method_pv
0000000233 end
234235 module InstanceVariable = struct
236+ type t = Id.instance_variable
237+ type t_pv = Id.instance_variable_pv
0000000238 end
239240 module Label = struct
241 type t = Paths_types.Identifier.label
0242 type t_pv = Paths_types.Identifier.label_pv
0243 let equal = equal
0244 let hash = hash
0245 let compare = compare
246 end
247248 module Page = struct
249+ type t = Id.page
250+ type t_pv = Id.page_pv
0000000251 end
252253 module ContainerPage = struct
254+ type t = Id.container_page
255+ type t_pv = Id.container_page_pv
0000000256 end
257258 module SourceDir = struct
259+ type t = Id.source_dir
260+ type t_pv = Id.source_dir_pv
261 let equal = equal
262 let hash = hash
263 let compare = compare
···267 end
268269 module SourcePage = struct
270+ type t = Id.source_page
271+ type t_pv = Id.source_page_pv
272 let equal = equal
00273 let name { iv = `SourcePage (p, name); _ } = SourceDir.name p ^ name
274+275 end
276277 module OdocId = struct
278+ type t = Id.odoc_id
279+ type t_pv = Id.odoc_id_pv
0000000280 end
281282 module Path = struct
283 module Module = struct
284+ type t = Id.path_module
285+ type t_pv = Id.path_module_pv
00286 let equal = equal
0287 let hash = hash
0288 let compare = compare
00289 end
290291 module ModuleType = struct
292+ type t = Id.path_module_type
293+ type t_pv = Id.module_type_pv
294 let equal = equal
0295 let hash = hash
0296 let compare = compare
297 end
298299 module Type = struct
300+ type t = Id.path_type
301+ type t_pv = Id.path_type_pv
00302 let equal = equal
0303 let hash = hash
0304 let compare = compare
305 end
306307 module ClassType = struct
308+ type t = Id.path_class_type
309+ type t_pv = Id.path_class_type_pv
00310 let equal = equal
0311 let hash = hash
0312 let compare = compare
313 end
314315+ type t = Id.path_any
316 end
317318 module Maps = struct
···592593 let is_hidden m =
594 is_resolved_hidden (m : t :> Paths_types.Resolved_path.any)
000000000000000000000000000595 end
596597 module ModuleType = struct
598 type t = Paths_types.Resolved_path.module_type
000599 end
600601 module Type = struct
602 type t = Paths_types.Resolved_path.type_
000000603 end
604605 module ClassType = struct
606 type t = Paths_types.Resolved_path.class_type
000000607 end
608609 let rec identifier : t -> Identifier.t = function
···642643 module Module = struct
644 type t = Paths_types.Path.module_
0000000000645 end
646647 module ModuleType = struct
···665666 type root = Paths_types.Resolved_fragment.root
6670000000000000000000668 module Signature = struct
669 type t = Paths_types.Resolved_fragment.signature
670671+ let rec sgidentifier : t -> Identifier.Signature.t = function
00000000000672 | `Root (`ModuleType i) -> Path.Resolved.parent_module_type_identifier i
673 | `Root (`Module i) -> Path.Resolved.parent_module_identifier i
674 | `Subst (s, _) -> Path.Resolved.parent_module_type_identifier s
675 | `Alias (i, _) -> Path.Resolved.parent_module_identifier i
676+ | `Module (m, n) -> Identifier.Mk.module_ (sgidentifier m, n)
677+ | `OpaqueModule m -> sgidentifier (m :> t)
678 end
679680 module Module = struct
681 type t = Paths_types.Resolved_fragment.module_
0000000000682 end
683684 module ModuleType = struct
685 type t = Paths_types.Resolved_fragment.module_type
0000000686 end
687688 module Type = struct
689 type t = Paths_types.Resolved_fragment.type_
00000000000000000690 end
691692 type leaf = Paths_types.Resolved_fragment.leaf
···697 | `Subst (s, _) -> Path.Resolved.identifier (s :> Path.Resolved.t)
698 | `Alias (p, _) ->
699 (Path.Resolved.parent_module_identifier p :> Identifier.t)
700+ | `Module (m, n) -> Identifier.Mk.module_ (Signature.sgidentifier m, n)
701 | `Module_type (m, n) ->
702+ Identifier.Mk.module_type (Signature.sgidentifier m, n)
703+ | `Type (m, n) -> Identifier.Mk.type_ (Signature.sgidentifier m, n)
704+ | `Class (m, n) -> Identifier.Mk.class_ (Signature.sgidentifier m, n)
705+ | `ClassType (m, n) ->
706+ Identifier.Mk.class_type (Signature.sgidentifier m, n)
707 | `OpaqueModule m -> identifier (m :> t)
708709 let rec is_hidden : t -> bool = function
710+ | `Root (`ModuleType r) -> Path.Resolved.(is_hidden (r :> t))
711+ | `Root (`Module r) -> Path.Resolved.(is_hidden (r :> t))
712+ | `Subst (s, _) -> Path.Resolved.(is_hidden (s :> t))
713+ | `Alias (s, _) -> Path.Resolved.(is_hidden (s :> t))
00000000714 | `Module (m, _)
715 | `Module_type (m, _)
716 | `Type (m, _)
···721 end
722723 type t = Paths_types.Fragment.any
0000000000000000724725 module Signature = struct
726 type t = Paths_types.Fragment.signature
000000000000727 end
728729 module Module = struct
730 type t = Paths_types.Fragment.module_
00000000000731 end
732733 module ModuleType = struct
734 type t = Paths_types.Fragment.module_type
00000000000735 end
736737 module Type = struct
738 type t = Paths_types.Fragment.type_
00000000000739 end
740741 type leaf = Paths_types.Fragment.leaf
···752 | `Identifier id -> id
753 | `Hidden s -> parent_signature_identifier (s :> signature)
754 | `Alias (sub, orig) ->
755+ if Path.Resolved.(is_hidden (sub :> t)) then
756 parent_signature_identifier (orig :> signature)
757 else
758 (Path.Resolved.parent_module_identifier sub
759 :> Identifier.Signature.t)
760 | `AliasModuleType (sub, orig) ->
761+ if Path.Resolved.(is_hidden (sub :> t)) then
762+ parent_signature_identifier (orig :> signature)
763 else
764 (Path.Resolved.parent_module_type_identifier sub
765 :> Identifier.Signature.t)
+82-333
src/model/paths.mli
···2425 type 'a id = 'a Paths_types.id = { iv : 'a; ihash : int; ikey : string }
2627- module Any : sig
28- type t = Paths_types.Identifier.any
29-30 val equal : t -> t -> bool
31-32 val hash : t -> int
33-34 val compare : t -> t -> int
35 end
3637- module RootModule : sig
38- type t = Paths_types.Identifier.root_module
3940- type t_pv = Paths_types.Identifier.root_module_pv
4142- val equal : t -> t -> bool
04344- val hash : t -> int
04546- val compare : t -> t -> int
04748- val name : t -> string
49- end
5051- module Signature : sig
52- type t = Paths_types.Identifier.signature
5354- type t_pv = Paths_types.Identifier.signature_pv
0005556- val equal : t -> t -> bool
05758- val hash : t -> int
5960- val compare : t -> t -> int
6162- val root : [< t_pv ] id -> RootModule.t
063 end
6465- module ClassSignature : sig
66- type t = Paths_types.Identifier.class_signature
67-68- type t_pv = Paths_types.Identifier.class_signature_pv
69-70- val equal : t -> t -> bool
71-72- val hash : t -> int
7374- val compare : t -> t -> int
75- end
7677 module DataType : sig
78- type t = Paths_types.Identifier.datatype
79-80- type t_pv = Paths_types.Identifier.datatype_pv
81-82- val equal : t -> t -> bool
83-84- val hash : t -> int
85-86- val compare : t -> t -> int
87 end
88-89 module Parent : sig
90- type t = Paths_types.Identifier.parent
91-92- type t_pv = Paths_types.Identifier.parent_pv
93-94- val equal : t -> t -> bool
95-96- val hash : t -> int
97-98- val compare : t -> t -> int
99- end
100-101- module LabelParent : sig
102- type t = Paths_types.Identifier.label_parent
103-104- type t_pv = Paths_types.Identifier.label_parent_pv
105-106- val equal : t -> t -> bool
107-108- val hash : t -> int
109-110- val compare : t -> t -> int
111- end
112-113- module Module : sig
114- type t = Paths_types.Identifier.module_
115-116- type t_pv = Paths_types.Identifier.module_pv
117-118- val equal : t -> t -> bool
119-120- val hash : t -> int
121-122- val compare : t -> t -> int
123-124- val root : t -> RootModule.t
125- end
126-127- module FunctorParameter : sig
128- type t = Paths_types.Identifier.functor_parameter
129-130- type t_pv = Paths_types.Identifier.functor_parameter_pv
131-132- val equal : t -> t -> bool
133-134- val hash : t -> int
135-136- val compare : t -> t -> int
137 end
138139 module FunctorResult : sig
140- type t = Paths_types.Identifier.functor_result
141-142- type t_pv = Paths_types.Identifier.functor_result_pv
143-144- val equal : t -> t -> bool
145-146- val hash : t -> int
147-148- val compare : t -> t -> int
149- end
150-151- module ModuleType : sig
152- type t = Paths_types.Identifier.module_type
153-154- type t_pv = Paths_types.Identifier.module_type_pv
155-156- val equal : t -> t -> bool
157-158- val hash : t -> int
159-160- val compare : t -> t -> int
161- end
162-163- module Type : sig
164- type t = Paths_types.Identifier.type_
165-166- type t_pv = Paths_types.Identifier.type_pv
167-168- val equal : t -> t -> bool
169-170- val hash : t -> int
171-172- val compare : t -> t -> int
173 end
174175 module Constructor : sig
176- type t = Paths_types.Identifier.constructor
177-178- type t_pv = Paths_types.Identifier.constructor_pv
179-180- val equal : t -> t -> bool
181-182- val hash : t -> int
183-184- val compare : t -> t -> int
185 end
186187 module Field : sig
188- type t = Paths_types.Identifier.field
189-190- type t_pv = Paths_types.Identifier.field_pv
191-192- val equal : t -> t -> bool
193-194- val hash : t -> int
195-196- val compare : t -> t -> int
197 end
198199 module Extension : sig
200- type t = Paths_types.Identifier.extension
201-202- type t_pv = Paths_types.Identifier.extension_pv
203-204- val equal : t -> t -> bool
205-206- val hash : t -> int
207-208- val compare : t -> t -> int
209 end
210211 module Exception : sig
212- type t = Paths_types.Identifier.exception_
213-214- type t_pv = Paths_types.Identifier.exception_pv
215-216- val equal : t -> t -> bool
217-218- val hash : t -> int
219-220- val compare : t -> t -> int
221 end
222223 module Value : sig
224- type t = Paths_types.Identifier.value
225-226- type t_pv = Paths_types.Identifier.value_pv
227-228- val equal : t -> t -> bool
229-230- val hash : t -> int
231-232- val compare : t -> t -> int
233- end
234-235- module Class : sig
236- type t = Paths_types.Identifier.class_
237-238- type t_pv = Paths_types.Identifier.class_pv
239-240- val equal : t -> t -> bool
241-242- val hash : t -> int
243-244- val compare : t -> t -> int
245- end
246-247- module ClassType : sig
248- type t = Paths_types.Identifier.class_type
249-250- type t_pv = Paths_types.Identifier.class_type_pv
251-252- val equal : t -> t -> bool
253-254- val hash : t -> int
255-256- val compare : t -> t -> int
257 end
258259 module Method : sig
260- type t = Paths_types.Identifier.method_
261-262- type t_pv = Paths_types.Identifier.method_pv
263-264- val equal : t -> t -> bool
265-266- val hash : t -> int
267-268- val compare : t -> t -> int
269 end
270271 module InstanceVariable : sig
272- type t = Paths_types.Identifier.instance_variable
273-274- type t_pv = Paths_types.Identifier.instance_variable_pv
275-276- val equal : t -> t -> bool
277-278- val hash : t -> int
279-280- val compare : t -> t -> int
281- end
282-283- module Label : sig
284- type t = Paths_types.Identifier.label
285-286- type t_pv = Paths_types.Identifier.label_pv
287-288- val equal : t -> t -> bool
289-290- val hash : t -> int
291-292- val compare : t -> t -> int
293 end
0000294295 module Page : sig
296- type t = Paths_types.Identifier.page
297-298- type t_pv = Paths_types.Identifier.page_pv
299-300- val equal : t -> t -> bool
301-302- val hash : t -> int
303-304- val compare : t -> t -> int
305 end
306307 module ContainerPage : sig
308- type t = Paths_types.Identifier.container_page
309-310- type t_pv = Paths_types.Identifier.container_page_pv
311-312- val equal : t -> t -> bool
313-314- val hash : t -> int
315-316- val compare : t -> t -> int
317- end
318-319- module SourceDir : sig
320- type t = Paths_types.Identifier.source_dir
321- type t_pv = Paths_types.Identifier.source_dir_pv
322- val equal : t -> t -> bool
323- val hash : t -> int
324- val compare : t -> t -> int
325- val name : t -> string
326 end
327328 module SourcePage : sig
329- type t = Paths_types.Identifier.source_page
330- type t_pv = Paths_types.Identifier.source_page_pv
0331 val equal : t -> t -> bool
332- val hash : t -> int
333- val compare : t -> t -> int
334- val name : t -> string
335 end
336-337 module OdocId : sig
338- type t = Paths_types.Identifier.odoc_id
339-340- type t_pv = Paths_types.Identifier.odoc_id_pv
341-342- val equal : t -> t -> bool
343-344- val hash : t -> int
345-346- val compare : t -> t -> int
347 end
348349 module Path : sig
350- module Module : sig
351- type t = Paths_types.Identifier.path_module
352-353- type t_pv = Paths_types.Identifier.path_module_pv
354-355- val equal : t -> t -> bool
356-357- val hash : t -> int
358-359- val compare : t -> t -> int
360-361- val root : t -> RootModule.t
362- end
363-364- module ModuleType : sig
365- type t = Paths_types.Identifier.path_module_type
366-367- val equal : t -> t -> bool
368-369- val hash : t -> int
370-371- val compare : t -> t -> int
372- end
373-374- module Type : sig
375- type t = Paths_types.Identifier.path_type
376-377- type t_pv = Paths_types.Identifier.path_type_pv
378379- val equal : t -> t -> bool
0380381- val hash : t -> int
0382383- val compare : t -> t -> int
384- end
00385386- module ClassType : sig
387- type t = Paths_types.Identifier.path_class_type
388-389- type t_pv = Paths_types.Identifier.path_class_type_pv
390-391- val equal : t -> t -> bool
392-393- val hash : t -> int
394-395- val compare : t -> t -> int
396- end
397-398- type t = Paths_types.Identifier.path_any
399 end
400401- type t_pv = Paths_types.Identifier.any_pv
402403- type t = Paths_types.Identifier.any
404405 val hash : t -> int
406407 val name : [< t_pv ] id -> string
408409- val root : [< t_pv ] id -> RootModule.t_pv id option
410411 val compare : t -> t -> int
412···523524 val is_hidden : t -> weak_canonical_test:bool -> bool
525526- val identifier : t -> Identifier.Path.Module.t
527528- val root : t -> string option
529 end
530531 module ModuleType : sig
532 type t = Paths_types.Resolved_path.module_type
533534- val is_hidden : t -> weak_canonical_test:bool -> bool
535536 (* val identifier : t -> Identifier.Path.ModuleType.t *)
537 end
···539 module Type : sig
540 type t = Paths_types.Resolved_path.type_
541542- val of_ident : Identifier.Path.Type.t -> t
543544- val is_hidden : t -> bool
545546 (* val identifier : t -> Identifier.Path.Type.t *)
547 end
···549 module ClassType : sig
550 type t = Paths_types.Resolved_path.class_type
551552- val of_ident : Identifier.Path.ClassType.t -> t
553554- val is_hidden : t -> bool
555 end
556557 type t = Paths_types.Resolved_path.any
···564 module Module : sig
565 type t = Paths_types.Path.module_
566567- val root : t -> string option
568 end
569570 module ModuleType : sig
···589 module Resolved : sig
590 module Signature : sig
591 type t = Paths_types.Resolved_fragment.signature
592-593- val split : t -> string * t option
594 end
595596 module Module : sig
597 type t = Paths_types.Resolved_fragment.module_
598-599- val split : t -> string * t option
600 end
601602 module ModuleType : sig
603 type t = Paths_types.Resolved_fragment.module_type
604-605- val split : t -> string * t option
606 end
607608 module Type : sig
609 type t = Paths_types.Resolved_fragment.type_
610-611- val split : t -> string * t option
612 end
613614 type leaf = Paths_types.Resolved_fragment.leaf
···624625 module Signature : sig
626 type t = Paths_types.Fragment.signature
627-628- val split : t -> string * t option
629 end
630631 module Module : sig
632 type t = Paths_types.Fragment.module_
633-634- val split : t -> string * t option
635 end
636637 module ModuleType : sig
638 type t = Paths_types.Fragment.module_type
639-640- val split : t -> string * t option
641 end
642643 module Type : sig
644 type t = Paths_types.Fragment.type_
645-646- val split : t -> string * t option
647 end
648649 type leaf = Paths_types.Fragment.leaf
···2425 type 'a id = 'a Paths_types.id = { iv : 'a; ihash : int; ikey : string }
2627+ module type IdSig = sig
28+ type t
29+ type t_pv
30 val equal : t -> t -> bool
031 val hash : t -> int
032 val compare : t -> t -> int
33 end
3435+ module Id = Paths_types.Identifier
03637+ module Any : IdSig with type t = Id.any and type t_pv = Id.any_pv
3839+ module RootModule :
40+ IdSig with type t = Id.root_module and type t_pv = Id.root_module_pv
4142+ module Signature :
43+ IdSig with type t = Id.signature and type t_pv = Id.signature_pv
4445+ module ClassSignature :
46+ IdSig with type t = Id.class_signature and type t_pv = Id.class_signature_pv
4748+ module LabelParent :
49+ IdSig with type t = Id.label_parent and type t_pv = Id.label_parent_pv
5051+ module Module : IdSig with type t = Id.module_ and type t_pv = Id.module_pv
05253+ module FunctorParameter :
54+ IdSig
55+ with type t = Id.functor_parameter
56+ and type t_pv = Id.functor_parameter_pv
5758+ module ModuleType :
59+ IdSig with type t = Id.module_type and type t_pv = Id.module_type_pv
6061+ module Type : IdSig with type t = Id.type_ and type t_pv = Id.type_pv
6263+ module SourceDir : sig
6465+ include IdSig with type t = Id.source_dir and type t_pv = Id.source_dir_pv
66+ val name : t -> string
67 end
6869+ module Class : IdSig with type t = Id.class_ and type t_pv = Id.class_pv
00000007071+ module ClassType :
72+ IdSig with type t = Id.class_type and type t_pv = Id.class_type_pv
7374 module DataType : sig
75+ type t = Id.datatype
76+ type t_pv = Id.datatype_pv
000000077 end
078 module Parent : sig
79+ type t = Id.parent
80+ type t_pv = Id.parent_pv
00000000000000000000000000000000000000000000081 end
8283 module FunctorResult : sig
84+ type t = Id.functor_result
85+ type t_pv = Id.functor_result_pv
000000000000000000000000000000086 end
8788 module Constructor : sig
89+ type t = Id.constructor
90+ type t_pv = Id.constructor_pv
000000091 end
9293 module Field : sig
94+ type t = Id.field
95+ type t_pv = Id.field_pv
000000096 end
9798 module Extension : sig
99+ type t = Id.extension
100+ type t_pv = Id.extension_pv
0000000101 end
102103 module Exception : sig
104+ type t = Id.exception_
105+ type t_pv = Id.exception_pv
0000000106 end
107108 module Value : sig
109+ type t = Id.value
110+ type t_pv = Id.value_pv
0000000000000000000000000000000111 end
112113 module Method : sig
114+ type t = Id.method_
115+ type t_pv = Id.method_pv
0000000116 end
117118 module InstanceVariable : sig
119+ type t = Id.instance_variable
120+ type t_pv = Id.instance_variable_pv
0000000000000000000121 end
122+ module Label :
123+ IdSig
124+ with type t = Paths_types.Identifier.label
125+ and type t_pv = Paths_types.Identifier.label_pv
126127 module Page : sig
128+ type t = Id.page
129+ type t_pv = Id.page_pv
0000000130 end
131132 module ContainerPage : sig
133+ type t = Id.container_page
134+ type t_pv = Id.container_page_pv
0000000000000000135 end
136137 module SourcePage : sig
138+ type t = Id.source_page
139+ type t_pv = Id.source_page_pv
140+ val name : t -> string
141 val equal : t -> t -> bool
000142 end
0143 module OdocId : sig
144+ type t = Id.odoc_id
145+ type t_pv = Id.odoc_id_pv
0000000146 end
147148 module Path : sig
149+ module Module :
150+ IdSig with type t = Id.path_module and type t_pv = Id.path_module_pv
00000000000000000000000000151152+ module ModuleType :
153+ IdSig with type t = Id.path_module_type and type t_pv = Id.module_type_pv
154155+ module Type :
156+ IdSig with type t = Id.path_type and type t_pv = Id.path_type_pv
157158+ module ClassType :
159+ IdSig
160+ with type t = Id.path_class_type
161+ and type t_pv = Id.path_class_type_pv
162163+ type t = Id.path_any
000000000000164 end
165166+ type t = Id.any
167168+ type t_pv = Id.any_pv
169170 val hash : t -> int
171172 val name : [< t_pv ] id -> string
173174+ (* val root : [< t_pv ] id -> RootModule.t_pv id option *)
175176 val compare : t -> t -> int
177···288289 val is_hidden : t -> weak_canonical_test:bool -> bool
290291+ (* val identifier : t -> Identifier.Path.Module.t *)
292293+ (* val root : t -> string option *)
294 end
295296 module ModuleType : sig
297 type t = Paths_types.Resolved_path.module_type
298299+ (* val is_hidden : t -> weak_canonical_test:bool -> bool *)
300301 (* val identifier : t -> Identifier.Path.ModuleType.t *)
302 end
···304 module Type : sig
305 type t = Paths_types.Resolved_path.type_
306307+ (* val of_ident : Identifier.Path.Type.t -> t *)
308309+ (* val is_hidden : t -> bool *)
310311 (* val identifier : t -> Identifier.Path.Type.t *)
312 end
···314 module ClassType : sig
315 type t = Paths_types.Resolved_path.class_type
316317+ (* val of_ident : Identifier.Path.ClassType.t -> t *)
318319+ (* val is_hidden : t -> bool *)
320 end
321322 type t = Paths_types.Resolved_path.any
···329 module Module : sig
330 type t = Paths_types.Path.module_
331332+ (* val root : t -> string option *)
333 end
334335 module ModuleType : sig
···354 module Resolved : sig
355 module Signature : sig
356 type t = Paths_types.Resolved_fragment.signature
00357 end
358359 module Module : sig
360 type t = Paths_types.Resolved_fragment.module_
00361 end
362363 module ModuleType : sig
364 type t = Paths_types.Resolved_fragment.module_type
00365 end
366367 module Type : sig
368 type t = Paths_types.Resolved_fragment.type_
00369 end
370371 type leaf = Paths_types.Resolved_fragment.leaf
···381382 module Signature : sig
383 type t = Paths_types.Fragment.signature
00384 end
385386 module Module : sig
387 type t = Paths_types.Fragment.module_
00388 end
389390 module ModuleType : sig
391 type t = Paths_types.Fragment.module_type
00392 end
393394 module Type : sig
395 type t = Paths_types.Fragment.type_
00396 end
397398 type leaf = Paths_types.Fragment.leaf
+1-3
src/odoc/compile.ml
···309 | { Paths.Identifier.iv = `Page _; _ } as parent_id ->
310 let name = Paths.Identifier.Mk.source_page (parent_id, name) in
311 if
312- List.exists
313- (Paths.Identifier.SourcePage.equal name)
314- page.source_children
315 then Ok (Some name)
316 else err_not_parent ()
317 | { iv = `LeafPage _; _ } -> err_not_parent ())
···309 | { Paths.Identifier.iv = `Page _; _ } as parent_id ->
310 let name = Paths.Identifier.Mk.source_page (parent_id, name) in
311 if
312+ List.exists (Paths.Identifier.SourcePage.equal name) page.source_children
00313 then Ok (Some name)
314 else err_not_parent ()
315 | { iv = `LeafPage _; _ } -> err_not_parent ())
+3-5
src/xref2/cpath.ml
···219220and is_resolved_module_type_hidden : Resolved.module_type -> bool = function
221 | `Local _ -> false
222- | `Gpath p ->
223- Odoc_model.Paths.Path.Resolved.ModuleType.is_hidden
224- ~weak_canonical_test:false p
225 | `Substituted p -> is_resolved_module_type_hidden p
226 | `ModuleType (p, _) -> is_resolved_parent_hidden ~weak_canonical_test:false p
227 | `SubstT (p1, p2) ->
···247248and is_resolved_type_hidden : Resolved.type_ -> bool = function
249 | `Local _ -> false
250- | `Gpath p -> Odoc_model.Paths.Path.Resolved.Type.is_hidden p
251 | `Substituted p -> is_resolved_type_hidden p
252 | `CanonicalType (_, `Resolved _) -> false
253 | `CanonicalType (p, _) -> is_resolved_type_hidden p
···256257and is_resolved_class_type_hidden : Resolved.class_type -> bool = function
258 | `Local _ -> false
259- | `Gpath p -> Odoc_model.Paths.Path.Resolved.ClassType.is_hidden p
260 | `Substituted p -> is_resolved_class_type_hidden p
261 | `Class (p, _) | `ClassType (p, _) ->
262 is_resolved_parent_hidden ~weak_canonical_test:false p
···219220and is_resolved_module_type_hidden : Resolved.module_type -> bool = function
221 | `Local _ -> false
222+ | `Gpath p -> Odoc_model.Paths.Path.Resolved.(is_hidden (p :> t))
00223 | `Substituted p -> is_resolved_module_type_hidden p
224 | `ModuleType (p, _) -> is_resolved_parent_hidden ~weak_canonical_test:false p
225 | `SubstT (p1, p2) ->
···245246and is_resolved_type_hidden : Resolved.type_ -> bool = function
247 | `Local _ -> false
248+ | `Gpath p -> Odoc_model.Paths.Path.Resolved.(is_hidden (p :> t))
249 | `Substituted p -> is_resolved_type_hidden p
250 | `CanonicalType (_, `Resolved _) -> false
251 | `CanonicalType (p, _) -> is_resolved_type_hidden p
···254255and is_resolved_class_type_hidden : Resolved.class_type -> bool = function
256 | `Local _ -> false
257+ | `Gpath p -> Odoc_model.Paths.Path.Resolved.(is_hidden (p :> t))
258 | `Substituted p -> is_resolved_class_type_hidden p
259 | `Class (p, _) | `ClassType (p, _) ->
260 is_resolved_parent_hidden ~weak_canonical_test:false p
+1-1
src/xref2/link.ml
···847 let hidden_path =
848 match equation.Equation.manifest with
849 | Some (Constr (`Resolved path, params))
850- when Paths.Path.Resolved.Type.is_hidden path
851 || Paths.Path.Resolved.(identifier (path :> t))
852 = (t.id :> Paths.Identifier.t) ->
853 Some (path, params)
···847 let hidden_path =
848 match equation.Equation.manifest with
849 | Some (Constr (`Resolved path, params))
850+ when Paths.Path.Resolved.(is_hidden (path :> t))
851 || Paths.Path.Resolved.(identifier (path :> t))
852 = (t.id :> Paths.Identifier.t) ->
853 Some (path, params)