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

ocaml / odoc / 2168

10 Jul 2024 02:38PM UTC coverage: 71.437% (-0.4%) from 71.864%
2168

Pull #1142

github

web-flow
Merge 9bc2c3b35 into de54ed266
Pull Request #1142: Parsing of path-references to pages and modules

68 of 127 new or added lines in 6 files covered. (53.54%)

700 existing lines in 17 files now uncovered.

9794 of 13710 relevant lines covered (71.44%)

3534.91 hits per line

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

60.96
/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
164,786✔
34
    | `Root (_, name) -> ModuleName.to_string name
389✔
35
    | `Page (_, name) -> PageName.to_string name
4✔
36
    | `LeafPage (_, name) -> PageName.to_string name
1✔
37
    | `Module (_, name) -> ModuleName.to_string name
53,477✔
38
    | `Parameter (_, name) -> ModuleName.to_string name
586✔
39
    | `Result x -> name_aux (x :> t)
×
40
    | `ModuleType (_, name) -> ModuleTypeName.to_string name
35,169✔
41
    | `Type (_, name) -> TypeName.to_string name
70,083✔
42
    | `CoreType name -> TypeName.to_string name
1,874✔
43
    | `Constructor (_, name) -> ConstructorName.to_string name
868✔
44
    | `Field (_, name) -> FieldName.to_string name
184✔
45
    | `Extension (_, name) -> ExtensionName.to_string name
380✔
46
    | `ExtensionDecl (_, _, name) -> ExtensionName.to_string name
2✔
47
    | `Exception (_, name) -> ExceptionName.to_string name
85✔
48
    | `CoreException name -> ExceptionName.to_string name
×
49
    | `Value (_, name) -> ValueName.to_string name
972✔
50
    | `Class (_, name) -> ClassName.to_string name
211✔
51
    | `ClassType (_, name) -> ClassTypeName.to_string name
113✔
52
    | `Method (_, name) -> MethodName.to_string name
66✔
53
    | `InstanceVariable (_, name) -> InstanceVariableName.to_string name
12✔
54
    | `Label (_, name) -> LabelName.to_string name
310✔
55
    | `SourcePage (dir, name) -> name_aux (dir :> t) ^ name
×
56
    | `SourceDir (({ iv = `SourceDir _; _ } as p), n) ->
×
57
        name_aux (p :> t) ^ n ^ "/"
×
58
    | `SourceDir (_, n) -> "./" ^ n ^ "/"
×
59
    | `SourceLocation (x, anchor) ->
×
60
        name_aux (x :> t) ^ "#" ^ DefName.to_string anchor
×
61
    | `SourceLocationMod x -> name_aux (x :> t)
×
62
    | `SourceLocationInternal (x, anchor) ->
×
63
        name_aux (x :> t) ^ "#" ^ LocalName.to_string anchor
×
64
    | `AssetFile (_, name) -> name
×
65

66
  let rec is_hidden : t -> bool =
67
   fun x ->
68
    match x.iv with
5,100✔
69
    | `Root (_, name) -> ModuleName.is_hidden name
1,832✔
70
    | `Page (_, _) -> false
×
71
    | `LeafPage (_, _) -> false
×
72
    | `Module (_, name) -> ModuleName.is_hidden name
1,640✔
73
    | `Parameter (_, name) -> ModuleName.is_hidden name
68✔
74
    | `Result x -> is_hidden (x :> t)
66✔
75
    | `ModuleType (_, name) -> ModuleTypeName.is_hidden name
596✔
76
    | `Type (_, name) -> TypeName.is_hidden name
563✔
77
    | `CoreType name -> TypeName.is_hidden name
11✔
78
    | `Constructor (parent, _) -> is_hidden (parent :> t)
×
79
    | `Field (parent, _) -> is_hidden (parent :> t)
×
80
    | `Extension (parent, _) -> is_hidden (parent :> t)
28✔
81
    | `ExtensionDecl (parent, _, _) -> is_hidden (parent :> t)
×
82
    | `Exception (parent, _) -> is_hidden (parent :> t)
11✔
83
    | `CoreException _ -> false
×
84
    | `Value (_, name) -> ValueName.is_hidden name
248✔
85
    | `Class (_, name) -> ClassName.is_hidden name
26✔
86
    | `ClassType (_, name) -> ClassTypeName.is_hidden name
11✔
87
    | `Method (parent, _) -> is_hidden (parent :> t)
×
88
    | `InstanceVariable (parent, _) -> is_hidden (parent :> t)
×
89
    | `Label (parent, _) -> is_hidden (parent :> t)
×
90
    | `SourceDir _ | `SourceLocationMod _ | `SourceLocation _ | `SourcePage _
×
91
    | `SourceLocationInternal _ | `AssetFile _ ->
×
92
        false
93

94
  let name : [< t_pv ] id -> string = fun n -> name_aux (n :> t)
164,786✔
95

96
  let rec full_name_aux : t -> string list =
97
   fun x ->
98
    match x.iv with
271✔
99
    | `Root (_, name) -> [ ModuleName.to_string name ]
106✔
100
    | `Page (_, name) -> [ PageName.to_string name ]
31✔
UNCOV
101
    | `LeafPage (_, name) -> [ PageName.to_string name ]
×
102
    | `Module (parent, name) ->
58✔
103
        ModuleName.to_string name :: full_name_aux (parent :> t)
58✔
104
    | `Parameter (parent, name) ->
×
105
        ModuleName.to_string name :: full_name_aux (parent :> t)
×
UNCOV
106
    | `Result x -> full_name_aux (x :> t)
