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

ocaml / odoc / 2403

02 Oct 2024 03:15PM UTC coverage: 72.971% (+0.1%) from 72.848%
2403

Pull #1193

github

web-flow
Merge 93aa604a2 into 0ba1fdbe6
Pull Request #1193: Specify children order in frontmatter

140 of 154 new or added lines in 10 files covered. (90.91%)

60 existing lines in 5 files now uncovered.

10248 of 14044 relevant lines covered (72.97%)

2965.35 hits per line

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

61.01
/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,908✔
34
    | `Root (_, name) -> ModuleName.to_string name
403✔
35
    | `Page (_, name) -> PageName.to_string name
3✔
36
    | `LeafPage (_, name) -> PageName.to_string name
15✔
37
    | `Module (_, name) -> ModuleName.to_string name
53,483✔
38
    | `Parameter (_, name) -> ModuleName.to_string name
586✔
39
    | `Result x -> name_aux (x :> t)
×
40
    | `ModuleType (_, name) -> ModuleTypeName.to_string name
35,171✔
41
    | `Type (_, name) -> TypeName.to_string name
70,088✔
42
    | `CoreType name -> TypeName.to_string name
1,889✔
43
    | `Constructor (_, name) -> ConstructorName.to_string name
878✔
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
985✔
50
    | `Class (_, name) -> TypeName.to_string name
211✔
51
    | `ClassType (_, name) -> TypeName.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
348✔
55
    | `SourcePage (dir, name) -> name_aux (dir :> t) ^ name
×
56
    | `SourceLocation (x, anchor) ->
×
57
        name_aux (x :> t) ^ "#" ^ DefName.to_string anchor
×
58
    | `SourceLocationMod x -> name_aux (x :> t)
×
59
    | `SourceLocationInternal (x, anchor) ->
×
60
        name_aux (x :> t) ^ "#" ^ LocalName.to_string anchor
×
61
    | `AssetFile (_, name) -> AssetName.to_string name
6✔
62

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

91
  let name : [< t_pv ] id -> string = fun n -> name_aux (n :> t)
164,908✔
92

93
  let rec full_name_aux : t -> string list =
94
   fun x ->
95
    match x.iv with
315✔
96
    | `Root (_, name) -> [ ModuleName.to_string name ]
120✔
97
    | `Page (None, name) -> [ PageName.to_string name ]
31✔
98
    | `Page (Some parent, name) ->
4✔
99
        PageName.to_string name :: full_name_aux (parent :> t)
4✔
100
    | `LeafPage (None, name) -> [ PageName.to_string name ]
×
101
    | `LeafPage (Some parent, name) ->
×
102
        PageName.to_string name :: full_name_aux (parent :> t)
×
103
    | `Module (parent, name) ->
77✔
104
        ModuleName.to_string name :: full_name_aux (parent :> t)
77✔
105
    | `Parameter (parent, name) ->
×
106
        ModuleName.to_string name :: full_name_aux (parent :> t)
×
107
    | `Result x -> full_name_aux (x :> t)
×
108
    | `ModuleType (parent, name) ->
12✔
109
        ModuleTypeName.to_string name :: full_name_aux (parent :> t)
12✔
110
    | `Type (parent, name) ->
11✔
111
        TypeName.to_string name :: full_name_aux (parent :> t)
11✔
112
    | `CoreType name -> [ TypeName.to_string name ]
×
113
    | `Constructor (parent, name) ->
2✔
114
        ConstructorName.to_string name :: full_name_aux (parent :> t)
2✔
115
    | `Field (parent, name) ->
×
116
        FieldName.to_string name :: full_name_aux (parent :> t)
×
117
    | `Extension (parent, name) ->
×
118
        ExtensionName.to_string name :: full_name_aux (parent :> t)
×
119
    | `ExtensionDecl (parent, _, name) ->
×
120
        ExtensionName.to_string name :: full_name_aux (parent :> t)
×
121
    | `Exception (parent, name) ->
×
122
        ExceptionName.to_string name :: full_name_aux (parent :> t)
×
123
    | `CoreException name -> [ ExceptionName.to_string name ]
×
124
    | `Value (parent, name) ->
31✔
125
        ValueName.to_string name :: full_name_aux (parent :> t)
31✔
126
    | `Class (parent, name) ->
