• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

ocaml / odoc / 2994

09 Jul 2025 05:27PM UTC coverage: 73.054% (-0.06%) from 73.118%
2994

Pull #1362

github

web-flow
Merge 158fd7cb3 into 64ef0eb66
Pull Request #1362: Voodoo occurrences

10373 of 14199 relevant lines covered (73.05%)

7148.43 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

67.91
/src/model/paths.ml
1
(*
2
 * Copyright (c) 2014 Leo White <lpw25@cl.cam.ac.uk>
3
 *
4
 * Permission to use, copy, modify, and distribute this software for any
5
 * purpose with or without fee is hereby granted, provided that the above
6
 * copyright notice and this permission notice appear in all copies.
7
 *
8
 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9
 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10
 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11
 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12
 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13
 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14
 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15
 *)
16

17
module Ocaml_ident = Ident
18
module Ocaml_env = Env
19

20
open Names
21

22
module Identifier = struct
23
  type 'a id = 'a Paths_types.id = { iv : 'a; ihash : int; ikey : string }
24

25
  module Id = Paths_types.Identifier
26

27
  type t = Id.any
28

29
  type t_pv = Id.any_pv
30

31
  let rec name_aux : t -> string =
32
   fun x ->
33
    match x.iv with
322,015✔
34
    | `Root (_, name) -> ModuleName.to_string name
49,037✔
35
    | `Page (_, name) -> PageName.to_string name
31✔
36
    | `LeafPage (_, name) -> PageName.to_string name
58✔
37
    | `Module (_, name) -> ModuleName.to_string name
63,920✔
38
    | `Parameter (_, name) -> ModuleName.to_string name
2,148✔
39
    | `Result x -> name_aux (x :> t)
×
40
    | `ModuleType (_, name) -> ModuleTypeName.to_string name
35,765✔
41
    | `Type (_, name) -> TypeName.to_string name
165,843✔
42
    | `Constructor (_, name) -> ConstructorName.to_string name
998✔
43
    | `Field (_, name) -> FieldName.to_string name
226✔
44
    | `Extension (_, name) -> ExtensionName.to_string name
469✔
45
    | `ExtensionDecl (_, _, name) -> ExtensionName.to_string name
2✔
46
    | `Exception (_, name) -> ExceptionName.to_string name
111✔
47
    | `Value (_, name) -> ValueName.to_string name
2,179✔
48
    | `Class (_, name) -> TypeName.to_string name
264✔
49
    | `ClassType (_, name) -> TypeName.to_string name
142✔
50
    | `Method (_, name) -> MethodName.to_string name
90✔
51
    | `InstanceVariable (_, name) -> InstanceVariableName.to_string name
17✔
52
    | `Label (_, name) -> LabelName.to_string name
707✔
53
    | `SourcePage (_, name) -> name
2✔
54
    | `SourceLocation (x, anchor) ->
×
55
        name_aux (x :> t) ^ "#" ^ DefName.to_string anchor
×
56
    | `SourceLocationMod x -> name_aux (x :> t)
×
57
    | `SourceLocationInternal (x, anchor) ->
×
58
        name_aux (x :> t) ^ "#" ^ LocalName.to_string anchor
×
59
    | `AssetFile (_, name) -> AssetName.to_string name
6✔
60

61
  let rec is_hidden : t -> bool =
62
   fun x ->
63
    match x.iv with
149,572✔
64
    | `Root (_, name) -> ModuleName.is_hidden name
2,183✔
65
    | `Page (_, _) -> false
×
66
    | `LeafPage (_, _) -> false
×
67
    | `Module (_, name) -> ModuleName.is_hidden name
3,624✔
68
    | `Parameter (_, name) -> ModuleName.is_hidden name
69✔
69
    | `Result x -> is_hidden (x :> t)
67✔
70
    | `ModuleType (_, name) -> ModuleTypeName.is_hidden name
1,025✔
71
    | `Type (_, name) -> TypeName.is_hidden name
26,012✔
72
    | `Constructor (parent, _) -> is_hidden (parent :> t)
239✔
73
    | `Field (parent, _) -> is_hidden (parent :> t)
2✔
74
    | `Extension (parent, _) -> is_hidden (parent :> t)
34✔
75
    | `ExtensionDecl (parent, _, _) -> is_hidden (parent :> t)
×
76
    | `Exception (parent, _) -> is_hidden (parent :> t)
35✔
77
    | `Value (_, name) -> ValueName.is_hidden name
116,235✔
78
    | `Class (_, name) -> TypeName.is_hidden name
31✔
79
    | `ClassType (_, name) -> TypeName.is_hidden name
14✔
80
    | `Method (parent, _) -> is_hidden (parent :> t)
2✔
81
    | `InstanceVariable (parent, _) -> is_hidden (parent :> t)
×
82
    | `Label (parent, _) -> is_hidden (parent :> t)
×
83
    | `SourceLocationMod _ | `SourceLocation _ | `SourcePage _
×
84
    | `SourceLocationInternal _ | `AssetFile _ ->
×
85
        false
86

87
  let name : [< t_pv ] id -> string = fun n -> name_aux (n :> t)
322,015✔
88

89
  let rec full_name_aux : t -> string list =
90
   fun x ->
91
    match x.iv with
240,389✔
92
    | `Root (_, name) -> [ ModuleName.to_string name ]
64,069✔
93
    | `Page (None, name) -> [ PageName.to_string name ]
29✔
94
    | `Page (Some parent, name) ->
6✔
95
        PageName.to_string name :: full_name_aux (parent :> t)
6✔
96
    | `LeafPage (None, name) -> [ PageName.to_string name ]
2✔
97
    | `LeafPage (Some parent, name) ->
×
98
        PageName.to_string name :: full_name_aux (parent :> t)
×
99
    | `Module (parent, name) ->
39,263✔
100
        ModuleName.to_string name :: full_name_aux (parent :> t)
39,263✔
101
    | `Parameter (parent, name) ->
×
102
        ModuleName.to_string name :: full_name_aux (parent :> t)
×
103
    | `Result x -> full_name_aux (x :> t)
41,779✔
104
    | `ModuleType (parent, name) ->
32,176✔
105
        ModuleTypeName.to_string name :: full_name_aux (parent :> t)
32,176✔
106
    | `Type (parent, name) ->
11,876✔
107
        TypeName.to_string name :: full_name_aux (parent :> t)
11,876✔
108
    | `Constructor (parent, name) ->
243✔
109
        ConstructorName.to_string name :: full_name_aux (parent :> t)
243✔
110
    | `Field (parent, name) ->
2✔
111
        FieldName.to_string name :: full_name_aux (parent :> t)
2✔
112
    | `Extension (parent, name) ->
3✔
113
        ExtensionName.to_string name :: full_name_aux (parent :> t)
3✔
114
    | `ExtensionDecl (parent, _, name) ->
×
115
        ExtensionName.to_string name :: full_name_aux (parent :> t)
×
116
    | `Exception (parent, name) ->
11✔
117
        ExceptionName.to_string name :: full_name_aux (parent :> t)
11✔
118
    | `Value (parent, name) ->
50,897✔
119
        ValueName.to_string name :: full_name_aux (parent :> t)
50,897✔
120
    | `Class (parent, name) ->
3✔
121
        TypeName.to_string name :: full_name_aux (parent :> t)
3✔
122
    | `ClassType (parent, name) ->
1✔
123
        TypeName.to_string name :: full_name_aux (parent :> t)
1✔
124
    | `Method (parent, name) ->
2✔
125
        MethodName.to_string name :: full_name_aux (parent :> t)
2✔
126
    | `InstanceVariable (parent, name) ->
×
127
        InstanceVariableName.to_string name :: full_name_aux (parent :> t)
×
128
    | `Label (parent, name) ->
×
129
        LabelName.to_string name :: full_name_aux (parent :> t)
×
130
    | `SourceLocation (parent, name) ->
×
131
        DefName.to_string name :: full_name_aux (parent :> t)
×
132
    | `SourceLocationInternal (parent, name) ->
×
133
        LocalName.to_string name :: full_name_aux (parent :> t)
×
134
    | `SourceLocationMod name -> full_name_aux (name :> t)
×
135
    | `SourcePage (parent, name) -> name :: full_name_aux (parent :> t)
27✔
136
    | `AssetFile (parent, name) ->
×
137
        AssetName.to_string name :: full_name_aux (parent :> t)
×
138

139
  let fullname : [< t_pv ] id -> string list =
140
   fun n -> List.rev @@ full_name_aux (n :> t)
64,100✔
141

142
  let is_hidden : [< t_pv ] id -> bool = fun n -> is_hidden (n :> t)
149,193✔
143

144
  let rec label_parent_aux =
145
    let open Id in
146
    fun (n : non_src) ->
147
      match n with
126,662✔
148
      | { iv = `Result i; _ } -> label_parent_aux (i :> non_src)
31,114✔
149
      | { iv = `Root _; _ } as p -> (p :> label_parent)
1✔
150
      | { iv = `Page _; _ } as p -> (p :> label_parent)
×
151
      | { iv = `LeafPage _; _ } as p -> (p :> label_parent)
×
152
      | { iv = `Module (p, _); _ }
32,803✔
153
      | { iv = `ModuleType (p, _); _ }
1✔
154
      | { iv = `Parameter (p, _); _ }
×
155
      | { iv = `Class (p, _); _ }
4✔
156
      | { iv = `ClassType (p, _); _ }
2✔
157
      | { iv = `Type (p, _); _ }
11,623✔
158
      | { iv = `Extension (p, _); _ }
3✔
159
      | { iv = `ExtensionDecl (p, _, _); _ }
×
160
      | { iv = `Exception (p, _); _ }
12✔
161
      | { iv = `Value (p, _); _ } ->
50,856✔
162
          (p : signature :> label_parent)
163
      | { iv = `Label (p, _); _ } -> p
×
164
      | { iv = `Method (p, _); _ } | { iv = `InstanceVariable (p, _); _ } ->
×
165
          (p : class_signature :> label_parent)
166
      | { iv = `Constructor (p, _); _ } -> (p : datatype :> label_parent)
239✔
167
      | { iv = `Field (p, _); _ } -> (p : field_parent :> label_parent)
2✔
168

169
  let label_parent n = label_parent_aux (n :> Id.non_src)
95,548✔
170

171
  let equal x y = x.ihash = y.ihash && x.ikey = y.ikey
325✔
172

173
  let hash x = x.ihash
518✔
174

175
  let compare x y = compare x.ikey y.ikey
1,986,183✔
176

177
  type any = t
178

179
  type any_pv = t_pv
180

181
  module type IdSig = sig
182
    type t
183
    type t_pv
184
    val equal : t -> t -> bool
185
    val hash : t -> int
186
    val compare : t -> t -> int
187
  end
188

189
  module Any = struct
190
    type t = any
191
    type t_pv = any_pv
192
    let equal = equal
193
    let hash = hash
194
    let compare = compare
195
  end
196

197
  module Signature = struct
198
    type t = Id.signature
199
    type t_pv = Id.signature_pv
200
    let equal = equal
201
    let hash = hash
202
    let compare = compare
203
  end
204

205
  module ClassSignature = struct
206
    type t = Id.class_signature
207
    type t_pv = Id.class_signature_pv
208
    let equal = equal
209
    let hash = hash
210
    let compare = compare
211
  end
212

213
  module DataType = struct
214
    type t = Id.datatype
215
    type t_pv = Id.datatype_pv
216
  end
217

218
  module FieldParent = struct
219
    type t = Paths_types.Identifier.field_parent
220
    type t_pv = Paths_types.Identifier.field_parent_pv
221
  end
222

223
  module LabelParent = struct
224
    type t = Id.label_parent
225
    type t_pv = Id.label_parent_pv
226
    let equal = equal
227
    let hash = hash
228
    let compare = compare
229
  end
230

231
  module RootModule = struct
232
    type t = Id.root_module
233
    type t_pv = Id.root_module_pv
234
    let equal = equal
235
    let hash = hash
236
    let compare = compare
237
  end
238

239
  module Module = struct
240
    type t = Id.module_
241
    type t_pv = Id.module_pv
242
    let equal = equal
243
    let hash = hash
244
    let compare = compare
245
  end
246

247
  module FunctorParameter = struct
248
    type t = Id.functor_parameter
249
    type t_pv = Id.functor_parameter_pv
250
    let equal = equal
251
    let hash = hash
252
    let compare = compare
253

254
    let functor_arg_pos { iv = `Parameter (p, _); _ } =
255
      let rec inner_sig = function
3,926✔
256
        | `Result { iv = p; _ } -> 1 + inner_sig p
369✔
257
        | `Module _ | `ModuleType _ | `Root _ | `Parameter _ -> 1
×
258
      in
259
      inner_sig p.iv
260
  end
261

262
  module FunctorResult = struct
263
    type t = Id.functor_result
264
    type t_pv = Id.functor_result_pv
265
  end
266

267
  module ModuleType = struct
268
    type t = Id.module_type
269
    type t_pv = Id.module_type_pv
270
    let equal = equal
271
    let hash = hash
272
    let compare = compare
273
  end
274

275
  module Type = struct
276
    type t = Id.type_
277
    type t_pv = Id.type_pv
278
    let equal = equal
279
    let hash = hash
280
    let compare = compare
281
  end
282

283
  module Constructor = struct
284
    type t = Id.constructor
285
    type t_pv = Id.constructor_pv
286
  end
287

288
  module Field = struct
289
    type t = Id.field
290
    type t_pv = Id.field_pv
291
  end
292

293
  module Extension = struct
294
    type t = Id.extension
295
    type t_pv = Id.extension_pv
296
  end
297

298
  module ExtensionDecl = struct
299
    type t = Paths_types.Identifier.extension_decl
300

301
    type t_pv = Paths_types.Identifier.extension_decl_pv
302

303
    let equal = equal
304

305
    let hash = hash
306

307
    let compare = compare
308
  end
309

310
  module Exception = struct
311
    type t = Id.exception_
312
    type t_pv = Id.exception_pv
313
  end
314

315
  module Value = struct
316
    type t = Id.value
317
    type t_pv = Id.value_pv
318
  end
319

320
  module Class = struct
321
    type t = Id.class_
322
    type t_pv = Id.class_pv
323
    let equal = equal
324
    let hash = hash
325
    let compare = compare
326
  end
327

328
  module ClassType = struct
329
    type t = Id.class_type
330
    type t_pv = Id.class_type_pv
331
    let equal = equal
332
    let hash = hash
333
    let compare = compare
334
  end
335

336
  module Method = struct
337
    type t = Id.method_
338
    type t_pv = Id.method_pv
339
  end
340

341
  module InstanceVariable = struct
342
    type t = Id.instance_variable
343
    type t_pv = Id.instance_variable_pv
344
  end
345

346
  module Label = struct
347
    type t = Paths_types.Identifier.label
348
    type t_pv = Paths_types.Identifier.label_pv
349
    let equal = equal
350
    let hash = hash
351
    let compare = compare
352
  end
353

354
  module Page = struct
355
    type t = Id.page
356
    type t_pv = Id.page_pv
357
  end
358

359
  module LeafPage = struct
360
    type t = Id.leaf_page
361
    type t_pv = Id.leaf_page_pv
362
    let equal = equal
363
    let hash = hash
364
  end
365

366
  module ContainerPage = struct
367
    type t = Id.container_page
368
    type t_pv = Id.container_page_pv
369
    let equal = equal
370
    let hash = hash
371
  end
372

373
  module NonSrc = struct
374
    type t = Paths_types.Identifier.non_src
375
    type t_pv = Paths_types.Identifier.non_src_pv
376

377
    let equal x y = x.ihash = y.ihash && x.ikey = y.ikey
×
378

379
    let hash x = x.ihash
×
380
  end
381

382
  module SourcePage = struct
383
    type t = Id.source_page
384
    type t_pv = Id.source_page_pv
385

386
    let equal = equal
387
    let hash = hash
388
  end
389

390
  module SourceLocation = struct
391
    type t = Paths_types.Identifier.source_location
392
    type t_pv = Paths_types.Identifier.source_location_pv
393
  end
394

395
  module AssetFile = struct
396
    type t = Id.asset_file
397
    type t_pv = Id.asset_file_pv
398
  end
399

400
  module OdocId = struct
401
    type t = Id.odoc_id
402
    type t_pv = Id.odoc_id_pv
403
  end
404

405
  module Path = struct
406
    module Module = struct
407
      type t = Id.path_module
408
      type t_pv = Id.path_module_pv
409
      let equal = equal
410
      let hash = hash
411
      let compare = compare
412
    end
413

414
    module ModuleType = struct
415
      type t = Id.path_module_type
416
      type t_pv = Id.module_type_pv
417
      let equal = equal
418
      let hash = hash
419
      let compare = compare
420
    end
421

422
    module Type = struct
423
      type t = Id.path_type
424
      type t_pv = Id.path_type_pv
425
      let equal = equal
426
      let hash = hash
427
      let compare = compare
428
    end
429

430
    module Value = struct
431
      type t = Id.path_value
432
      type t_pv = Id.value_pv
433
      let equal = equal
434
      let hash = hash
435
      let compare = compare
436
    end
437

438
    module ClassType = struct
439
      type t = Id.path_class_type
440
      type t_pv = Id.path_class_type_pv
441
      let equal = equal
442
      let hash = hash
443
      let compare = compare
444
    end
445

446
    type t = Id.path_any
447
  end
448

449
  module Maps = struct
450
    module Any = Map.Make (Any)
451
    module FunctorParameter = Map.Make (FunctorParameter)
452
    module Module = Map.Make (Module)
453
    module ModuleType = Map.Make (ModuleType)
454
    module Type = Map.Make (Type)
455
    module Class = Map.Make (Class)
456
    module ClassType = Map.Make (ClassType)
457
    module Label = Map.Make (Label)
458

459
    module Path = struct
460
      module Module = Map.Make (Path.Module)
461
      module ModuleType = Map.Make (Path.ModuleType)
462
      module Type = Map.Make (Path.Type)
463
      module ClassType = Map.Make (Path.ClassType)
464
    end
465
  end
466

467
  module Mk = struct
468
    let mk_fresh to_str ty f x =
469
      let ikey = Printf.sprintf "%s_%s" ty (to_str x) in
33✔
470
      let ihash = Hashtbl.hash ikey in
33✔
471
      { iv = f x; ihash; ikey }
33✔
472

473
    let mk_parent to_str ty f (parent, x) =
474
      let ikey = Printf.sprintf "%s_%s.%s" ty (to_str x) parent.ikey in
94,423✔
475
      let ihash = Hashtbl.hash ikey in
94,423✔
476

477
      { iv = f (parent, x); ihash; ikey }
94,423✔
478

479
    let mk_parent_opt to_str ty f (parent_opt, x) =
480
      let ikey =
1,381✔
481
        match parent_opt with
482
        | None -> Printf.sprintf "%s_%s" ty (to_str x)
1,040✔
483
        | Some p -> Printf.sprintf "%s_%s.%s" ty (to_str x) p.ikey
341✔
484
      in
485
      let ihash = Hashtbl.hash ikey in
486
      { iv = f (parent_opt, x); ihash; ikey }
1,381✔
487

488
    let page :
489
        ContainerPage.t option * PageName.t ->
490
        [> `Page of ContainerPage.t option * PageName.t ] id =