×
107
    | `ModuleType (parent, name) ->
10✔
108
        ModuleTypeName.to_string name :: full_name_aux (parent :> t)
10✔
109
    | `Type (parent, name) ->
10✔
110
        TypeName.to_string name :: full_name_aux (parent :> t)
10✔
UNCOV
111
    | `CoreType name -> [ TypeName.to_string name ]
×
112
    | `Constructor (parent, name) ->
2✔
113
        ConstructorName.to_string name :: full_name_aux (parent :> t)
2✔
UNCOV
114
    | `Field (parent, name) ->
×
115
        FieldName.to_string name :: full_name_aux (parent :> t)
×
UNCOV
116
    | `Extension (parent, name) ->
×
UNCOV
117
        ExtensionName.to_string name :: full_name_aux (parent :> t)
×
118
    | `ExtensionDecl (parent, _, name) ->
×
119
        ExtensionName.to_string name :: full_name_aux (parent :> t)
×
120
    | `Exception (parent, name) ->
×
121
        ExceptionName.to_string name :: full_name_aux (parent :> t)
×
122
    | `CoreException name -> [ ExceptionName.to_string name ]
×
123
    | `Value (parent, name) ->
27✔
124
        ValueName.to_string name :: full_name_aux (parent :> t)
27✔
125
    | `Class (parent, name) ->
×
126
        ClassName.to_string name :: full_name_aux (parent :> t)
×
UNCOV
127
    | `ClassType (parent, name) ->
×
UNCOV
128
        ClassTypeName.to_string name :: full_name_aux (parent :> t)
×
129
    | `Method (parent, name) ->
×
130
        MethodName.to_string name :: full_name_aux (parent :> t)
×
131
    | `InstanceVariable (parent, name) ->
×
132
        InstanceVariableName.to_string name :: full_name_aux (parent :> t)
×
133
    | `Label (parent, name) ->
2✔
134
        LabelName.to_string name :: full_name_aux (parent :> t)
2✔
135
    | `SourceDir (parent, name) -> name :: full_name_aux (parent :> t)
×
136
    | `SourceLocation (parent, name) ->
×
UNCOV
137
        DefName.to_string name :: full_name_aux (parent :> t)
×
UNCOV
138
    | `SourceLocationInternal (parent, name) ->
×
139
        LocalName.to_string name :: full_name_aux (parent :> t)
×
140
    | `SourceLocationMod name -> full_name_aux (name :> t)
×
141
    | `SourcePage (parent, name) -> name :: full_name_aux (parent :> t)
25✔
142
    | `AssetFile (parent, name) -> name :: full_name_aux (parent :> t)
×
143

144
  let fullname : [< t_pv ] id -> string list =
145
   fun n -> List.rev @@ full_name_aux (n :> t)
137✔
146

147
  let is_hidden : [< t_pv ] id -> bool = fun n -> is_hidden (n :> t)
4,995✔
148

149
  let rec label_parent_aux =
150
    let open Id in
151
    fun (n : non_src) ->
152
      match n with
13✔
UNCOV
153
      | { iv = `Result i; _ } -> label_parent_aux (i :> non_src)
×
154
      | { iv = `CoreType _; _ } | { iv = `CoreException _; _ } -> assert false
155
      | { iv = `Root _; _ } as p -> (p :> label_parent)
1✔
UNCOV
156
      | { iv = `Page _; _ } as p -> (p :> label_parent)
×
157
      | { iv = `LeafPage _; _ } as p -> (p :> label_parent)
×
158
      | { iv = `Module (p, _); _ }
2✔
159
      | { iv = `ModuleType (p, _); _ }
1✔
160
      | { iv = `Parameter (p, _); _ }
×
161
      | { iv = `Class (p, _); _ }
1✔
162
      | { iv = `ClassType (p, _); _ }
1✔
163
      | { iv = `Type (p, _); _ }
4✔
164
      | { iv = `Extension (p, _); _ }
×
UNCOV
165
      | { iv = `ExtensionDecl (p, _, _); _ }
×
166
      | { iv = `Exception (p, _); _ }
1✔
167
      | { iv = `Value (p, _); _ } ->
2✔
168
          (p : signature :> label_parent)
169
      | { iv = `Label (p, _); _ } -> p
×
UNCOV
170
      | { iv = `Method (p, _); _ } | { iv = `InstanceVariable (p, _); _ } ->
×
171
          (p : class_signature :> label_parent)
UNCOV
172
      | { iv = `Constructor (p, _); _ } -> (p : datatype :> label_parent)
×
173
      | { iv = `Field (p, _); _ } -> (p : field_parent :> label_parent)
×
174

175
  let label_parent n = label_parent_aux (n :> Id.non_src)
13✔
176

177
  let equal x y = x.ihash = y.ihash && x.ikey = y.ikey
232✔
178

179
  let hash x = x.ihash
430✔
180

181
  let compare x y = compare x.ikey y.ikey
1,984,259✔
182

183
  type any = t
184

185
  type any_pv = t_pv
186

187
  module type IdSig = sig
188
    type t
189
    type t_pv
190
    val equal : t -> t -> bool
191
    val hash : t -> int
192
    val compare : t -> t -> int
193
  end
194

195
  module Any = struct
196
    type t = any
197
    type t_pv = any_pv
198
    let equal = equal
199
    let hash = hash
200
    let compare = compare
201
  end
202

203
  module Signature = struct
204
    type t = Id.signature
205
    type t_pv = Id.signature_pv
206
    let equal = equal
207
    let hash = hash
208
    let compare = compare
209
  end
210

211
  module ClassSignature = struct
212
    type t = Id.class_signature
213
    type t_pv = Id.class_signature_pv
214
    let equal = equal
215
    let hash = hash