×
127
        TypeName.to_string name :: full_name_aux (parent :> t)
×
128
    | `ClassType (parent, name) ->
×
129
        TypeName.to_string name :: full_name_aux (parent :> t)
×
130
    | `Method (parent, name) ->
×
131
        MethodName.to_string name :: full_name_aux (parent :> t)
×
132
    | `InstanceVariable (parent, name) ->
×
133
        InstanceVariableName.to_string name :: full_name_aux (parent :> t)
×
134
    | `Label (parent, name) ->
2✔
135
        LabelName.to_string name :: full_name_aux (parent :> t)
2✔
136
    | `SourceLocation (parent, name) ->
×
137
        DefName.to_string name :: full_name_aux (parent :> t)
×
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) ->
×
143
        AssetName.to_string name :: full_name_aux (parent :> t)
×
144

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

148
  let is_hidden : [< t_pv ] id -> bool = fun n -> is_hidden (n :> t)
5,060✔
149

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

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

178
  let equal x y = x.ihash = y.ihash && x.ikey = y.ikey
280✔
179

180
  let hash x = x.ihash
534✔
181

182
  let compare x y = compare x.ikey y.ikey
1,984,573✔
183

184
  type any = t
185

186
  type any_pv = t_pv
187

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

308
    type t_pv = Paths_types.Identifier.extension_decl_pv
309

310
    let equal = equal
311

312
    let hash = hash
313

314
    let compare = compare
315
  end
316

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

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

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

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

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

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

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

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

366
  module LeafPage = struct
367
    type t = Id.leaf_page
368
    type t_pv = Id.leaf_page_pv
369
    let equal = equal
370
    let hash = hash
371
  end
372

373
  module ContainerPage = struct
374
    type t = Id.container_page
375
    type t_pv = Id.container_page_pv
376
    let equal = equal
377
    let hash = hash
378
  end
379

380
  module NonSrc = struct
381
    type t = Paths_types.Identifier.non_src
382
    type t_pv = Paths_types.Identifier.non_src_pv
383

NEW
384
    let equal x y = x.ihash = y.ihash && x.ikey = y.ikey
×
385

NEW
386
    let hash x = x.ihash
×
387
  end
388

389
  module SourcePage = struct
390
    type t = Id.source_page
391
    type t_pv = Id.source_page_pv
392
  end
393

394
  module SourceLocation = struct
395
    type t = Paths_types.Identifier.source_location
396
    type t_pv = Paths_types.Identifier.source_location_pv
397
  end
398

399
  module AssetFile = struct
400
    type t = Id.asset_file
401
    type t_pv = Id.asset_file_pv
402
  end
403

404
  module OdocId = struct
405
    type t = Id.odoc_id
406
    type t_pv = Id.odoc_id_pv
407
  end
408

409
  module Path = struct
410
    module Module = struct
411
      type t = Id.path_module
412
      type t_pv = Id.path_module_pv
413
      let equal = equal
414
      let hash = hash
415
      let compare = compare
416
    end
417

418
    module ModuleType = struct
419
      type t = Id.path_module_type
420
      type t_pv = Id.module_type_pv
421
      let equal = equal
422
      let hash = hash
423
      let compare = compare
424
    end
425

426
    module Type = struct
427
      type t = Id.path_type
428
      type t_pv = Id.path_type_pv
429
      let equal = equal
430
      let hash = hash
431
      let compare = compare
432
    end
433

434
    module Value = struct
435
      type t = Id.path_value
436
      type t_pv = Id.value_pv
437
      let equal = equal
438
      let hash = hash
439
      let compare = compare
440
    end
441

442
    module ClassType = struct
443
      type t = Id.path_class_type
444
      type t_pv = Id.path_class_type_pv
445
      let equal = equal
446
      let hash = hash
447
      let compare = compare
448
    end
449

450
    type t = Id.path_any
451
  end
452

453
  module Maps = struct
454
    module Any = Map.Make (Any)
455
    module FunctorParameter = Map.Make (FunctorParameter)
456
    module Module = Map.Make (Module)
457
    module ModuleType = Map.Make (ModuleType)
458
    module Type = Map.Make (Type)
459
    module Class = Map.Make (Class)
460
    module ClassType = Map.Make (ClassType)
461
    module Label = Map.Make (Label)
462

463
    module Path = struct
464
      module Module = Map.Make (Path.Module)
465
      module ModuleType = Map.Make (Path.ModuleType)
466
      module Type = Map.Make (Path.Type)
467
      module ClassType = Map.Make (Path.ClassType)
468
    end
469
  end
470

471
  module Mk = struct
472
    let mk_fresh to_str ty f x =
473
      let ikey = Printf.sprintf "%s_%s" ty (to_str x) in
5,982✔
474
      let ihash = Hashtbl.hash ikey in
5,982✔
475
      { iv = f x; ihash; ikey }
5,982✔
476

477
    let mk_parent to_str ty f (parent, x) =
478
      let ikey = Printf.sprintf "%s_%s.%s" ty (to_str x) parent.ikey in
13,851✔
479
      let ihash = Hashtbl.hash ikey in
13,851✔
480

481
      { iv = f (parent, x); ihash; ikey }
13,851✔
482

483
    let mk_parent_opt to_str ty f (parent_opt, x) =
484
      let ikey =
1,192✔
485
        match parent_opt with
486
        | None -> Printf.sprintf "%s_%s" ty (to_str x)
930✔
487
        | Some p -> Printf.sprintf "%s_%s.%s" ty (to_str x) p.ikey
262✔
488
      in
489
      let ihash = Hashtbl.hash ikey in
490
      { iv = f (parent_opt, x); ihash; ikey }
1,192✔
491

492
    let page :
493
        ContainerPage.t option * PageName.t ->
494
        [> `Page of ContainerPage.t option * PageName.t ] id =