491
      mk_parent_opt PageName.to_string "p" (fun (p, n) -> `Page (p, n))
720✔
492

493
    let leaf_page :
494
        ContainerPage.t option * PageName.t ->
495
        [> `LeafPage of ContainerPage.t option * PageName.t ] id =
496
      mk_parent_opt PageName.to_string "lp" (fun (p, n) -> `LeafPage (p, n))
145✔
497

498
    let asset_file : Page.t * AssetName.t -> AssetFile.t =
499
      mk_parent AssetName.to_string "asset" (fun (p, n) -> `AssetFile (p, n))
6✔
500

501
    let source_page (container_page, name) =
502
      mk_parent
27✔
503
        (fun x -> x)
27✔
504
        "sp"
505
        (fun (p, rp) -> `SourcePage (p, rp))
27✔
506
        (container_page, name)
507

508
    let root :
509
        ContainerPage.t option * ModuleName.t ->
510
        [> `Root of ContainerPage.t option * ModuleName.t ] id =
511
      mk_parent_opt ModuleName.to_string "r" (fun (p, n) -> `Root (p, n))
516✔
512

513
    let implementation =
514
      mk_fresh
1,429✔
515
        (fun s -> s)
33✔
516
        "impl"
517
        (fun s -> `Implementation (ModuleName.make_std s))