216
    let compare = compare
217
  end
218

219
  module DataType = struct
220
    type t = Id.datatype
221
    type t_pv = Id.datatype_pv
222
  end
223

224
  module FieldParent = struct
225
    type t = Paths_types.Identifier.field_parent
226
    type t_pv = Paths_types.Identifier.field_parent_pv
227
  end
228

229
  module LabelParent = struct
230
    type t = Id.label_parent
231
    type t_pv = Id.label_parent_pv
232
    let equal = equal
233
    let hash = hash
234
    let compare = compare
235
  end
236

237
  module RootModule = struct
238
    type t = Id.root_module
239
    type t_pv = Id.root_module_pv
240
    let equal = equal
241
    let hash = hash
242
    let compare = compare
243
  end
244

245
  module Module = struct
246
    type t = Id.module_
247
    type t_pv = Id.module_pv
248
    let equal = equal
249
    let hash = hash
250
    let compare = compare
251
  end
252

253
  module FunctorParameter = struct
254
    type t = Id.functor_parameter
255
    type t_pv = Id.functor_parameter_pv
256
    let equal = equal
257
    let hash = hash
258
    let compare = compare
259

260
    let functor_arg_pos { iv = `Parameter (p, _); _ } =
261
      let rec inner_sig = function
1,630✔
262
        | `Result { iv = p; _ } -> 1 + inner_sig p
147✔
UNCOV
263
        | `Module _ | `ModuleType _ | `Root _ | `Parameter _ -> 1
×
264
      in
265
      inner_sig p.iv
266
  end
267

268
  module FunctorResult = struct
269
    type t = Id.functor_result
270
    type t_pv = Id.functor_result_pv
271
  end
272

273
  module ModuleType = struct
274
    type t = Id.module_type
275
    type t_pv = Id.module_type_pv
276
    let equal = equal
277
    let hash = hash
278
    let compare = compare
279
  end
280

281
  module Type = struct
282
    type t = Id.type_
283
    type t_pv = Id.type_pv
284
    let equal = equal
285
    let hash = hash
286
    let compare = compare
287
  end
288

289
  module Constructor = struct
290
    type t = Id.constructor
291
    type t_pv = Id.constructor_pv
292
  end
293

294
  module Field = struct
295
    type t = Id.field
296
    type t_pv = Id.field_pv
297
  end
298

299
  module Extension = struct
300
    type t = Id.extension
301
    type t_pv = Id.extension_pv
302
  end
303

304
  module ExtensionDecl = struct
305
    type t = Paths_types.Identifier.extension_decl
306

307
    type t_pv = Paths_types.Identifier.extension_decl_pv
308

309
    let equal = equal
310

311
    let hash = hash
312

313
    let compare = compare
314
  end
315

316
  module Exception = struct
317
    type t = Id.exception_
318
    type t_pv = Id.exception_pv
319
  end
320

321
  module Value = struct
322
    type t = Id.value
323
    type t_pv = Id.value_pv
324
  end
325

326
  module Class = struct
327
    type t = Id.class_
328
    type t_pv = Id.class_pv
329
    let equal = equal
330
    let hash = hash
331
    let compare = compare
332
  end
333

334
  module ClassType = struct
335
    type t = Id.class_type
336
    type t_pv = Id.class_type_pv
337
    let equal = equal
338
    let hash = hash
339
    let compare = compare
340
  end
341

342
  module Method = struct
343
    type t = Id.method_
344
    type t_pv = Id.method_pv
345
  end
346

347
  module InstanceVariable = struct
348
    type t = Id.instance_variable
349
    type t_pv = Id.instance_variable_pv
350
  end
351

352
  module Label = struct
353
    type t = Paths_types.Identifier.label
354
    type t_pv = Paths_types.Identifier.label_pv
355
    let equal = equal
356
    let hash = hash
357
    let compare = compare
358
  end
359

360
  module Page = struct
361
    type t = Id.page
362
    type t_pv = Id.page_pv
363
  end
364

365
  module ContainerPage = struct
366
    type t = Id.container_page
367
    type t_pv = Id.container_page_pv
368
  end
369

370
  module NonSrc = struct
371
    type t = Paths_types.Identifier.non_src
372
    type t_pv = Paths_types.Identifier.non_src_pv
373
  end
374

375
  module SourceDir = struct
376
    type t = Id.source_dir
377
    type t_pv = Id.source_dir_pv
378
    let equal = equal
379
    let hash = hash
380
    let compare = compare
381
  end
382

383
  module SourcePage = struct
384
    type t = Id.source_page
385
    type t_pv = Id.source_page_pv
386
  end
387

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

393
  module AssetFile = struct
394
    type t = Id.asset_file
395
    type t_pv = Id.asset_file_pv
396
  end
397

398
  module OdocId = struct
399
    type t = Id.odoc_id
400
    type t_pv = Id.odoc_id_pv
401
  end
402

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

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

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

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

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

444
    type t = Id.path_any
445
  end
446

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

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

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

471
    let mk_parent to_str ty f (parent, x) =
472
      let ikey = Printf.sprintf "%s_%s.%s" ty (to_str x) parent.ikey in
13,348✔
473
      let ihash = Hashtbl.hash ikey in
13,348✔
474

475
      { iv = f (parent, x); ihash; ikey }
13,348✔
476

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

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

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

496
    let asset_file : Page.t * string -> AssetFile.t =
497
      mk_parent (fun k -> k) "asset" (fun (p, n) -> `AssetFile (p, n))
2✔
498

499
    let source_page (container_page, path) =
500
      let rec source_dir dir =
25✔
501
        match dir with
25✔
502
        | [] -> (container_page : ContainerPage.t :> SourceDir.t)
25✔
UNCOV
503
        | a :: q ->
×
504
            let parent = source_dir q in
UNCOV
505
            mk_parent
×
UNCOV
506
              (fun k -> k)
×
507
              "sd"
UNCOV
508
              (fun (p, dir) -> `SourceDir (p, dir))
×
509
              (parent, a)
510
      in
511
      match List.rev path with
512
      | [] -> assert false
513
      | file :: dir ->
25✔
514
          let parent = source_dir dir in
515
          mk_parent
25✔
516
            (fun x -> x)
25✔
517
            "sp"
518
            (fun (p, rp) -> `SourcePage (p, rp))
25✔
519
            (parent, file)
520

521
    let root :
522
        ContainerPage.t option * ModuleName.t ->
523
        [> `Root of ContainerPage.t option * ModuleName.t ] id =
524
      mk_parent_opt ModuleName.to_string "r" (fun (p, n) -> `Root (p, n))
458✔
525

526
    let implementation =
527
      mk_fresh
991✔
528
        (fun s -> s)
31✔
529
        "impl"
530
        (fun s -> `Implementation (ModuleName.make_std s))
31✔
531

532
    let module_ :
533
        Signature.t * ModuleName.t ->
534
        [> `Module of Signature.t * ModuleName.t ] id =
535
      mk_parent ModuleName.to_string "m" (fun (p, n) -> `Module (p, n))
991✔
536

537
    let parameter :
538
        Signature.t * ModuleName.t ->
539
        [> `Parameter of Signature.t * ModuleName.t ] id =
540
      mk_parent ModuleName.to_string "p" (fun (p, n) -> `Parameter (p, n))
71✔
541

542
    let result : Signature.t -> [> `Result of Signature.t ] id =
543
     fun s ->
544
      mk_parent (fun () -> "__result__") "" (fun (s, ()) -> `Result s) (s, ())
181✔
545

546
    let module_type :
547
        Signature.t * ModuleTypeName.t ->
548
        [> `ModuleType of Signature.t * ModuleTypeName.t ] id =
549
      mk_parent ModuleTypeName.to_string "mt" (fun (p, n) -> `ModuleType (p, n))
951✔
550

551
    let class_ :
552
        Signature.t * ClassName.t -> [> `Class of Signature.t * ClassName.t ] id
553
        =
554
      mk_parent ClassName.to_string "c" (fun (p, n) -> `Class (p, n))
47✔
555

556
    let class_type :
557
        Signature.t * ClassTypeName.t ->
558
        [> `ClassType of Signature.t * ClassTypeName.t ] id =
559
      mk_parent ClassTypeName.to_string "ct" (fun (p, n) -> `ClassType (p, n))
21✔
560

561
    let type_ :
562
        Signature.t * TypeName.t -> [> `Type of Signature.t * TypeName.t ] id =
563
      mk_parent TypeName.to_string "t" (fun (p, n) -> `Type (p, n))
991✔
564

565
    let core_type =
566
      mk_fresh (fun s -> s) "coret" (fun s -> `CoreType (TypeName.make_std s))
991✔
567

568
    let constructor :
569
        DataType.t * ConstructorName.t ->
570
        [> `Constructor of DataType.t * ConstructorName.t ] id =
571
      mk_parent ConstructorName.to_string "ctor" (fun (p, n) ->
991✔
572
          `Constructor (p, n))
6,602✔
573

574
    let field :
575
        FieldParent.t * FieldName.t ->
576
        [> `Field of FieldParent.t * FieldName.t ] id =
577
      mk_parent FieldName.to_string "fld" (fun (p, n) -> `Field (p, n))
42✔
578

579
    let extension :
580
        Signature.t * ExtensionName.t ->
581
        [> `Extension of Signature.t * ExtensionName.t ] id =
582
      mk_parent ExtensionName.to_string "extn" (fun (p, n) -> `Extension (p, n))
39✔
583

584
    let extension_decl :
585
        Signature.t * (ExtensionName.t * ExtensionName.t) ->
586
        [> `ExtensionDecl of Signature.t * ExtensionName.t * ExtensionName.t ]
587
        id =
588
      mk_parent
991✔
589
        (fun (n, m) ->
590
          ExtensionName.to_string n ^ "." ^ ExtensionName.to_string m)
4✔
591
        "extn-decl"
592
        (fun (p, (n, m)) -> `ExtensionDecl (p, n, m))
4✔
593

594
    let exception_ :
595
        Signature.t * ExceptionName.t ->
596
        [> `Exception of Signature.t * ExceptionName.t ] id =
597
      mk_parent ExceptionName.to_string "exn" (fun (p, n) -> `Exception (p, n))
15✔
598

599
    let core_exception =
600
      mk_fresh
991✔
UNCOV
601
        (fun s -> s)
×
602
        "coreexn"
UNCOV
603
        (fun s -> `CoreException (ExceptionName.make_std s))
×
604

605
    let value :
606
        Signature.t * ValueName.t -> [> `Value of Signature.t * ValueName.t ] id
607
        =
608
      mk_parent ValueName.to_string "v" (fun (p, n) -> `Value (p, n))
463✔
609

610
    let method_ :
611
        ClassSignature.t * MethodName.t ->
612
        [> `Method of ClassSignature.t * MethodName.t ] id =
613
      mk_parent MethodName.to_string "m" (fun (p, n) -> `Method (p, n))
38✔
614

615
    let instance_variable :
616
        ClassSignature.t * InstanceVariableName.t ->
617
        [> `InstanceVariable of ClassSignature.t * InstanceVariableName.t ] id =
618
      mk_parent InstanceVariableName.to_string "iv" (fun (p, n) ->
991✔
619
          `InstanceVariable (p, n))
4✔
620

621
    let label :
622
        LabelParent.t * LabelName.t ->
623
        [> `Label of LabelParent.t * LabelName.t ] id =
624
      mk_parent LabelName.to_string "l" (fun (p, n) -> `Label (p, n))
295✔
625

626
    let source_location :
627
        SourcePage.t * DefName.t ->
628
        [> `SourceLocation of SourcePage.t * DefName.t ] id =
629
      mk_parent DefName.to_string "sl" (fun (p, n) -> `SourceLocation (p, n))
100✔
630

631
    let source_location_mod :
632
        SourcePage.t -> [> `SourceLocationMod of SourcePage.t ] id =
633
     fun s ->
634
      mk_parent
33✔
635
        (fun () -> "__slm__")
33✔
636
        ""
637
        (fun (s, ()) -> `SourceLocationMod s)
33✔
638
        (s, ())
639

640
    let source_location_int :
641
        SourcePage.t * LocalName.t ->
642
        [> `SourceLocationInternal of SourcePage.t * LocalName.t ] id =
643
      mk_parent LocalName.to_string "sli" (fun (p, n) ->
991✔
644
          `SourceLocationInternal (p, n))
4✔
645
  end
646

647
  module Hashtbl = struct
648
    module Any = Hashtbl.Make (Any)
649
  end
650
end
651

652
module Path = struct
653
  type t = Paths_types.Path.any
654

655
  let rec is_resolved_hidden :
656
      weak_canonical_test:bool -> Paths_types.Resolved_path.any -> bool =
657
   fun ~weak_canonical_test x ->
658
    let open Paths_types.Resolved_path in
28,943✔
659
    let rec inner : Paths_types.Resolved_path.any -> bool = function
660
      | `Identifier { iv = `ModuleType (_, m); _ }