495
      mk_parent_opt PageName.to_string "p" (fun (p, n) -> `Page (p, n))
676✔
496

497
    let leaf_page :
498
        ContainerPage.t option * PageName.t ->
499
        [> `LeafPage of ContainerPage.t option * PageName.t ] id =
500
      mk_parent_opt PageName.to_string "lp" (fun (p, n) -> `LeafPage (p, n))
52✔
501

502
    let asset_file : Page.t * AssetName.t -> AssetFile.t =
503
      mk_parent AssetName.to_string "asset" (fun (p, n) -> `AssetFile (p, n))
5✔
504

505
    let source_page (container_page, name) =
506
      mk_parent
25✔
507
        (fun x -> x)
25✔
508
        "sp"
509
        (fun (p, rp) -> `SourcePage (p, rp))
25✔
510
        (container_page, name)
511

512
    let root :
513
        ContainerPage.t option * ModuleName.t ->
514
        [> `Root of ContainerPage.t option * ModuleName.t ] id =
515
      mk_parent_opt ModuleName.to_string "r" (fun (p, n) -> `Root (p, n))
464✔
516

517
    let implementation =
518
      mk_fresh
1,063✔
519
        (fun s -> s)
31✔
520
        "impl"
521
        (fun s -> `Implementation (ModuleName.make_std s))
31✔
522

523
    let module_ :
524
        Signature.t * ModuleName.t ->
525
        [> `Module of Signature.t * ModuleName.t ] id =
526
      mk_parent ModuleName.to_string "m" (fun (p, n) -> `Module (p, n))
1,063✔
527

528
    let parameter :
529
        Signature.t * ModuleName.t ->
530
        [> `Parameter of Signature.t * ModuleName.t ] id =
531
      mk_parent ModuleName.to_string "p" (fun (p, n) -> `Parameter (p, n))
71✔
532

533
    let result : Signature.t -> [> `Result of Signature.t ] id =
534
     fun s ->
535
      mk_parent (fun () -> "__result__") "" (fun (s, ()) -> `Result s) (s, ())
181✔
536

537
    let module_type :
538
        Signature.t * ModuleTypeName.t ->
539
        [> `ModuleType of Signature.t * ModuleTypeName.t ] id =
540
      mk_parent ModuleTypeName.to_string "mt" (fun (p, n) -> `ModuleType (p, n))
955✔
541

542
    let class_ :
543
        Signature.t * TypeName.t -> [> `Class of Signature.t * TypeName.t ] id =
544
      mk_parent TypeName.to_string "c" (fun (p, n) -> `Class (p, n))
47✔
545

546
    let class_type :
547
        Signature.t * TypeName.t ->
