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

ocaml / odoc / 2108

03 Jul 2024 07:23AM UTC coverage: 71.946% (+0.2%) from 71.774%
2108

Pull #1145

github

web-flow
Merge 0b753d1e4 into 7e1e6ac92
Pull Request #1145: "Global" Sidebar

197 of 230 new or added lines in 12 files covered. (85.65%)

627 existing lines in 13 files now uncovered.

9835 of 13670 relevant lines covered (71.95%)

3555.77 hits per line

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

61.17
/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,877✔
34
    | `Root (_, name) -> ModuleName.to_string name
389✔
35
    | `Page (_, name) -> PageName.to_string name
4✔
36
    | `LeafPage (_, name) -> PageName.to_string name
3✔
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,082✔
42
    | `CoreType name -> TypeName.to_string name
1,957✔
43
    | `Constructor (_, name) -> ConstructorName.to_string name
872✔
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
974✔
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
311✔
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,095✔
69
    | `Root (_, name) -> ModuleName.is_hidden name
1,828✔
70
    | `Page (_, _) -> false
×
71
    | `LeafPage (_, _) -> false
×
72
    | `Module (_, name) -> ModuleName.is_hidden name
1,639✔
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
562✔
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
249✔
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,877✔
95

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

148
  let fullname : [< t_pv ] id -> string list =
149
   fun n -> List.rev @@ full_name_aux (n :> t)
236✔
150

151
  let is_hidden : [< t_pv ] id -> bool = fun n -> is_hidden (n :> t)
4,990✔
152

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

179
  let label_parent n = label_parent_aux (n :> Id.non_src)
13✔
180

181
  let equal x y = x.ihash = y.ihash && x.ikey = y.ikey
237✔
182

183
  let hash x = x.ihash
280✔
184

185
  let compare x y = compare x.ikey y.ikey
1,984,255✔
186

187
  type any = t
188

189
  type any_pv = t_pv
190

191
  module type IdSig = sig
192
    type t
193
    type t_pv
194
    val equal : t -> t -> bool
195
    val hash : t -> int
196
    val compare : t -> t -> int
197
  end
198

199
  module Any = struct
200
    type t = any
201
    type t_pv = any_pv
202
    let equal = equal
203
    let hash = hash
204
    let compare = compare
205
  end
206

207
  module Signature = struct
208
    type t = Id.signature
209
    type t_pv = Id.signature_pv
210
    let equal = equal
211
    let hash = hash
212
    let compare = compare
213
  end
214

215
  module ClassSignature = struct
216
    type t = Id.class_signature
217
    type t_pv = Id.class_signature_pv
218
    let equal = equal
219
    let hash = hash
220
    let compare = compare
221
  end
222

223
  module DataType = struct
224
    type t = Id.datatype
225
    type t_pv = Id.datatype_pv
226
  end
227

228
  module FieldParent = struct
229
    type t = Paths_types.Identifier.field_parent
230
    type t_pv = Paths_types.Identifier.field_parent_pv
231
  end
232

233
  module LabelParent = struct
234
    type t = Id.label_parent
235
    type t_pv = Id.label_parent_pv
236
    let equal = equal
237
    let hash = hash
238
    let compare = compare
239
  end
240

241
  module RootModule = struct
242
    type t = Id.root_module
243
    type t_pv = Id.root_module_pv
244
    let equal = equal
245
    let hash = hash
246
    let compare = compare
247
  end
248

249
  module Module = struct
250
    type t = Id.module_
251
    type t_pv = Id.module_pv
252
    let equal = equal
253
    let hash = hash
254
    let compare = compare
255
  end
256

257
  module FunctorParameter = struct
258
    type t = Id.functor_parameter
259
    type t_pv = Id.functor_parameter_pv
260
    let equal = equal
261
    let hash = hash
262
    let compare = compare
263

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

272
  module FunctorResult = struct
273
    type t = Id.functor_result
274
    type t_pv = Id.functor_result_pv
275
  end
276

277
  module ModuleType = struct
278
    type t = Id.module_type
279
    type t_pv = Id.module_type_pv
280
    let equal = equal
281
    let hash = hash
282
    let compare = compare
283
  end
284

285
  module Type = struct
286
    type t = Id.type_
287
    type t_pv = Id.type_pv
288
    let equal = equal
289
    let hash = hash
290
    let compare = compare
291
  end
292

293
  module Constructor = struct
294
    type t = Id.constructor
295
    type t_pv = Id.constructor_pv
296
  end
297

298
  module Field = struct
299
    type t = Id.field
300
    type t_pv = Id.field_pv
301
  end
302

303
  module Extension = struct
304
    type t = Id.extension
305
    type t_pv = Id.extension_pv
306
  end
307

308
  module ExtensionDecl = struct
309
    type t = Paths_types.Identifier.extension_decl
310

311
    type t_pv = Paths_types.Identifier.extension_decl_pv
312

313
    let equal = equal
314

315
    let hash = hash
316

317
    let compare = compare
318
  end
319

320
  module Exception = struct
321
    type t = Id.exception_
322
    type t_pv = Id.exception_pv
323
  end
324

325
  module Value = struct
326
    type t = Id.value
327
    type t_pv = Id.value_pv
328
  end
329

330
  module Class = struct
331
    type t = Id.class_
332
    type t_pv = Id.class_pv
333
    let equal = equal
334
    let hash = hash
335
    let compare = compare
336
  end
337

338
  module ClassType = struct
339
    type t = Id.class_type
340
    type t_pv = Id.class_type_pv
341
    let equal = equal
342
    let hash = hash
343
    let compare = compare
344
  end
345

346
  module Method = struct
347
    type t = Id.method_
348
    type t_pv = Id.method_pv
349
  end
350

351
  module InstanceVariable = struct
352
    type t = Id.instance_variable
353
    type t_pv = Id.instance_variable_pv
354
  end
355

356
  module Label = struct
357
    type t = Paths_types.Identifier.label
358
    type t_pv = Paths_types.Identifier.label_pv
359
    let equal = equal
360
    let hash = hash
361
    let compare = compare
362
  end
363

364
  module Page = struct
365
    type t = Id.page
366
    type t_pv = Id.page_pv
367
  end
368

369
  module ContainerPage = struct
370
    type t = Id.container_page
371
    type t_pv = Id.container_page_pv
372
  end
373

374
  module NonSrc = struct
375
    type t = Paths_types.Identifier.non_src
376
    type t_pv = Paths_types.Identifier.non_src_pv
377
  end
378

379
  module SourceDir = struct
380
    type t = Id.source_dir
381
    type t_pv = Id.source_dir_pv
382
    let equal = equal
383
    let hash = hash
384
    let compare = compare
385
  end
386

387
  module SourcePage = struct
388
    type t = Id.source_page
389
    type t_pv = Id.source_page_pv
390
  end
391

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

397
  module AssetFile = struct
398
    type t = Id.asset_file
399
    type t_pv = Id.asset_file_pv
400
  end
401

402
  module OdocId = struct
403
    type t = Id.odoc_id
404
    type t_pv = Id.odoc_id_pv
405
  end
406

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

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

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

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

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

448
    type t = Id.path_any
449
  end
450

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

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

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

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

479
      { iv = f (parent, x); ihash; ikey }
13,326✔
480

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

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

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

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

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

525
    let root :
526
        ContainerPage.t option * ModuleName.t ->
527
        [> `Root of ContainerPage.t option * ModuleName.t ] id =