1,849✔
661
        when Names.ModuleTypeName.is_hidden m ->
1,849✔
UNCOV
662
          true
×
663
      | `Identifier { iv = `Type (_, t); _ } when Names.TypeName.is_hidden t ->
1,082✔
664
          true
21✔
665
      | `Identifier { iv = `Module (_, m); _ } when Names.ModuleName.is_hidden m
22,574✔
666
        ->
667
          true
2✔
668
      | `Identifier _ -> false
28,270✔
669
      | `Canonical (_, `Resolved _) -> false
616✔
670
      | `Canonical (x, _) ->
8✔
671
          (not weak_canonical_test) && inner (x : module_ :> any)
8✔
672
      | `Hidden _ -> true
78✔
673
      | `Subst (p1, p2) ->
38✔
UNCOV
674
          inner (p1 : module_type :> any) || inner (p2 : module_ :> any)
×
675
      | `Module (p, _) -> inner (p : module_ :> any)
465✔
676
      | `Apply (p, _) -> inner (p : module_ :> any)
74✔
UNCOV
677
      | `ModuleType (_, m) when Names.ModuleTypeName.is_hidden m -> true
×
678
      | `ModuleType (p, _) -> inner (p : module_ :> any)
612✔
UNCOV
679
      | `Type (_, t) when Names.TypeName.is_hidden t -> true
×
680
      | `Type (p, _) -> inner (p : module_ :> any)
634✔
681
      | `Value (_, t) when Names.ValueName.is_hidden t -> true
×
682
      | `Value (p, _) -> inner (p : module_ :> any)
15✔
683
      | `Class (p, _) -> inner (p : module_ :> any)
16✔
UNCOV
684
      | `ClassType (p, _) -> inner (p : module_ :> any)
×
685
      | `Alias (dest, `Resolved src) ->
