@@ -78,16 +78,6 @@ let extension_constructors ~loc env cxt subst id ext1 ext2 =
78
78
then ()
79
79
else raise(Error [cxt, env, Extension_constructors (id, ext1, ext2)])
80
80
81
- (* Inclusion between class declarations *)
82
-
83
- let class_type_declarations ~loc ~old_env env cxt subst id decl1 decl2 =
84
- let decl2 = Subst. cltype_declaration subst decl2 in
85
- match Includeclass. class_type_declarations ~loc env decl1 decl2 with
86
- [] -> ()
87
- | reason ->
88
- raise(Error [cxt, old_env,
89
- Class_type_declarations (id, decl1, decl2, reason)])
90
-
91
81
92
82
(* Expand a module type identifier when possible *)
93
83
@@ -123,15 +113,13 @@ type field_desc =
123
113
| Field_typext of string
124
114
| Field_module of string
125
115
| Field_modtype of string
126
- | Field_classtype of string
127
116
128
117
let kind_of_field_desc = function
129
118
| Field_value _ -> " value"
130
119
| Field_type _ -> " type"
131
120
| Field_typext _ -> " extension constructor"
132
121
| Field_module _ -> " module"
133
122
| Field_modtype _ -> " module type"
134
- | Field_classtype _ -> " class type"
135
123
136
124
let item_ident_name = function
137
125
Sig_value (id , d ) -> (id, d.val_loc, Field_value (Ident. name id))
@@ -140,13 +128,13 @@ let item_ident_name = function
140
128
| Sig_module (id , d , _ ) -> (id, d.md_loc, Field_module (Ident. name id))
141
129
| Sig_modtype (id , d ) -> (id, d.mtd_loc, Field_modtype (Ident. name id))
142
130
| Sig_class () -> assert false
143
- | Sig_class_type ( id , d , _ ) -> (id, d.clty_loc, Field_classtype ( Ident. name id))
131
+ | Sig_class_type ( ) -> assert false
144
132
145
133
let is_runtime_component = function
146
134
| Sig_value (_,{val_kind = Val_prim _})
147
135
| Sig_type (_,_,_)
148
136
| Sig_modtype (_,_)
149
- | Sig_class_type (_ , _ , _ ) -> false
137
+ | Sig_class_type () -> false
150
138
| Sig_value (_,_)
151
139
| Sig_typext (_,_,_)
152
140
| Sig_module (_,_,_)
@@ -315,9 +303,9 @@ and signatures ~loc env cxt subst sig1 sig2 =
315
303
| Sig_module (i,_,_)
316
304
| Sig_typext (i,_,_)
317
305
| Sig_modtype (i,_)
318
- | Sig_class_type (i,_,_)
319
306
| Sig_type (i ,_ ,_ ) -> Ident. name i
320
- | Sig_class () -> assert false in
307
+ | Sig_class ()
308
+ | Sig_class_type () -> assert false in
321
309
List. fold_right (fun item fields ->
322
310
if is_runtime_component item then get_id item :: fields else fields) sig2 [] in
323
311
@@ -379,7 +367,7 @@ and signatures ~loc env cxt subst sig1 sig2 =
379
367
| Sig_modtype _ ->
380
368
Subst. add_modtype id2 (Mty_ident (Pident id1)) subst
381
369
| Sig_value _ | Sig_typext _
382
- | Sig_class _ | Sig_class_type _ ->
370
+ | Sig_class _ | Sig_class_type () ->
383
371
subst
384
372
in
385
373
pair_components new_subst
@@ -420,11 +408,9 @@ and signature_components ~loc old_env env cxt subst paired =
420
408
| (Sig_modtype(id1 , info1 ), Sig_modtype(_id2 , info2 ), _pos ) :: rem ->
421
409
modtype_infos ~loc env cxt subst id1 info1 info2;
422
410
comps_rec rem
423
- | (Sig_class _ , Sig_class _ , _ ) :: _ -> assert false
424
- | (Sig_class_type (id1, info1, _),
425
- Sig_class_type (_id2, info2, _), _pos) :: rem ->
426
- class_type_declarations ~loc ~old_env env cxt subst id1 info1 info2;
427
- comps_rec rem
411
+ | (Sig_class () , Sig_class () , _ ) :: _ -> assert false
412
+ | (Sig_class_type () ,
413
+ Sig_class_type () , _pos) :: _ -> assert false
428
414
| _ ->
429
415
assert false
430
416
0 commit comments