528
      mk_parent_opt ModuleName.to_string "r" (fun (p, n) -> `Root (p, n))
456✔
529

530
    let implementation =
531
      mk_fresh
988✔
532
        (fun s -> s)
31✔
533
        "impl"
534
        (fun s -> `Implementation (ModuleName.make_std s))
31✔
535

536
    let module_ :
537
        Signature.t * ModuleName.t ->
538
        [> `Module of Signature.t * ModuleName.t ] id =
539
      mk_parent ModuleName.to_string "m" (fun (p, n) -> `Module (p, n))
988✔
540

541
    let parameter :
542
        Signature.t * ModuleName.t ->
543
        [> `Parameter of Signature.t * ModuleName.t ] id =
544
      mk_parent ModuleName.to_string "p" (fun (p, n) -> `Parameter (p, n))
71✔
545

546
    let result : Signature.t -> [> `Result of Signature.t ] id =
547
     fun s ->
548
      mk_parent (fun () -> "__result__") "" (fun (s, ()) -> `Result s) (s, ())
181✔
549

550
    let module_type :
551
        Signature.t * ModuleTypeName.t ->
552
        [> `ModuleType of Signature.t * ModuleTypeName.t ] id =
553
      mk_parent ModuleTypeName.to_string "mt" (fun (p, n) -> `ModuleType (p, n))
951✔
554

555
    let class_ :