×
UNCOV
686
          inner (dest : module_ :> any) && inner (src : module_ :> any)
×
687
      | `Alias (dest, src) ->
20,345✔
688
          inner (dest : module_ :> any)
20,345✔
689
          && is_path_hidden (src :> Paths_types.Path.any)
×
690
      | `AliasModuleType (p1, p2) ->
246✔
UNCOV
691
          inner (p1 : module_type :> any) && inner (p2 : module_type :> any)
×
UNCOV
692
      | `SubstT (p1, p2) -> inner (p1 :> any) || inner (p2 :> any)
×
693
      | `Substituted m -> inner (m :> any)
224✔
UNCOV
694
      | `SubstitutedMT m -> inner (m :> any)
×
695
      | `SubstitutedT m -> inner (m :> any)
×
696
      | `SubstitutedCT m -> inner (m :> any)
×
697
      | `CanonicalModuleType (_, `Resolved _) -> false
4✔
698
      | `CanonicalModuleType (x, _) -> inner (x : module_type :> any)
×
699
      | `CanonicalType (_, `Resolved _) -> false
14✔
700
      | `CanonicalType (x, _) -> inner (x : type_ :> any)
×
701
      | `OpaqueModule m -> inner (m :> any)
13✔
702
      | `OpaqueModuleType mt -> inner (mt :> any)
413✔
703
    in
704
    inner x
705

706
  and is_path_hidden : Paths_types.Path.any -> bool =
707
    let open Paths_types.Path in
708
    function
709
    | `Resolved r -> is_resolved_hidden ~weak_canonical_test:false r
6,563✔
710
    | `Identifier (_, hidden) -> hidden
153✔
UNCOV
711
    | `Substituted r -> is_path_hidden (r :> any)
×
UNCOV
712
    | `SubstitutedMT r -> is_path_hidden (r :> any)
×
UNCOV
713
    | `SubstitutedT r -> is_path_hidden (r :> any)
