@@ -221,28 +221,28 @@ end
221
221
222
222
module Simple_data = struct
223
223
type t = {
224
- simple : Id .t ; (* always without [Rec_info ] *)
225
- rec_info : Rec_info .t ;
224
+ simple : Id .t ; (* always without [Coercion ] *)
225
+ coercion : Coercion .t ;
226
226
}
227
227
228
228
let flags = simple_flags
229
229
230
- let print ppf { simple = _ ; rec_info ; } =
230
+ let print ppf { simple = _ ; coercion ; } =
231
231
Format. fprintf ppf " @[<hov 1>\
232
- @[<hov 1>(rec_info @ %a)@]\
232
+ @[<hov 1>(coercion @ %a)@]\
233
233
@]"
234
- Rec_info . print rec_info
234
+ Coercion . print coercion
235
235
236
- let hash { simple; rec_info ; } =
237
- Hashtbl. hash (Id. hash simple, Rec_info . hash rec_info )
236
+ let hash { simple; coercion ; } =
237
+ Hashtbl. hash (Id. hash simple, Coercion . hash coercion )
238
238
239
239
let equal t1 t2 =
240
240
if t1 == t2 then true
241
241
else
242
- let { simple = simple1; rec_info = rec_info1 ; } = t1 in
243
- let { simple = simple2; rec_info = rec_info2 ; } = t2 in
242
+ let { simple = simple1; coercion = coercion1 ; } = t1 in
243
+ let { simple = simple2; coercion = coercion2 ; } = t2 in
244
244
Id. equal simple1 simple2
245
- && Rec_info . equal rec_info1 rec_info2
245
+ && Coercion . equal coercion1 coercion2
246
246
end
247
247
248
248
module Const = struct
@@ -547,9 +547,9 @@ module Simple = struct
547
547
in
548
548
pattern_match t1 ~name ~const
549
549
550
- let [@ inline always] rec_info t =
550
+ let [@ inline always] coercion t =
551
551
let flags = Id. flags t in
552
- if flags = simple_flags then Some ((find_data t).rec_info )
552
+ if flags = simple_flags then Some ((find_data t).coercion )
553
553
else None
554
554
555
555
module T0 = struct
@@ -563,15 +563,15 @@ module Simple = struct
563
563
~name: (fun name -> Name. print ppf name)
564
564
~const: (fun cst -> Const. print ppf cst)
565
565
in
566
- match rec_info t with
566
+ match coercion t with
567
567
| None -> print ppf t
568
- | Some rec_info ->
568
+ | Some coercion ->
569
569
Format. fprintf ppf " @[<hov 1>\
570
570
@[<hov 1>(simple@ %a)@] \
571
- @[<hov 1>(rec_info @ %a)@]\
571
+ @[<hov 1>(coercion @ %a)@]\
572
572
@]"
573
573
print t
574
- Rec_info . print rec_info
574
+ Coercion . print coercion
575
575
576
576
let output chan t =
577
577
print (Format. formatter_of_out_channel chan) t
@@ -583,16 +583,16 @@ module Simple = struct
583
583
include T0
584
584
end
585
585
586
- let with_rec_info t new_rec_info =
587
- if Rec_info. is_initial new_rec_info then t
586
+ let with_coercion t new_coercion =
587
+ if Coercion. is_id new_coercion then t
588
588
else
589
- match rec_info t with
589
+ match coercion t with
590
590
| None ->
591
- let data : Simple_data.t = { simple = t; rec_info = new_rec_info ; } in
591
+ let data : Simple_data.t = { simple = t; coercion = new_coercion ; } in
592
592
Table. add ! grand_table_of_simples data
593
593
| Some _ ->
594
- Misc. fatal_errorf " Cannot add [Rec_info ] to [Simple] %a that already \
595
- has [Rec_info ]"
594
+ Misc. fatal_errorf " Cannot add [Coercion ] to [Simple] %a that already \
595
+ has [Coercion ]"
596
596
print t
597
597
598
598
module Set = Patricia_tree. Make_set (struct let print = print end )
@@ -604,7 +604,7 @@ module Simple = struct
604
604
let import map (data : exported ) =
605
605
let simple = map data.simple in
606
606
let data : Simple_data.t =
607
- { simple; rec_info = data.rec_info ; }
607
+ { simple; coercion = data.coercion ; }
608
608
in
609
609
Table. add ! grand_table_of_simples data
610
610
0 commit comments