548
        [> `ClassType of Signature.t * TypeName.t ] id =
549
      mk_parent TypeName.to_string "ct" (fun (p, n) -> `ClassType (p, n))
21✔
550

551
    let type_ :
552
        Signature.t * TypeName.t -> [> `Type of Signature.t * TypeName.t ] id =
553
      mk_parent TypeName.to_string "t" (fun (p, n) -> `Type (p, n))
1,063✔
554

555
    let core_type =
556
      mk_fresh (fun s -> s) "coret" (fun s -> `CoreType (TypeName.make_std s))
1,063✔
557

558
    let constructor :
559
        DataType.t * ConstructorName.t ->
560
        [> `Constructor of DataType.t * ConstructorName.t ] id =
561
      mk_parent ConstructorName.to_string "ctor" (fun (p, n) ->
1,063✔
562
          `Constructor (p, n))
7,033✔
563

564
    let field :
565
        FieldParent.t * FieldName.t ->
566
        [> `Field of FieldParent.t * FieldName.t ] id =
567
      mk_parent FieldName.to_string "fld" (fun (p, n) -> `Field (p, n))
42✔
568

569
    let extension :
570
        Signature.t * ExtensionName.t ->
571
        [> `Extension of Signature.t * ExtensionName.t ] id =
572
      mk_parent ExtensionName.to_string "extn" (fun (p, n) -> `Extension (p, n))
39✔
573

574
    let extension_decl :
575
        Signature.t * (ExtensionName.t * ExtensionName.t) ->
576
        [> `ExtensionDecl of Signature.t * ExtensionName.t * ExtensionName.t ]
577
        id =
578
      mk_parent
1,063✔
579
        (fun (n, m) ->
580
          ExtensionName.to_string n ^ "." ^ ExtensionName.to_string m)
4✔
581
        "extn-decl"
582
        (fun (p, (n, m)) -> `ExtensionDecl (p, n, m))
4✔
583

584
    let exception_ :
585
        Signature.t * ExceptionName.t ->
586
        [> `Exception of Signature.t * ExceptionName.t ] id =
587
      mk_parent ExceptionName.to_string "exn" (fun (p, n) -> `Exception (p, n))
15✔
588

589
    let core_exception =
590
      mk_fresh
1,063✔
591
        (fun s -> s)
×
592
        "coreexn"
593
        (fun s -> `CoreException (ExceptionName.make_std s))
×
594

595
    let value :
596
        Signature.t * ValueName.t -> [> `Value of Signature.t * ValueName.t ] id
597
        =
598
      mk_parent ValueName.to_string "v" (fun (p, n) -> `Value (p, n))
469✔
599

600
    let method_ :
601
        ClassSignature.t * MethodName.t ->
602
        [> `Method of ClassSignature.t * MethodName.t ] id =
603
      mk_parent MethodName.to_string "m" (fun (p, n) -> `Method (p, n))
38✔
604

605
    let instance_variable :
606
        ClassSignature.t * InstanceVariableName.t ->
607
        [> `InstanceVariable of ClassSignature.t * InstanceVariableName.t ] id =
608
      mk_parent InstanceVariableName.to_string "iv" (fun (p, n) ->
1,063✔
609
          `InstanceVariable (p, n))
4✔
610

611
    let label :
612
        LabelParent.t * LabelName.t ->
613
        [> `Label of LabelParent.t * LabelName.t ] id =
614
      mk_parent LabelName.to_string "l" (fun (p, n) -> `Label (p, n))
340✔
615

616
    let source_location :
617
        SourcePage.t * DefName.t ->
618
        [> `SourceLocation of SourcePage.t * DefName.t ] id =
619
      mk_parent DefName.to_string "sl" (fun (p, n) -> `SourceLocation (p, n))
100✔
620

621
    let source_location_mod :
622
        SourcePage.t -> [> `SourceLocationMod of SourcePage.t ] id =
623
     fun s ->
624
      mk_parent
33✔
625
        (fun () -> "__slm__")
33✔
626
        ""
627
        (fun (s, ()) -> `SourceLocationMod s)
33✔
628
        (s, ())
629

630
    let source_location_int :
631
        SourcePage.t * LocalName.t ->
632
        [> `SourceLocationInternal of SourcePage.t * LocalName.t ] id =
633
      mk_parent LocalName.to_string "sli" (fun (p, n) ->
1,063✔
634
          `SourceLocationInternal (p, n))