×
UNCOV
714
    | `SubstitutedCT r -> is_path_hidden (r :> any)
×
715
    | `Root s -> contains_double_underscore s
10✔
716
    | `Forward _ -> false
×
717
    | `Dot (p, n) -> n.[0] = '{' || is_path_hidden (p : module_ :> any)
×
718
    | `Apply (p1, p2) ->
13✔
UNCOV
719
        is_path_hidden (p1 : module_ :> any)
×
720
        || is_path_hidden (p2 : module_ :> any)
721

722
  module Resolved = struct
723
    type t = Paths_types.Resolved_path.any
724

725
    let rec parent_module_type_identifier :
726
        Paths_types.Resolved_path.module_type -> Identifier.Signature.t =
727
      function
728
      | `Identifier id ->
160✔
729
          (id : Identifier.ModuleType.t :> Identifier.Signature.t)
730
      | `ModuleType (m, n) ->
70✔
731
          Identifier.Mk.module_type (parent_module_identifier m, n)
70✔
UNCOV
732
      | `SubstT (m, _n) -> parent_module_type_identifier m
×
UNCOV
733
      | `CanonicalModuleType (_, `Resolved p) -> parent_module_type_identifier p
×
UNCOV
734
      | `CanonicalModuleType (p, _) -> parent_module_type_identifier p
×
UNCOV
735
      | `OpaqueModuleType mt -> parent_module_type_identifier mt
×
736
      | `SubstitutedMT m -> parent_module_type_identifier m
×
737
      | `AliasModuleType (sub, orig) ->
31✔
738
          if is_resolved_hidden ~weak_canonical_test:false (sub :> t) then
739
            parent_module_type_identifier orig
×
740
          else parent_module_type_identifier sub
31✔
741

742
    and parent_module_identifier :
743
        Paths_types.Resolved_path.module_ -> Identifier.Signature.t = function
744
      | `Identifier id ->
1,253✔
745
          (id : Identifier.Path.Module.t :> Identifier.Signature.t)
746
      | `Subst (sub, _) -> parent_module_type_identifier sub
34✔
747
      | `Hidden p -> parent_module_identifier p
13✔
748
      | `Module (m, n) -> Identifier.Mk.module_ (parent_module_identifier m, n)
283✔
749
      | `Canonical (_, `Resolved p) -> parent_module_identifier p
170✔
750
      | `Canonical (p, _) -> parent_module_identifier p
4✔
751
      | `Apply (m, _) -> parent_module_identifier m
6✔
UNCOV
752
      | `Alias (dest, `Resolved src) ->
×
753
          if is_resolved_hidden ~weak_canonical_test:false (dest :> t) then
UNCOV
754
            parent_module_identifier src
×
UNCOV
755
          else parent_module_identifier dest
×
756
      | `Alias (dest, _src) -> parent_module_identifier dest
117✔
757
      | `Substituted m -> parent_module_identifier m
90✔
758
      | `OpaqueModule m -> parent_module_identifier m
×
759

760
    module Module = struct
761
      type t = Paths_types.Resolved_path.module_
762

763
      let is_hidden m =
764
        is_resolved_hidden (m : t :> Paths_types.Resolved_path.any)
21,132✔
765
    end
766

767
    module ModuleType = struct
768
      type t = Paths_types.Resolved_path.module_type
769
    end
770

771
    module Type = struct
772
      type t = Paths_types.Resolved_path.type_
773
    end
774

775
    module Value = struct
776
      type t = Paths_types.Resolved_path.value
777
    end
778

779
    module ClassType = struct
780
      type t = Paths_types.Resolved_path.class_type
781
    end
782

783
    let rec identifier : t -> Identifier.t = function
784
      | `Identifier id -> id
4,418✔
UNCOV
785
      | `Subst (sub, _) -> identifier (sub :> t)
×
786
      | `Hidden p -> identifier (p :> t)
24✔
787
      | `Module (m, n) -> Identifier.Mk.module_ (parent_module_identifier m, n)
415✔
788
      | `Canonical (_, `Resolved p) -> identifier (p :> t)
339✔
789
      | `Canonical (p, _) -> identifier (p :> t)
4✔
790
      | `Apply (m, _) -> identifier (m :> t)
13✔
791
      | `Type (m, n) -> Identifier.Mk.type_ (parent_module_identifier m, n)
496✔
792
      | `Value (m, n) -> Identifier.Mk.value (parent_module_identifier m, n)
15✔
793
      | `ModuleType (m, n) ->
216✔
794
          Identifier.Mk.module_type (parent_module_identifier m, n)
216✔
795
      | `Class (m, n) -> Identifier.Mk.class_ (parent_module_identifier m, n)
14✔
UNCOV
796
      | `ClassType (m, n) ->
×
UNCOV
797
          Identifier.Mk.class_type (parent_module_identifier m, n)
×
UNCOV
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,157✔
803
      | `AliasModuleType (sub, orig) ->
106✔
804
          if is_resolved_hidden ~weak_canonical_test:false (sub :> t) then
805
            identifier (orig :> t)
×
806
          else identifier (sub :> t)
106✔
UNCOV
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)
7✔
813
      | `OpaqueModuleType mt -> identifier (mt :> t)
200✔
814
      | `Substituted m -> identifier (m :> t)
6✔
815
      | `SubstitutedMT m -> identifier (m :> t)
×
UNCOV
816
      | `SubstitutedCT m -> identifier (m :> t)
×
UNCOV
817
      | `SubstitutedT m -> identifier (m :> t)
×
818

819
    let is_hidden r = is_resolved_hidden ~weak_canonical_test:false r
1,111✔
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) -> Path.Resolved.parent_module_type_identifier i
188✔
856
        | `Root (`Module i) -> Path.Resolved.parent_module_identifier i