556
        Signature.t * ClassName.t -> [> `Class of Signature.t * ClassName.t ] id
557
        =
558
      mk_parent ClassName.to_string "c" (fun (p, n) -> `Class (p, n))
47✔
559

560
    let class_type :
561
        Signature.t * ClassTypeName.t ->
562
        [> `ClassType of Signature.t * ClassTypeName.t ] id =
563
      mk_parent ClassTypeName.to_string "ct" (fun (p, n) -> `ClassType (p, n))
21✔
564

565
    let type_ :
566
        Signature.t * TypeName.t -> [> `Type of Signature.t * TypeName.t ] id =
567
      mk_parent TypeName.to_string "t" (fun (p, n) -> `Type (p, n))
988✔
568

569
    let core_type =
570
      mk_fresh (fun s -> s) "coret" (fun s -> `CoreType (TypeName.make_std s))
988✔
571

572
    let constructor :
573
        DataType.t * ConstructorName.t ->
574
        [> `Constructor of DataType.t * ConstructorName.t ] id =
575
      mk_parent ConstructorName.to_string "ctor" (fun (p, n) ->
988✔
576
          `Constructor (p, n))
6,573✔
577

578
    let field :
579
        FieldParent.t * FieldName.t ->
580
        [> `Field of FieldParent.t * FieldName.t ] id =
581
      mk_parent FieldName.to_string "fld" (fun (p, n) -> `Field (p, n))
42✔
582

583
    let extension :
584
        Signature.t * ExtensionName.t ->
585
        [> `Extension of Signature.t * ExtensionName.t ] id =
586
      mk_parent ExtensionName.to_string "extn" (fun (p, n) -> `Extension (p, n))
39✔
587

588
    let extension_decl :
589
        Signature.t * (ExtensionName.t * ExtensionName.t) ->
590
        [> `ExtensionDecl of Signature.t * ExtensionName.t * ExtensionName.t ]
591
        id =
592
      mk_parent
988✔
593
        (fun (n, m) ->
594
          ExtensionName.to_string n ^ "." ^ ExtensionName.to_string m)
4✔
595
        "extn-decl"
596
        (fun (p, (n, m)) -> `ExtensionDecl (p, n, m))
4✔
597

598
    let exception_ :
599
        Signature.t * ExceptionName.t ->
600
        [> `Exception of Signature.t * ExceptionName.t ] id =
601
      mk_parent ExceptionName.to_string "exn" (fun (p, n) -> `Exception (p, n))
15✔
602

603
    let core_exception =
604
      mk_fresh
988✔
605
        (fun s -> s)
×
606
        "coreexn"
607
        (fun s -> `CoreException (ExceptionName.make_std s))
×
608

609
    let value :
610
        Signature.t * ValueName.t -> [> `Value of Signature.t * ValueName.t ] id
611
        =
612
      mk_parent ValueName.to_string "v" (fun (p, n) -> `Value (p, n))
464✔
613

614
    let method_ :
615
        ClassSignature.t * MethodName.t ->
616
        [> `Method of ClassSignature.t * MethodName.t ] id =
617
      mk_parent MethodName.to_string "m" (fun (p, n) -> `Method (p, n))
38✔
618

619
    let instance_variable :
620
        ClassSignature.t * InstanceVariableName.t ->
621
        [> `InstanceVariable of ClassSignature.t * InstanceVariableName.t ] id =
622
      mk_parent InstanceVariableName.to_string "iv" (fun (p, n) ->
988✔
623
          `InstanceVariable (p, n))
4✔
624

625
    let label :
626
        LabelParent.t * LabelName.t ->
627
        [> `Label of LabelParent.t * LabelName.t ] id =
628
      mk_parent LabelName.to_string "l" (fun (p, n) -> `Label (p, n))
301✔
629

630
    let source_location :
631
        SourcePage.t * DefName.t ->
632
        [> `SourceLocation of SourcePage.t * DefName.t ] id =
633
      mk_parent DefName.to_string "sl" (fun (p, n) -> `SourceLocation (p, n))
100✔
634

635
    let source_location_mod :
636
        SourcePage.t -> [> `SourceLocationMod of SourcePage.t ] id =
637
     fun s ->
638
      mk_parent
33✔
639
        (fun () -> "__slm__")
33✔
640
        ""
641
        (fun (s, ()) -> `SourceLocationMod s)
33✔
642
        (s, ())
643

644
    let source_location_int :
645
        SourcePage.t * LocalName.t ->