4✔
635
  end
636

637
  module Hashtbl = struct
638
    module Any = Hashtbl.Make (Any)
639
    module ContainerPage = Hashtbl.Make (ContainerPage)
640
    module LeafPage = Hashtbl.Make (LeafPage)
641
  end
642
end
643

644
module Path = struct
645
  type t = Paths_types.Path.any
646

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

698
  and is_path_hidden : Paths_types.Path.any -> bool =
699
    let open Paths_types.Path in
700
    function
701
    | `Resolved r -> is_resolved_hidden ~weak_canonical_test:false r
6,589✔
702
    | `Identifier (_, hidden) -> hidden
153✔
703
    | `Substituted r -> is_path_hidden (r :> any)
×
704
    | `SubstitutedMT r -> is_path_hidden (r :> any)
×
705
    | `SubstitutedT r -> is_path_hidden (r :> any)
×
706
    | `SubstitutedCT r -> is_path_hidden (r :> any)
×
707
    | `Root s -> ModuleName.is_hidden s
10✔
708
    | `Forward _ -> false
×
709
    | `Dot (p, n) ->
93✔
710
        ModuleName.is_hidden n || is_path_hidden (p : module_ :> any)
×
711
    | `DotMT (p, n) ->
×
712
        ModuleTypeName.is_hidden n || is_path_hidden (p : module_ :> any)
×
713
    | `DotT (p, n) ->
3✔
714
        TypeName.is_hidden n || is_path_hidden (p : module_ :> any)
×
715
    | `DotV (p, n) ->
×
716
        ValueName.is_hidden n || is_path_hidden (p : module_ :> any)
×
717
    | `Apply (p1, p2) ->
13✔
718
        is_path_hidden (p1 : module_ :> any)
×
719
        || is_path_hidden (p2 : module_ :> any)
720

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

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

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

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

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

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

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

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

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

782
    let rec identifier : t -> Identifier.t = function
783
      | `Identifier id -> id
4,442✔
784
      | `Subst (sub, _) -> identifier (sub :> t)
×
785
      | `Hidden p -> identifier (p :> t)
24✔
786
      | `Module (m, n) -> Identifier.Mk.module_ (parent_module_identifier m, n)
416✔
787
      | `Canonical (_, `Resolved p) -> identifier (p :> t)
343✔
788
      | `Canonical (p, _) -> identifier (p :> t)
5✔
789
      | `Apply (m, _) -> identifier (m :> t)
13✔
790
      | `Type (m, n) -> Identifier.Mk.type_ (parent_module_identifier m, n)
499✔
791
      | `Value (m, n) -> Identifier.Mk.value (parent_module_identifier m, n)
15✔
792
      | `ModuleType (m, n) ->
218✔
793
          Identifier.Mk.module_type (parent_module_identifier m, n)
218✔
794
      | `Class (m, n) -> Identifier.Mk.class_ (parent_module_identifier m, n)
14✔
795
      | `ClassType (m, n) ->
×
796
          Identifier.Mk.class_type (parent_module_identifier m, n)
×
797
      | `Alias (dest, `Resolved src) ->
×
798
          if is_resolved_hidden ~weak_canonical_test:false (dest :> t) then
799
            identifier (src :> t)
×
800
          else identifier (dest :> t)
×
801
      | `Alias (dest, _src) -> identifier (dest :> t)
20,157✔
802
      | `AliasModuleType (sub, orig) ->
106✔
803
          if is_resolved_hidden ~weak_canonical_test:false (sub :> t) then
804
            identifier (orig :> t)
×
805
          else identifier (sub :> t)
106✔
806
      | `SubstT (p, _) -> identifier (p :> t)
×
807
      | `CanonicalModuleType (_, `Resolved p) -> identifier (p :> t)
4✔
808
      | `CanonicalModuleType (p, _) -> identifier (p :> t)
×
809
      | `CanonicalType (_, `Resolved p) -> identifier (p :> t)
8✔
810
      | `CanonicalType (p, _) -> identifier (p :> t)
×
811
      | `OpaqueModule m -> identifier (m :> t)
7✔
812
      | `OpaqueModuleType mt -> identifier (mt :> t)
200✔
813
      | `Substituted m -> identifier (m :> t)