13✔
857
        | `Subst (s, _) -> Path.Resolved.parent_module_type_identifier s
6✔
858
        | `Alias (i, _) -> Path.Resolved.parent_module_identifier i
12✔
859
        | `Module (m, n) -> Identifier.Mk.module_ (sgidentifier m, n)
13✔
UNCOV
860
        | `OpaqueModule m -> sgidentifier (m :> t)
×
861
    end
862

863
    module Module = struct
864
      type t = Paths_types.Resolved_fragment.module_
865
    end
866

867
    module ModuleType = struct
868
      type t = Paths_types.Resolved_fragment.module_type
869
    end
870

871
    module Type = struct
872
      type t = Paths_types.Resolved_fragment.type_
873
    end
874

875
    type leaf = Paths_types.Resolved_fragment.leaf
876

877
    let rec identifier : t -> Identifier.t = function
878
      | `Root (`ModuleType _r) -> assert false
879
      | `Root (`Module _r) -> assert false
UNCOV
880
      | `Subst (s, _) -> Path.Resolved.identifier (s :> Path.Resolved.t)
×
UNCOV
881
      | `Alias (p, _) ->
×
882
          (Path.Resolved.parent_module_identifier p :> Identifier.t)
883
      | `Module (m, n) -> Identifier.Mk.module_ (Signature.sgidentifier m, n)
61✔
884
      | `Module_type (m, n) ->
36✔
885
          Identifier.Mk.module_type (Signature.sgidentifier m, n)
36✔
886
      | `Type (m, n) -> Identifier.Mk.type_ (Signature.sgidentifier m, n)
122✔
UNCOV
887
      | `Class (m, n) -> Identifier.Mk.class_ (Signature.sgidentifier m, n)
×
UNCOV
888
      | `ClassType (m, n) ->
×
UNCOV
889
          Identifier.Mk.class_type (Signature.sgidentifier m, n)
×
UNCOV
890
      | `OpaqueModule m -> identifier (m :> t)
×
891

892
    let rec is_hidden : t -> bool = function
893
      | `Root (`ModuleType r) -> Path.Resolved.(is_hidden (r :> t))
188✔
894
      | `Root (`Module r) -> Path.Resolved.(is_hidden (r :> t))
13✔
895
      | `Subst (s, _) -> Path.Resolved.(is_hidden (s :> t))
6✔
896
      | `Alias (s, _) -> Path.Resolved.(is_hidden (s :> t))
12✔
897
      | `Module (m, _)
74✔
898
      | `Module_type (m, _)
36✔
899
      | `Type (m, _)
122✔
UNCOV
900
      | `Class (m, _)
×
UNCOV
901
      | `ClassType (m, _) ->
×
902
          is_hidden (m :> t)
UNCOV
903
      | `OpaqueModule m -> is_hidden (m :> t)
×
904
  end
905

906
  type t = Paths_types.Fragment.any
907

908
  module Signature = struct
909
    type t = Paths_types.Fragment.signature
910
  end
911

912
  module Module = struct
913
    type t = Paths_types.Fragment.module_
914
  end
915

916
  module ModuleType = struct
917
    type t = Paths_types.Fragment.module_type
918
  end
919

920
  module Type = struct
921
    type t = Paths_types.Fragment.type_
922
  end
923

924
  type leaf = Paths_types.Fragment.leaf
925
end
926

927
module Reference = struct
928
  module Resolved = struct
929
    open Paths_types.Resolved_reference
930

931
    type t = Paths_types.Resolved_reference.any
932

933
    let rec parent_signature_identifier : signature -> Identifier.Signature.t =
934
      function
935
      | `Identifier id -> id
128✔
UNCOV
936
      | `Hidden s -> parent_signature_identifier (s :> signature)
×
937
      | `Alias (sub, orig) ->
36✔
938
          if Path.Resolved.(is_hidden (sub :> t)) then
36✔
UNCOV
939
            parent_signature_identifier (orig :> signature)
×
940
          else
941
            (Path.Resolved.parent_module_identifier sub
36✔
942
              :> Identifier.Signature.t)
943
      | `AliasModuleType (sub, orig) ->
2✔
944
          if Path.Resolved.(is_hidden (sub :> t)) then
2✔
UNCOV
945
            parent_signature_identifier (orig :> signature)
×
946
          else
947
            (Path.Resolved.parent_module_type_identifier sub
2✔
948
              :> Identifier.Signature.t)
949
      | `Module (m, n) ->
36✔
950
          Identifier.Mk.module_ (parent_signature_identifier m, n)
36✔
951
      | `ModuleType (m, s) ->
42✔
952
          Identifier.Mk.module_type (parent_signature_identifier m, s)
42✔
953

954
    and parent_type_identifier : datatype -> Identifier.DataType.t = function
955
      | `Identifier id -> id
9✔
956
      | `Type (sg, s) -> Identifier.Mk.type_ (parent_signature_identifier sg, s)
70✔
957

958
    and parent_class_signature_identifier :
959
        class_signature -> Identifier.ClassSignature.t = function
UNCOV
960
      | `Identifier id -> id
×
UNCOV
961
      | `Class (sg, s) ->
×
UNCOV
962
          Identifier.Mk.class_ (parent_signature_identifier sg, s)
×
UNCOV
963
      | `ClassType (sg, s) ->
×
964
          Identifier.Mk.class_type (parent_signature_identifier sg, s)
×
965

966
    and field_parent_identifier : field_parent -> Identifier.FieldParent.t =
967
      function
968
      | `Identifier id -> id