33✔
518

519
    let module_ :
520
        Signature.t * ModuleName.t ->
521
        [> `Module of Signature.t * ModuleName.t ] id =
522
      mk_parent ModuleName.to_string "m" (fun (p, n) -> `Module (p, n))
1,429✔
523

524
    let parameter :
525
        Signature.t * ModuleName.t ->
526
        [> `Parameter of Signature.t * ModuleName.t ] id =
527
      mk_parent ModuleName.to_string "p" (fun (p, n) -> `Parameter (p, n))
71✔
528

529
    let result : Signature.t -> [> `Result of Signature.t ] id =
530
     fun s ->
531
      mk_parent (fun () -> "__result__") "" (fun (s, ()) -> `Result s) (s, ())
180✔
532

533
    let module_type :
534
        Signature.t * ModuleTypeName.t ->
535
        [> `ModuleType of Signature.t * ModuleTypeName.t ] id =
536
      mk_parent ModuleTypeName.to_string "mt" (fun (p, n) -> `ModuleType (p, n))
1,125✔
537

538
    let class_ :
539
        Signature.t * TypeName.t -> [> `Class of Signature.t * TypeName.t ] id =
540
      mk_parent TypeName.to_string "c" (fun (p, n) -> `Class (p, n))
52✔
541

542
    let class_type :