646
        [> `SourceLocationInternal of SourcePage.t * LocalName.t ] id =
647
      mk_parent LocalName.to_string "sli" (fun (p, n) ->
988✔
648
          `SourceLocationInternal (p, n))
4✔
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
29,027✔
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✔
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,354✔
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✔
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✔
677
      | `ModuleType (_, m) when Names.ModuleTypeName.is_hidden m -> true
×
678
      | `ModuleType (p, _) -> inner (p : module_ :> any)
612✔
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✔
684
      | `ClassType (p, _) -> inner (p : module_ :> any)
×
685
      | `Alias (dest, `Resolved src) ->
×
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✔
691
          inner (p1 : module_type :> any) && inner (p2 : module_type :> any)
×
692
      | `SubstT (p1, p2) -> inner (p1 :> any) || inner (p2 :> any)
×
693
      | `Substituted m -> inner (m :> any)
224✔
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,647✔
710
    | `Identifier (_, hidden) -> hidden
153✔
711
    | `Substituted r -> is_path_hidden (r :> any)
×
712
    | `SubstitutedMT r -> is_path_hidden (r :> any)
×
713
    | `SubstitutedT r -> is_path_hidden (r :> any)
×
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✔
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✔
732
      | `SubstT (m, _n) -> parent_module_type_identifier m
×
733
      | `CanonicalModuleType (_, `Resolved p) -> parent_module_type_identifier p
×
734
      | `CanonicalModuleType (p, _) -> parent_module_type_identifier p
×
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✔
752
      | `Alias (dest, `Resolved src) ->
×
753
          if is_resolved_hidden ~weak_canonical_test:false (dest :> t) then
754
            parent_module_identifier src
×
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,501✔
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✔
796
      | `ClassType (m, n) ->
×
797
          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,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✔
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)
×
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,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✔
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
880
      | `Subst (s, _) -> Path.Resolved.identifier (s :> Path.Resolved.t)
×
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✔
887
      | `Class (m, n) -> Identifier.Mk.class_ (Signature.sgidentifier m, n)
×
888
      | `ClassType (m, n) ->
×
889
          Identifier.Mk.class_type (Signature.sgidentifier m, n)
×
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✔
900
      | `Class (m, _)
×
901
      | `ClassType (m, _) ->
×
902
          is_hidden (m :> t)
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✔
936
      | `Hidden s -> parent_signature_identifier (s :> signature)
×
937
      | `Alias (sub, orig) ->
36✔
938
          if Path.Resolved.(is_hidden (sub :> t)) then
36✔
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✔
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
1✔
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
960
      | `Identifier id -> id
×
961
      | `Class (sg, s) ->
×
962
          Identifier.Mk.class_ (parent_signature_identifier sg, s)
×
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
×
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✔
977
      | (`Class _ | `ClassType _) as c ->
×
978
          (parent_class_signature_identifier c :> Identifier.LabelParent.t)
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
450✔
985
      | ( `Alias _ | `AliasModuleType _ | `Module _ | `Hidden _ | `Type _
×
986
        | `Class _ | `ClassType _ | `ModuleType _ ) as r ->
×
987
          (label_parent_identifier r :> Identifier.t)
988
      | `Field (p, n) -> Identifier.Mk.field (field_parent_identifier p, n)
×
989
      | `Constructor (s, n) ->
5✔
990
          Identifier.Mk.constructor
991
            ((parent_type_identifier s :> Identifier.DataType.t), n)
5✔
992
      | `Extension (p, q) ->
3✔
993
          Identifier.Mk.extension (parent_signature_identifier p, q)
3✔
994
      | `ExtensionDecl (p, q, r) ->
2✔
995
          Identifier.Mk.extension_decl (parent_signature_identifier p, (q, r))
2✔
996
      | `Exception (p, q) ->
×
997
          Identifier.Mk.exception_ (parent_signature_identifier p, q)
×
998
      | `Value (p, q) -> Identifier.Mk.value (parent_signature_identifier p, q)
12✔
999
      | `Method (p, q) ->
×
1000
          Identifier.Mk.method_ (parent_class_signature_identifier p, q)
×
1001
      | `InstanceVariable (p, q) ->
×
1002
          Identifier.Mk.instance_variable
1003
            (parent_class_signature_identifier p, q)
×
1004
      | `Label (p, q) -> Identifier.Mk.label (label_parent_identifier p, q)
42✔
1005

1006
    module Signature = struct
1007
      type t = Paths_types.Resolved_reference.signature
1008
    end
1009

1010
    module ClassSignature = struct
