@@ -12,32 +12,14 @@ module TypeMap = Map.Make (struct
12
12
let compare a b = Ident. compare (a :> Ident.any ) (b :> Ident.any )
13
13
end )
14
14
15
- module PathModuleMap = Map. Make (struct
16
- type t = Ident .path_module
17
-
18
- let compare a b = Ident. compare (a :> Ident.any ) (b :> Ident.any )
19
- end )
20
-
21
15
module ModuleTypeMap = Map. Make (struct
22
16
type t = Ident .module_type
23
17
24
18
let compare a b = Ident. compare (a :> Ident.any ) (b :> Ident.any )
25
19
end )
26
20
27
- module PathTypeMap = Map. Make (struct
28
- type t = Ident .path_type
29
-
30
- let compare a b = Ident. compare (a :> Ident.any ) (b :> Ident.any )
31
- end )
32
-
33
- module PathValueMap = Map. Make (struct
34
- type t = Ident .path_value
35
-
36
- let compare a b = Ident. compare (a :> Ident.any ) (b :> Ident.any )
37
- end )
38
-
39
- module PathClassTypeMap = Map. Make (struct
40
- type t = Ident .path_class_type
21
+ module ValueMap = Map. Make (struct
22
+ type t = Ident .value
41
23
42
24
let compare a b = Ident. compare (a :> Ident.any ) (b :> Ident.any )
43
25
end )
@@ -182,7 +164,7 @@ end =
182
164
Exception
183
165
184
166
and FunctorParameter : sig
185
- type parameter = { id : Ident .functor_parameter ; expr : ModuleType .expr }
167
+ type parameter = { id : Ident .module_ ; expr : ModuleType .expr }
186
168
187
169
type t = Named of parameter | Unit
188
170
end =
@@ -320,8 +302,8 @@ and Signature : sig
320
302
| Exception of Ident .exception_ * Exception .t
321
303
| TypExt of Extension .t
322
304
| Value of Ident .value * Value .t Delayed .t
323
- | Class of Ident .class_ * recursive * Class .t
324
- | ClassType of Ident .class_type * recursive * ClassType .t
305
+ | Class of Ident .type_ * recursive * Class .t
306
+ | ClassType of Ident .type_ * recursive * ClassType .t
325
307
| Include of Include .t
326
308
| Open of Open .t
327
309
| Comment of CComment .docs_or_stop
@@ -440,28 +422,27 @@ and Substitution : sig
440
422
type subst_module =
441
423
[ `Prefixed of Cpath .module_ * Cpath.Resolved .module_
442
424
| `Substituted
443
- | `Renamed of Ident .path_module ]
425
+ | `Renamed of Ident .module_ ]
444
426
445
427
type subst_module_type =
446
428
[ `Prefixed of Cpath .module_type * Cpath.Resolved .module_type
447
429
| `Renamed of Ident .module_type ]
448
430
449
431
type subst_type =
450
- [ `Prefixed of Cpath .type_ * Cpath.Resolved .type_
451
- | `Renamed of Ident .path_type ]
432
+ [ `Prefixed of Cpath .type_ * Cpath.Resolved .type_ | `Renamed of Ident .type_ ]
452
433
453
434
type subst_class_type =
454
435
[ `Prefixed of Cpath .class_type * Cpath.Resolved .class_type
455
- | `Renamed of Ident .path_class_type ]
436
+ | `Renamed of Ident .type_ ]
456
437
457
438
type t = {
458
- module_ : subst_module PathModuleMap .t ;
439
+ module_ : subst_module ModuleMap .t ;
459
440
module_type : subst_module_type ModuleTypeMap .t ;
460
- type_ : subst_type PathTypeMap .t ;
461
- class_type : subst_class_type PathClassTypeMap .t ;
462
- type_replacement : (TypeExpr .t * TypeDecl.Equation .t ) PathTypeMap .t ;
441
+ type_ : subst_type TypeMap .t ;
442
+ class_type : subst_class_type TypeMap .t ;
443
+ type_replacement : (TypeExpr .t * TypeDecl.Equation .t ) TypeMap .t ;
463
444
module_type_replacement : ModuleType .expr ModuleTypeMap .t ;
464
- path_invalidating_modules : Ident .path_module list ;
445
+ path_invalidating_modules : Ident .module_ list ;
465
446
unresolve_opaque_paths : bool ;
466
447
}
467
448
end =
@@ -1815,14 +1796,12 @@ module Of_Lang = struct
1815
1796
type map = {
1816
1797
modules : Ident .module_ Paths.Identifier.Maps.Module .t ;
1817
1798
module_types : Ident .module_type Paths.Identifier.Maps.ModuleType .t ;
1818
- functor_parameters :
1819
- Ident .functor_parameter Paths.Identifier.Maps.FunctorParameter .t ;
1799
+ functor_parameters : Ident .module_ Paths.Identifier.Maps.FunctorParameter .t ;
1820
1800
types : Ident .type_ Paths.Identifier.Maps.Type .t ;
1821
- path_types : Ident .path_type Paths.Identifier.Maps.Path.Type .t ;
1822
- path_class_types :
1823
- Ident .path_class_type Paths.Identifier.Maps.Path.ClassType .t ;
1824
- classes : Ident .class_ Paths.Identifier.Maps.Class .t ;
1825
- class_types : Ident .class_type Paths.Identifier.Maps.ClassType .t ;
1801
+ path_types : Ident .type_ Paths.Identifier.Maps.Path.Type .t ;
1802
+ path_class_types : Ident .type_ Paths.Identifier.Maps.Path.ClassType .t ;
1803
+ classes : Ident .type_ Paths.Identifier.Maps.Class .t ;
1804
+ class_types : Ident .type_ Paths.Identifier.Maps.ClassType .t ;
1826
1805
}
1827
1806
1828
1807
let empty () =
@@ -1848,10 +1827,7 @@ module Of_Lang = struct
1848
1827
(fun (types , path_types ) i ->
1849
1828
let id = Ident.Of_Identifier. type_ i in
1850
1829
( Maps.Type. add i id types,
1851
- Maps.Path.Type. add
1852
- (i :> Path.Type.t )
1853
- (id :> Ident.path_type )
1854
- path_types ))
1830
+ Maps.Path.Type. add (i :> Path.Type.t ) id path_types ))
1855
1831
(map.types, map.path_types)
1856
1832
ids.LocalIdents. types
1857
1833
in
@@ -1860,10 +1836,8 @@ module Of_Lang = struct
1860
1836
(fun (classes , path_class_types ) i ->
1861
1837
let id = Ident.Of_Identifier. class_ i in
1862
1838
( Maps.Class. add i id classes,
1863
- Maps.Path.ClassType. add
1864
- (i :> Path.ClassType.t )
1865
- (id :> Ident.path_class_type )
1866
- path_class_types ))
1839
+ Maps.Path.ClassType. add (i :> Path.ClassType.t ) id path_class_types
1840
+ ))
1867
1841
(map.classes, map.path_class_types)
1868
1842
ids.LocalIdents. classes
1869
1843
in
@@ -1872,14 +1846,9 @@ module Of_Lang = struct
1872
1846
(fun (class_types , path_types , path_class_types ) i ->
1873
1847
let id = Ident.Of_Identifier. class_type i in
1874
1848
( Maps.ClassType. add i id class_types,
1875
- Maps.Path.Type. add
1876
- (i :> Path.Type.t )
1877
- (id :> Ident.path_type )
1878
- path_types,
1879
- Maps.Path.ClassType. add
1880
- (i :> Path.ClassType.t )
1881
- (id :> Ident.path_class_type )
1882
- path_class_types ))
1849
+ Maps.Path.Type. add (i :> Path.Type.t ) id path_types,
1850
+ Maps.Path.ClassType. add (i :> Path.ClassType.t ) id path_class_types
1851
+ ))
1883
1852
(map.class_types, path_types_new, path_class_types_new)
1884
1853
ids.LocalIdents. class_types
1885
1854
in
@@ -1925,13 +1894,12 @@ module Of_Lang = struct
1925
1894
let find_any_module i ident_map =
1926
1895
match i with
1927
1896
| { Odoc_model.Paths.Identifier. iv = `Root _ | `Module _ ; _ } as id ->
1928
- ( Maps.Module. find id ident_map.modules :> Ident.path_module )
1897
+ Maps.Module. find id ident_map.modules
1929
1898
| {
1930
1899
Odoc_model.Paths.Identifier. iv = #Paths.Identifier.FunctorParameter. t_pv;
1931
1900
_;
1932
1901
} as id ->
1933
- (Maps.FunctorParameter. find id ident_map.functor_parameters
1934
- :> Ident. path_module)
1902
+ Maps.FunctorParameter. find id ident_map.functor_parameters
1935
1903
| _ -> raise Not_found
1936
1904
1937
1905
let rec resolved_module_path :
0 commit comments