×
UNCOV
969
      | (`Hidden _ | `Alias _ | `AliasModuleType _ | `Module _ | `ModuleType _)
×
970
        as sg ->
971
          (parent_signature_identifier sg :> Identifier.FieldParent.t)
972
      | `Type _ as t -> (parent_type_identifier t :> Identifier.FieldParent.t)
66✔
973

974
    and label_parent_identifier : label_parent -> Identifier.LabelParent.t =
975
      function
976
      | `Identifier id -> id
18✔
UNCOV
977
      | (`Class _ | `ClassType _) as c ->
×
978
          (parent_class_signature_identifier c :> Identifier.LabelParent.t)
UNCOV
979
      | ( `Hidden _ | `Alias _ | `AliasModuleType _ | `Module _ | `ModuleType _
×
980
        | `Type _ ) as r ->
66✔
981
          (field_parent_identifier r :> Identifier.LabelParent.t)
982

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

1011
    module Signature = struct
1012
      type t = Paths_types.Resolved_reference.signature
1013
    end
1014

1015
    module ClassSignature = struct
1016
      type t = Paths_types.Resolved_reference.class_signature
1017
    end
1018

1019
    module DataType = struct
1020
      type t = Paths_types.Resolved_reference.datatype
1021
    end
1022

1023
    module FieldParent = struct
1024
      type t = Paths_types.Resolved_reference.field_parent
1025
    end
1026

1027
    module LabelParent = struct
1028
      type t = Paths_types.Resolved_reference.label_parent
1029
    end
1030

1031
    module Module = struct
1032
      type t = Paths_types.Resolved_reference.module_
1033
    end
1034

1035
    module ModuleType = struct
1036
      type t = Paths_types.Resolved_reference.module_type
1037
    end
1038

1039
    module Type = struct
1040
      type t = Paths_types.Resolved_reference.type_
1041
    end
1042

1043
    module Constructor = struct
1044
      type t = Paths_types.Resolved_reference.constructor
1045
    end
1046

1047
    module Field = struct
1048
      type t = Paths_types.Resolved_reference.field
1049
    end
1050

1051
    module Extension = struct
1052
      type t = Paths_types.Resolved_reference.extension
1053
    end
1054

1055
    module ExtensionDecl = struct
1056
      type t = Paths_types.Resolved_reference.extension_decl
1057
    end
1058

1059
    module Exception = struct
1060
      type t = Paths_types.Resolved_reference.exception_
1061
    end
1062

1063
    module Value = struct
1064
      type t = Paths_types.Resolved_reference.value
1065
    end
1066

1067
    module Class = struct
1068
      type t = Paths_types.Resolved_reference.class_
1069
    end
1070

1071
    module ClassType = struct
1072
      type t = Paths_types.Resolved_reference.class_type
1073
    end
1074

1075
    module Method = struct
1076
      type t = Paths_types.Resolved_reference.method_
1077
    end
1078

1079
    module InstanceVariable = struct
1080
      type t = Paths_types.Resolved_reference.instance_variable
1081
    end
1082

1083
    module Label = struct
1084
      type t = Paths_types.Resolved_reference.label
1085
    end
1086

1087
    module Page = struct
1088
      type t = Paths_types.Resolved_reference.page
1089
    end
1090
  end
1091

1092
  type t = Paths_types.Reference.any
1093

1094
  type tag_any = Paths_types.Reference.tag_any
1095
  type tag_hierarchy = Paths_types.Reference.tag_hierarchy
1096

1097
  module Signature = struct
1098
    type t = Paths_types.Reference.signature
1099
  end
1100

1101
  module ClassSignature = struct
1102
    type t = Paths_types.Reference.class_signature
1103
  end
1104

1105
  module DataType = struct
1106
    type t = Paths_types.Reference.datatype
1107
  end
1108

1109
  module FragmentTypeParent = struct
1110
    type t = Paths_types.Reference.fragment_type_parent
1111
  end
1112

1113
  module LabelParent = struct
1114
    type t = Paths_types.Reference.label_parent
1115
  end
1116

1117
  module Module = struct
1118
    type t = Paths_types.Reference.module_
1119
  end
1120

1121
  module ModuleType = struct
1122
    type t = Paths_types.Reference.module_type
1123
  end
1124

1125
  module Type = struct
1126
    type t = Paths_types.Reference.type_
1127
  end
1128

1129
  module Constructor = struct
1130
    type t = Paths_types.Reference.constructor
1131
  end
1132

1133
  module Field = struct
1134
    type t = Paths_types.Reference.field
1135
  end
1136

1137
  module Extension = struct
1138
    type t = Paths_types.Reference.extension
1139
  end
1140

1141
  module ExtensionDecl = struct
1142
    type t = Paths_types.Reference.extension_decl
1143
  end
1144

1145
  module Exception = struct
1146
    type t = Paths_types.Reference.exception_
1147
  end
1148

1149
  module Value = struct
1150
    type t = Paths_types.Reference.value
1151
  end
1152

1153
  module Class = struct
1154
    type t = Paths_types.Reference.class_
1155
  end
1156

1157
  module ClassType = struct
1158
    type t = Paths_types.Reference.class_type
1159
  end
1160

1161
  module Method = struct
1162
    type t = Paths_types.Reference.method_
1163
  end
1164

1165
  module InstanceVariable = struct
1166
    type t = Paths_types.Reference.instance_variable
1167
  end
1168

1169
  module Label = struct
1170
    type t = Paths_types.Reference.label
1171
  end
1172

1173
  module Page = struct
1174
    type t = Paths_types.Reference.page
1175
  end
1176

1177
  module Hierarchy = struct
1178
    type t = Paths_types.Reference.hierarchy
1179
  end
1180
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