543
        Signature.t * TypeName.t ->
544
        [> `ClassType of Signature.t * TypeName.t ] id =
545
      mk_parent TypeName.to_string "ct" (fun (p, n) -> `ClassType (p, n))
22✔
546

547
    let type_ :
548
        Signature.t * TypeName.t -> [> `Type of Signature.t * TypeName.t ] id =
549
      mk_parent TypeName.to_string "t" (fun (p, n) -> `Type (p, n))
1,429✔
550

551
    let core_type =
552
      mk_fresh (fun s -> s) "coret" (fun s -> `CoreType (TypeName.make_std s))
×
553

554
    let constructor :
555
        DataType.t * ConstructorName.t ->
556
        [> `Constructor of DataType.t * ConstructorName.t ] id =
557
      mk_parent ConstructorName.to_string "ctor" (fun (p, n) ->
1,429✔
558
          `Constructor (p, n))
209✔
559

560
    let field :
561
        FieldParent.t * FieldName.t ->
562
        [> `Field of FieldParent.t * FieldName.t ] id =
563
      mk_parent FieldName.to_string "fld" (fun (p, n) -> `Field (p, n))
46✔
564

565
    let extension :
566
        Signature.t * ExtensionName.t ->
567
        [> `Extension of Signature.t * ExtensionName.t ] id =
568
      mk_parent ExtensionName.to_string "extn" (fun (p, n) -> `Extension (p, n))
42✔
569

570
    let extension_decl :
571
        Signature.t * (ExtensionName.t * ExtensionName.t) ->
572
        [> `ExtensionDecl of Signature.t * ExtensionName.t * ExtensionName.t ]
573
        id =
574
      mk_parent
1,429✔
575
        (fun (n, m) ->
576
          ExtensionName.to_string n ^ "." ^ ExtensionName.to_string m)
4✔
577
        "extn-decl"
578
        (fun (p, (n, m)) -> `ExtensionDecl (p, n, m))
4✔
579

580
    let exception_ :
581
        Signature.t * ExceptionName.t ->
582
        [> `Exception of Signature.t * ExceptionName.t ] id =
583
      mk_parent ExceptionName.to_string "exn" (fun (p, n) -> `Exception (p, n))
143✔
584

585
    let value :
586
        Signature.t * ValueName.t -> [> `Value of Signature.t * ValueName.t ] id
587
        =
588
      mk_parent ValueName.to_string "v" (fun (p, n) -> `Value (p, n))
585✔
589

590
    let method_ :
591
        ClassSignature.t * MethodName.t ->
592
        [> `Method of ClassSignature.t * MethodName.t ] id =
593
      mk_parent MethodName.to_string "m" (fun (p, n) -> `Method (p, n))
42✔
594

595
    let instance_variable :
596
        ClassSignature.t * InstanceVariableName.t ->
597
        [> `InstanceVariable of ClassSignature.t * InstanceVariableName.t ] id =
598
      mk_parent InstanceVariableName.to_string "iv" (fun (p, n) ->
1,429✔
599
          `InstanceVariable (p, n))
6✔
600

601
    let label :
602
        LabelParent.t * LabelName.t ->
603
        [> `Label of LabelParent.t * LabelName.t ] id =
604
      mk_parent LabelName.to_string "l" (fun (p, n) -> `Label (p, n))
418✔
605

606
    let source_location :
607
        SourcePage.t * DefName.t ->
608
        [> `SourceLocation of SourcePage.t * DefName.t ] id =
609
      mk_parent DefName.to_string "sl" (fun (p, n) -> `SourceLocation (p, n))
107✔
610

611
    let source_location_mod :
612
        SourcePage.t -> [> `SourceLocationMod of SourcePage.t ] id =
613
     fun s ->
614
      mk_parent
35✔
615
        (fun () -> "__slm__")