1011
      type t = Paths_types.Resolved_reference.class_signature
1012
    end
1013

1014
    module DataType = struct
1015
      type t = Paths_types.Resolved_reference.datatype
1016
    end
1017

1018
    module FieldParent = struct
1019
      type t = Paths_types.Resolved_reference.field_parent
1020
    end
1021

1022
    module LabelParent = struct
1023
      type t = Paths_types.Resolved_reference.label_parent
1024
    end
1025

1026
    module Module = struct
1027
      type t = Paths_types.Resolved_reference.module_
1028
    end
1029

1030
    module ModuleType = struct
1031
      type t = Paths_types.Resolved_reference.module_type
1032
    end
1033

1034
    module Type = struct
1035
      type t = Paths_types.Resolved_reference.type_
1036
    end
1037

1038
    module Constructor = struct
1039
      type t = Paths_types.Resolved_reference.constructor
1040
    end
1041

1042
    module Field = struct
1043
      type t = Paths_types.Resolved_reference.field
1044
    end
1045

1046
    module Extension = struct
1047
      type t = Paths_types.Resolved_reference.extension
1048
    end
1049

1050
    module ExtensionDecl = struct
1051
      type t = Paths_types.Resolved_reference.extension_decl
1052
    end
1053

1054
    module Exception = struct
1055
      type t = Paths_types.Resolved_reference.exception_
1056
    end
1057

1058
    module Value = struct
1059
      type t = Paths_types.Resolved_reference.value
1060
    end
1061

1062
    module Class = struct
1063
      type t = Paths_types.Resolved_reference.class_
1064
    end
1065

1066
    module ClassType = struct
1067
      type t = Paths_types.Resolved_reference.class_type
1068
    end
1069

1070
    module Method = struct
1071
      type t = Paths_types.Resolved_reference.method_
1072
    end
1073

1074
    module InstanceVariable = struct
1075
      type t = Paths_types.Resolved_reference.instance_variable
1076
    end
1077

1078
    module Label = struct
1079
      type t = Paths_types.Resolved_reference.label
1080
    end
1081

1082
    module Page = struct
1083
      type t = Paths_types.Resolved_reference.page
1084
    end
1085
  end
1086

1087
  type t = Paths_types.Reference.any
1088

1089
  type tag_any = Paths_types.Reference.tag_any
1090

1091
  module Signature = struct
1092
    type t = Paths_types.Reference.signature
1093
  end
1094

1095
  module ClassSignature = struct
1096
    type t = Paths_types.Reference.class_signature
1097
  end
1098

1099
  module DataType = struct
1100
    type t = Paths_types.Reference.datatype
1101
  end
1102

1103
  module FragmentTypeParent = struct
1104
    type t = Paths_types.Reference.fragment_type_parent
1105
  end
1106

1107
  module LabelParent = struct
1108
    type t = Paths_types.Reference.label_parent
1109
  end
1110

1111
  module Module = struct
1112
    type t = Paths_types.Reference.module_
1113
  end
1114

1115
  module ModuleType = struct
1116
    type t = Paths_types.Reference.module_type
1117
  end
1118

1119
  module Type = struct
1120
    type t = Paths_types.Reference.type_
1121
  end
1122

1123
  module Constructor = struct
1124
    type t = Paths_types.Reference.constructor
1125
  end
1126

1127
  module Field = struct
1128
    type t = Paths_types.Reference.field
1129
  end
1130

1131
  module Extension = struct
1132
    type t = Paths_types.Reference.extension
1133
  end
1134

1135
  module ExtensionDecl = struct
1136
    type t = Paths_types.Reference.extension_decl
1137
  end
1138

1139
  module Exception = struct
1140
    type t = Paths_types.Reference.exception_
1141
  end
1142

1143
  module Value = struct
1144
    type t = Paths_types.Reference.value
1145
  end
1146

1147
  module Class = struct
1148
    type t = Paths_types.Reference.class_
1149
  end
1150

1151
  module ClassType = struct
1152
    type t = Paths_types.Reference.class_type
1153
  end
1154

1155
  module Method = struct
1156
    type t = Paths_types.Reference.method_
1157
  end
1158

1159
  module InstanceVariable = struct
1160
    type t = Paths_types.Reference.instance_variable
1161
  end
1162

1163
  module Label = struct
1164
    type t = Paths_types.Reference.label
1165
  end
1166

1167
  module Page = struct
1168
    type t = Paths_types.Reference.page
1169
  end
1170
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