6✔
814
      | `SubstitutedMT m -> identifier (m :> t)
×
815
      | `SubstitutedCT m -> identifier (m :> t)
×
816
      | `SubstitutedT m -> identifier (m :> t)
×
817

818
    let is_hidden r = is_resolved_hidden ~weak_canonical_test:false r
1,120✔
819
  end
820

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

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

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

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

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

841
  let is_hidden = is_path_hidden
842
end
843

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

848
    type root = Paths_types.Resolved_fragment.root
849

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

853
      let rec sgidentifier : t -> Identifier.Signature.t = function
854
        | `Root (`ModuleType i) -> Path.Resolved.parent_module_type_identifier i
188✔
855
        | `Root (`Module i) -> Path.Resolved.parent_module_identifier i
13✔
856
        | `Subst (s, _) -> Path.Resolved.parent_module_type_identifier s
6✔
857
        | `Alias (i, _) -> Path.Resolved.parent_module_identifier i
12✔
858
        | `Module (m, n) -> Identifier.Mk.module_ (sgidentifier m, n)
13✔
859
        | `OpaqueModule m -> sgidentifier (m :> t)
×
860
    end
861

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

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

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

874
    type leaf = Paths_types.Resolved_fragment.leaf
875

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

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

905
  type t = Paths_types.Fragment.any
906

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

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

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

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

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

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

930
    type t = Paths_types.Resolved_reference.any
931

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

1090
    module Asset = struct
1091
      let identifier = function `Identifier id -> id
9✔
1092

1093
      type t = Paths_types.Resolved_reference.asset
1094
    end
1095
  end
1096

1097
  type t = Paths_types.Reference.any
1098

1099
  type tag_any = Paths_types.Reference.tag_any
1100
  type tag_hierarchy = Paths_types.Reference.tag_hierarchy
1101

1102
  module Signature = struct
1103
    type t = Paths_types.Reference.signature
1104
  end
1105

1106
  module ClassSignature = struct
1107
    type t = Paths_types.Reference.class_signature
1108
  end
1109

1110
  module DataType = struct
1111
    type t = Paths_types.Reference.datatype
1112
  end
1113

1114
  module FragmentTypeParent = struct
1115
    type t = Paths_types.Reference.fragment_type_parent
1116
  end
1117

1118
  module LabelParent = struct
1119
    type t = Paths_types.Reference.label_parent
1120
  end
1121

1122
  module Module = struct
1123
    type t = Paths_types.Reference.module_
1124
  end
1125

1126
  module ModuleType = struct
1127
    type t = Paths_types.Reference.module_type
1128
  end
1129

1130
  module Type = struct
1131
    type t = Paths_types.Reference.type_
1132
  end
1133

1134
  module Constructor = struct
1135
    type t = Paths_types.Reference.constructor
1136
  end
1137

1138
  module Field = struct
1139
    type t = Paths_types.Reference.field
1140
  end
1141

1142
  module Extension = struct
1143
    type t = Paths_types.Reference.extension
1144
  end
1145

1146
  module ExtensionDecl = struct
1147
    type t = Paths_types.Reference.extension_decl
1148
  end
1149

1150
  module Exception = struct
1151
    type t = Paths_types.Reference.exception_
1152
  end
1153

1154
  module Value = struct
1155
    type t = Paths_types.Reference.value
1156
  end
1157

1158
  module Class = struct
1159
    type t = Paths_types.Reference.class_
1160
  end
1161

1162
  module ClassType = struct
1163
    type t = Paths_types.Reference.class_type
1164
  end
1165

1166
  module Method = struct
1167
    type t = Paths_types.Reference.method_
1168
  end
1169

1170
  module InstanceVariable = struct
1171
    type t = Paths_types.Reference.instance_variable
1172
  end
1173

1174
  module Label = struct
1175
    type t = Paths_types.Reference.label
1176
  end
1177

1178
  module Page = struct
1179
    type t = Paths_types.Reference.page
1180
  end
1181

1182
  module Asset = struct
1183
    type t = Paths_types.Reference.asset
1184
  end
1185

1186
  module Hierarchy = struct
1187
    type t = Paths_types.Reference.hierarchy
1188
  end
1189
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

© 2025 Coveralls, Inc