35✔
616
        ""
617
        (fun (s, ()) -> `SourceLocationMod s)
35✔
618
        (s, ())
619

620
    let source_location_int :
621
        SourcePage.t * LocalName.t ->
622
        [> `SourceLocationInternal of SourcePage.t * LocalName.t ] id =
623
      mk_parent LocalName.to_string "sli" (fun (p, n) ->
1,429✔
624
          `SourceLocationInternal (p, n))
4✔
625
  end
626

627
  module Hashtbl = struct
628
    module Any = Hashtbl.Make (Any)
629
    module ContainerPage = Hashtbl.Make (ContainerPage)
630
    module LeafPage = Hashtbl.Make (LeafPage)
631
    module RootModule = Hashtbl.Make (RootModule)
632
    module SourcePage = Hashtbl.Make (SourcePage)
633
  end
634
end
635

636
module Path = struct
637
  type t = Paths_types.Path.any
638

639
  let rec is_resolved_hidden :
640
      weak_canonical_test:bool -> Paths_types.Resolved_path.any -> bool =
641
   fun ~weak_canonical_test x ->
642
    let open Paths_types.Resolved_path in
205,878✔
643
    let rec inner : Paths_types.Resolved_path.any -> bool = function
644
      | `Identifier { iv = `ModuleType (_, m); _ }
2,401✔
645
        when Names.ModuleTypeName.is_hidden m ->
2,401✔
646
          true
×
647
      | `Identifier { iv = `Type (_, t); _ } when Names.TypeName.is_hidden t ->
95,176✔
648
          true
21✔
649
      | `Identifier { iv = `Module (_, m); _ } when Names.ModuleName.is_hidden m
31,602✔
650
        ->
651
          true
2✔
652
      | `Identifier _ -> false
180,071✔
653
      | `Canonical (_, `Resolved _) -> false
716✔
654
      | `Canonical (x, _) ->
9✔
655
          (not weak_canonical_test) && inner (x : module_ :> any)
9✔
656
      | `Hidden _ -> true
87✔
657
      | `Subst (p1, p2) ->
48✔
658
          inner (p1 : module_type :> any) || inner (p2 : module_ :> any)
×
659
      | `Module (p, _) -> inner (p : module_ :> any)
3,236✔
660
      | `Apply (p, _) -> inner (p : module_ :> any)
96✔
661
      | `ModuleType (_, m) when Names.ModuleTypeName.is_hidden m -> true
×
662
      | `ModuleType (p, _) -> inner (p : module_ :> any)
810✔
663
      | `Type (_, t) when Names.TypeName.is_hidden t -> true
×
664
      | `CoreType t -> Names.TypeName.is_hidden t
25,043✔
665
      | `Type (p, _) -> inner (p : module_ :> any)
59,852✔
666
      | `Value (_, t) when Names.ValueName.is_hidden t -> true
×
667
      | `Value (p, _) -> inner (p : module_ :> any)
15✔
668
      | `Class (p, _) -> inner (p : module_ :> any)
20✔
669
      | `ClassType (p, _) -> inner (p : module_ :> any)
×
670
      | `Alias (dest, `Resolved src) ->
×
671
          inner (dest : module_ :> any) && inner (src : module_ :> any)
×
672
      | `Alias (dest, src) ->
21,230✔
673
          inner (dest : module_ :> any)
21,230✔
674
          && is_path_hidden (src :> Paths_types.Path.any)
×
675
      | `AliasModuleType (p1, p2) ->
326✔
676
          inner (p1 : module_type :> any) && inner (p2 : module_type :> any)
×
677
      | `SubstT (p1, p2) -> inner (p1 :> any) || inner (p2 :> any)
×
678
      | `Substituted m -> inner (m :> any)
41,334✔
679
      | `SubstitutedMT m -> inner (m :> any)
×
680
      | `SubstitutedT m -> inner (m :> any)
×
681
      | `SubstitutedCT m -> inner (m :> any)
×
682
      | `CanonicalModuleType (_, `Resolved _) -> false
4✔
683
      | `CanonicalModuleType (x, _) -> inner (x : module_type :> any)
×
684
      | `CanonicalType (_, `Resolved _) -> false
14✔
685
      | `CanonicalType (x, _) -> inner (x : type_ :> any)
×
686
      | `OpaqueModule m -> inner (m :> any)
17✔
687
      | `OpaqueModuleType mt -> inner (mt :> any)
543✔
688
    in
689
    inner x
690

691
  and is_path_hidden : Paths_types.Path.any -> bool =
692
    let open Paths_types.Path in
693
    function
694
    | `Resolved r -> is_resolved_hidden ~weak_canonical_test:false r
183,283✔
695
    | `Identifier (_, hidden) -> hidden
1,024✔
696
    | `Substituted r -> is_path_hidden (r :> any)
×
697
    | `SubstitutedMT r -> is_path_hidden (r :> any)
×
698
    | `SubstitutedT r -> is_path_hidden (r :> any)
×
699
    | `SubstitutedCT r -> is_path_hidden (r :> any)
×
700
    | `Root s -> ModuleName.is_hidden s
10✔
701
    | `Forward _ -> false
×
702
    | `Dot (p, n) ->
629✔
703
        ModuleName.is_hidden n || is_path_hidden (p : module_ :> any)
×
704
    | `DotMT (p, n) ->
×
705
        ModuleTypeName.is_hidden n || is_path_hidden (p : module_ :> any)
×
706
    | `DotT (p, n) ->
1✔
707
        TypeName.is_hidden n || is_path_hidden (p : module_ :> any)
×
708
    | `DotV (p, n) ->
×
709
        ValueName.is_hidden n || is_path_hidden (p : module_ :> any)
×
710
    | `Apply (p1, p2) ->
17✔
711
        is_path_hidden (p1 : module_ :> any)
×
712
        || is_path_hidden (p2 : module_ :> any)
713

714
  module Resolved = struct
715
    type t = Paths_types.Resolved_path.any
716

717
    let rec parent_module_type_identifier :
718
        Paths_types.Resolved_path.module_type -> Identifier.ModuleType.t =
719
      function
720
      | `Identifier id -> (id : Identifier.ModuleType.t)
211✔
721
      | `ModuleType (m, n) ->
92✔
722
          Identifier.Mk.module_type (parent_module_identifier m, n)
92✔
723
      | `SubstT (m, _n) -> parent_module_type_identifier m
×
724
      | `CanonicalModuleType (_, `Resolved p) -> parent_module_type_identifier p
×
725
      | `CanonicalModuleType (p, _) -> parent_module_type_identifier p
×
726
      | `OpaqueModuleType mt -> parent_module_type_identifier mt
×
727
      | `SubstitutedMT m -> parent_module_type_identifier m
×
728
      | `AliasModuleType (sub, orig) ->
41✔
729
          if is_resolved_hidden ~weak_canonical_test:false (sub :> t) then
730
            parent_module_type_identifier orig
×
731
          else parent_module_type_identifier sub
41✔
732

733
    and parent_module_identifier :
734
        Paths_types.Resolved_path.module_ -> Identifier.Signature.t = function
735
      | `Identifier id ->
82,981✔
736
          (id : Identifier.Path.Module.t :> Identifier.Signature.t)
737
      | `Subst (sub, _) ->
44✔
738
          (parent_module_type_identifier sub :> Identifier.Signature.t)
739
      | `Hidden p -> parent_module_identifier p
14✔
740
      | `Module (m, n) -> Identifier.Mk.module_ (parent_module_identifier m, n)
5,271✔
741
      | `Canonical (_, `Resolved p) -> parent_module_identifier p
210✔
742
      | `Canonical (p, _) -> parent_module_identifier p
4✔
743
      | `Apply (m, _) -> parent_module_identifier m
8✔
744
      | `Alias (dest, `Resolved src) ->
×
745
          if is_resolved_hidden ~weak_canonical_test:false (dest :> t) then
746
            parent_module_identifier src
×
747
          else parent_module_identifier dest
×
748
      | `Alias (dest, _src) -> parent_module_identifier dest
1,544✔
749
      | `Substituted m -> parent_module_identifier m
79,444✔
750
      | `OpaqueModule m -> parent_module_identifier m
×
751

752
    module Module = struct
753
      type t = Paths_types.Resolved_path.module_
754

755
      let is_hidden m =
756
        is_resolved_hidden (m : t :> Paths_types.Resolved_path.any)
21,136✔
757
    end
758

759
    module ModuleType = struct
760
      type t = Paths_types.Resolved_path.module_type
761

762
      let identifier : t -> Identifier.ModuleType.t =
763
        parent_module_type_identifier
764
    end
765

766
    module Type = struct
767
      type t = Paths_types.Resolved_path.type_
768
    end
769

770
    module Value = struct
771
      type t = Paths_types.Resolved_path.value
772
    end
773

774
    module ClassType = struct
775
      type t = Paths_types.Resolved_path.class_type
776
    end
777

778
    let rec identifier : t -> Identifier.t option = function
779
      | `Identifier id -> Some id
180,386✔
780
      | `CoreType _ -> None
44,221✔
781
      | `Subst (sub, _) -> identifier (sub :> t)
×
782
      | `Hidden p -> identifier (p :> t)
24✔
783
      | `Module (m, n) ->
448✔
784
          Some (Identifier.Mk.module_ (parent_module_identifier m, n))
448✔
785
      | `Canonical (_, `Resolved p) -> identifier (p :> t)
371✔
786
      | `Canonical (p, _) -> identifier (p :> t)
5✔
787
      | `Apply (m, _) -> identifier (m :> t)
17✔
788
      | `Type (m, n) ->
82,060✔
789
          Some (Identifier.Mk.type_ (parent_module_identifier m, n))
82,060✔
790
      | `Value (m, n) ->
15✔
791
          Some (Identifier.Mk.value (parent_module_identifier m, n))
15✔
792
      | `ModuleType (m, n) ->
282✔
793
          Some (Identifier.Mk.module_type (parent_module_identifier m, n))
282✔
794
      | `Class (m, n) ->
18✔
795
          Some (Identifier.Mk.class_ (parent_module_identifier m, n))
18✔
796
      | `ClassType (m, n) ->
×
797
          Some (Identifier.Mk.class_type (parent_module_identifier m, n))
×
798
      | `Alias (dest, `Resolved src) ->
×
799
          if is_resolved_hidden ~weak_canonical_test:false (dest :> t) then
800
            identifier (src :> t)
×
801
          else identifier (dest :> t)
×
802
      | `Alias (dest, _src) -> identifier (dest :> t)
20,173✔
803
      | `AliasModuleType (sub, orig) ->
140✔
804
          if is_resolved_hidden ~weak_canonical_test:false (sub :> t) then
805
            identifier (orig :> t)
×
806
          else identifier (sub :> t)
140✔
807
      | `SubstT (p, _) -> identifier (p :> t)
×
808
      | `CanonicalModuleType (_, `Resolved p) -> identifier (p :> t)
4✔
809
      | `CanonicalModuleType (p, _) -> identifier (p :> t)
×
810
      | `CanonicalType (_, `Resolved p) -> identifier (p :> t)
8✔
811
      | `CanonicalType (p, _) -> identifier (p :> t)
×
812
      | `OpaqueModule m -> identifier (m :> t)
9✔
813
      | `OpaqueModuleType mt -> identifier (mt :> t)
260✔
814
      | `Substituted m -> identifier (m :> t)
8✔
815
      | `SubstitutedMT m -> identifier (m :> t)
×
816
      | `SubstitutedCT m -> identifier (m :> t)
×
817
      | `SubstitutedT m -> identifier (m :> t)
×
818

819
    let is_hidden r = is_resolved_hidden ~weak_canonical_test:false r
1,278✔
820
  end
821

822
  module Module = struct
823
    type t = Paths_types.Path.module_
824
  end
825

826
  module ModuleType = struct
827
    type t = Paths_types.Path.module_type
828
  end
829

830
  module Type = struct
831
    type t = Paths_types.Path.type_
832
  end
833

834
  module Value = struct
835
    type t = Paths_types.Path.value
836
  end
837

838
  module ClassType = struct
839
    type t = Paths_types.Path.class_type
840
  end
841

842
  let is_hidden = is_path_hidden
843
end
844

845
module Fragment = struct
846
  module Resolved = struct
847
    type t = Paths_types.Resolved_fragment.any
848

849
    type root = Paths_types.Resolved_fragment.root
850

851
    module Signature = struct
852
      type t = Paths_types.Resolved_fragment.signature
853

854
      let rec sgidentifier : t -> Identifier.Signature.t = function
855
        | `Root (`ModuleType i) ->
249✔
856
            (Path.Resolved.parent_module_type_identifier i
857
              :> Identifier.Signature.t)
858
        | `Root (`Module i) -> Path.Resolved.parent_module_identifier i
17✔
859
        | `Subst (s, _) ->
8✔
860
            (Path.Resolved.parent_module_type_identifier s
861
              :> Identifier.Signature.t)
862
        | `Alias (i, _) -> Path.Resolved.parent_module_identifier i
16✔
863
        | `Module (m, n) -> Identifier.Mk.module_ (sgidentifier m, n)
17✔
864
        | `OpaqueModule m -> sgidentifier (m :> t)
×
865
    end
866

867
    module Module = struct
868
      type t = Paths_types.Resolved_fragment.module_
869
    end
870

871
    module ModuleType = struct
872
      type t = Paths_types.Resolved_fragment.module_type
873
    end
874

875
    module Type = struct
876
      type t = Paths_types.Resolved_fragment.type_
877
    end
878

879
    type leaf = Paths_types.Resolved_fragment.leaf
880

881
    let rec identifier : t -> Identifier.t = function
882
      | `Root (`ModuleType _r) -> assert false
883
      | `Root (`Module _r) -> assert false
884
      | `Subst (s, _) -> (Path.Resolved.ModuleType.identifier s :> Identifier.t)
×
885
      | `Alias (p, _) ->
×
886
          (Path.Resolved.parent_module_identifier p :> Identifier.t)
887
      | `Module (m, n) -> Identifier.Mk.module_ (Signature.sgidentifier m, n)
80✔
888
      | `Module_type (m, n) ->
48✔
889
          Identifier.Mk.module_type (Signature.sgidentifier m, n)
48✔
890
      | `Type (m, n) -> Identifier.Mk.type_ (Signature.sgidentifier m, n)
162✔
891
      | `Class (m, n) -> Identifier.Mk.class_ (Signature.sgidentifier m, n)
×
892
      | `ClassType (m, n) ->
×
893
          Identifier.Mk.class_type (Signature.sgidentifier m, n)
×
894
      | `OpaqueModule m -> identifier (m :> t)
×
895

896
    let rec is_hidden : t -> bool = function
897
      | `Root (`ModuleType r) -> Path.Resolved.(is_hidden (r :> t))
249✔
898
      | `Root (`Module r) -> Path.Resolved.(is_hidden (r :> t))
17✔
899
      | `Subst (s, _) -> Path.Resolved.(is_hidden (s :> t))
8✔
900
      | `Alias (s, _) -> Path.Resolved.(is_hidden (s :> t))
16✔
901
      | `Module (m, _)
97✔
902
      | `Module_type (m, _)
48✔
903
      | `Type (m, _)
162✔
904
      | `Class (m, _)
×
905
      | `ClassType (m, _) ->
×
906
          is_hidden (m :> t)
907
      | `OpaqueModule m -> is_hidden (m :> t)
×
908
  end
909

910
  type t = Paths_types.Fragment.any
911

912
  module Signature = struct
913
    type t = Paths_types.Fragment.signature
914
  end
915

916
  module Module = struct
917
    type t = Paths_types.Fragment.module_
918
  end
919

920
  module ModuleType = struct
921
    type t = Paths_types.Fragment.module_type
922
  end
923

924
  module Type = struct
925
    type t = Paths_types.Fragment.type_
926
  end
927

928
  type leaf = Paths_types.Fragment.leaf
929
end
930

931
module Reference = struct
932
  module Resolved = struct
933
    open Paths_types.Resolved_reference
934

935
    type t = Paths_types.Resolved_reference.any
936

937
    let rec parent_signature_identifier : signature -> Identifier.Signature.t =
938
      function
939
      | `Identifier id -> id
492✔
940
      | `Hidden s -> parent_signature_identifier (s :> signature)
×
941
      | `Alias (sub, orig) ->
77✔
942
          if Path.Resolved.(is_hidden (sub :> t)) then
77✔
943
            parent_signature_identifier (orig :> signature)
×
944
          else
945
            (Path.Resolved.parent_module_identifier sub
77✔
946
              :> Identifier.Signature.t)
947
      | `AliasModuleType (sub, orig) ->
2✔
948
          if Path.Resolved.(is_hidden (sub :> t)) then
2✔
949
            parent_signature_identifier (orig :> signature)
×
950
          else
951
            (Path.Resolved.parent_module_type_identifier sub
2✔
952
              :> Identifier.Signature.t)
953
      | `Module (m, n) ->
84✔
954
          Identifier.Mk.module_ (parent_signature_identifier m, n)
84✔
955
      | `ModuleType (m, s) ->
110✔
956
          Identifier.Mk.module_type (parent_signature_identifier m, s)
110✔
957

958
    and parent_type_identifier : datatype -> Identifier.DataType.t = function
959
      | `Identifier id -> id
9✔
960
      | `Type (sg, s) -> Identifier.Mk.type_ (parent_signature_identifier sg, s)
198✔
961

962
    and parent_class_signature_identifier :
963
        class_signature -> Identifier.ClassSignature.t = function
964
      | `Identifier id -> id
×
965
      | `Class (sg, s) ->
×
966
          Identifier.Mk.class_ (parent_signature_identifier sg, s)
×
967
      | `ClassType (sg, s) ->
×
968
          Identifier.Mk.class_type (parent_signature_identifier sg, s)
×
969

970
    and field_parent_identifier : field_parent -> Identifier.FieldParent.t =
971
      function
972
      | `Identifier id -> id
×
973
      | (`Hidden _ | `Alias _ | `AliasModuleType _ | `Module _ | `ModuleType _)
×
974
        as sg ->
975
          (parent_signature_identifier sg :> Identifier.FieldParent.t)
976
      | `Type _ as t -> (parent_type_identifier t :> Identifier.FieldParent.t)
194✔
977

978
    and label_parent_identifier : label_parent -> Identifier.LabelParent.t =
979
      function
980
      | `Identifier id -> id
22✔
981
      | (`Class _ | `ClassType _) as c ->
×
982
          (parent_class_signature_identifier c :> Identifier.LabelParent.t)
983
      | ( `Hidden _ | `Alias _ | `AliasModuleType _ | `Module _ | `ModuleType _
×
984
        | `Type _ ) as r ->
194✔
985
          (field_parent_identifier r :> Identifier.LabelParent.t)
986

987
    and identifier : t -> Identifier.t = function
988
      | `Identifier id -> id
2,647✔
989
      | ( `Alias _ | `AliasModuleType _ | `Module _ | `Hidden _ | `Type _
×
990
        | `Class _ | `ClassType _ | `ModuleType _ ) as r ->
×
991
          (label_parent_identifier r :> Identifier.t)
992
      | `Field (p, n) -> Identifier.Mk.field (field_parent_identifier p, n)
×
993
      | `PolyConstructor (s, n) ->
8✔
994
          (* Uses an identifier for constructor even though it is not
995
             one. Document must make the links correspond. *)
996
          Identifier.Mk.constructor
997
            ((parent_type_identifier s :> Identifier.DataType.t), n)
8✔
998
      | `Constructor (s, n) ->
5✔
999
          Identifier.Mk.constructor
1000
            ((parent_type_identifier s :> Identifier.DataType.t), n)
5✔
1001
      | `Extension (p, q) ->
3✔
1002
          Identifier.Mk.extension (parent_signature_identifier p, q)
3✔
1003
      | `ExtensionDecl (p, q, r) ->
2✔
1004
          Identifier.Mk.extension_decl (parent_signature_identifier p, (q, r))
2✔
1005
      | `Exception (p, q) ->
126✔
1006
          Identifier.Mk.exception_ (parent_signature_identifier p, q)
126✔
1007
      | `Value (p, q) -> Identifier.Mk.value (parent_signature_identifier p, q)
36✔
1008
      | `Method (p, q) ->
×
1009
          Identifier.Mk.method_ (parent_class_signature_identifier p, q)
×
1010
      | `InstanceVariable (p, q) ->
×
1011
          Identifier.Mk.instance_variable
1012
            (parent_class_signature_identifier p, q)
×
1013
      | `Label (p, q) -> Identifier.Mk.label (label_parent_identifier p, q)
54✔
1014

1015
    module Signature = struct
1016
      type t = Paths_types.Resolved_reference.signature
1017
    end
1018

1019
    module ClassSignature = struct
1020
      type t = Paths_types.Resolved_reference.class_signature
1021
    end
1022

1023
    module DataType = struct
1024
      type t = Paths_types.Resolved_reference.datatype
1025
    end
1026

1027
    module FieldParent = struct
1028
      type t = Paths_types.Resolved_reference.field_parent
1029
    end
1030

1031
    module LabelParent = struct
1032
      type t = Paths_types.Resolved_reference.label_parent
1033
    end
1034

1035
    module Module = struct
1036
      type t = Paths_types.Resolved_reference.module_
1037
    end
1038

1039
    module ModuleType = struct
1040
      type t = Paths_types.Resolved_reference.module_type
1041
    end
1042

1043
    module Type = struct
1044
      type t = Paths_types.Resolved_reference.type_
1045
    end
1046

1047
    module Constructor = struct
1048
      type t = Paths_types.Resolved_reference.constructor
1049
    end
1050

1051
    module Field = struct
1052
      type t = Paths_types.Resolved_reference.field
1053
    end
1054

1055
    module Extension = struct
1056
      type t = Paths_types.Resolved_reference.extension
1057
    end
1058

1059
    module ExtensionDecl = struct
1060
      type t = Paths_types.Resolved_reference.extension_decl
1061
    end
1062

1063
    module Exception = struct
1064
      type t = Paths_types.Resolved_reference.exception_
1065
    end
1066

1067
    module Value = struct
1068
      type t = Paths_types.Resolved_reference.value
1069
    end
1070

1071
    module Class = struct
1072
      type t = Paths_types.Resolved_reference.class_
1073
    end
1074

1075
    module ClassType = struct
1076
      type t = Paths_types.Resolved_reference.class_type
1077
    end
1078

1079
    module Method = struct
1080
      type t = Paths_types.Resolved_reference.method_
1081
    end
1082

1083
    module InstanceVariable = struct
1084
      type t = Paths_types.Resolved_reference.instance_variable
1085
    end
1086

1087
    module Label = struct
1088
      type t = Paths_types.Resolved_reference.label
1089
    end
1090

1091
    module Page = struct
1092
      type t = Paths_types.Resolved_reference.page
1093
    end
1094

1095
    module Asset = struct
1096
      let identifier = function `Identifier id -> id
9✔
1097

1098
      type t = Paths_types.Resolved_reference.asset
1099
    end
1100
  end
1101

1102
  type t = Paths_types.Reference.any
1103

1104
  type tag_any = Paths_types.Reference.tag_any
1105
  type tag_hierarchy = Paths_types.Reference.tag_hierarchy
1106

1107
  module Signature = struct
1108
    type t = Paths_types.Reference.signature
1109
  end
1110

1111
  module ClassSignature = struct
1112
    type t = Paths_types.Reference.class_signature
1113
  end
1114

1115
  module DataType = struct
1116
    type t = Paths_types.Reference.datatype
1117
  end
1118

1119
  module FragmentTypeParent = struct
1120
    type t = Paths_types.Reference.fragment_type_parent
1121
  end
1122

1123
  module LabelParent = struct
1124
    type t = Paths_types.Reference.label_parent
1125
  end
1126

1127
  module Module = struct
1128
    type t = Paths_types.Reference.module_
1129
  end
1130

1131
  module ModuleType = struct
1132
    type t = Paths_types.Reference.module_type
1133
  end
1134

1135
  module Type = struct
1136
    type t = Paths_types.Reference.type_
1137
  end
1138

1139
  module Constructor = struct
1140
    type t = Paths_types.Reference.constructor
1141
  end
1142

1143
  module Field = struct
1144
    type t = Paths_types.Reference.field
1145
  end
1146

1147
  module Extension = struct
1148
    type t = Paths_types.Reference.extension
1149
  end
1150

1151
  module ExtensionDecl = struct
1152
    type t = Paths_types.Reference.extension_decl
1153
  end
1154

1155
  module Exception = struct
1156
    type t = Paths_types.Reference.exception_
1157
  end
1158

1159
  module Value = struct
1160
    type t = Paths_types.Reference.value
1161
  end
1162

1163
  module Class = struct
1164
    type t = Paths_types.Reference.class_
1165
  end
1166

1167
  module ClassType = struct
1168
    type t = Paths_types.Reference.class_type
1169
  end
1170

1171
  module Method = struct
1172
    type t = Paths_types.Reference.method_
1173
  end
1174

1175
  module InstanceVariable = struct
1176
    type t = Paths_types.Reference.instance_variable
1177
  end
1178

1179
  module Label = struct
1180
    type t = Paths_types.Reference.label
1181
  end
1182

1183
  module Page = struct
1184
    type t = Paths_types.Reference.page
1185
  end
1186

1187
  module Asset = struct
1188
    type t = Paths_types.Reference.asset
1189
  end
1190

1191
  module Hierarchy = struct
1192
    type t = Paths_types.Reference.hierarchy
1193
  end
1194
end
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc