Skip to content

Commit e787c94

Browse files
authored
flambda-backend: Fix uses of polymorphic comparison in Flambda 2 (#2312)
* Add -open Int_replace_polymorphic_compare for flambda2 * Remove explicit opens of Int_replace_polymorphic_compare * Fix occurrences of polymorphic comparison
1 parent a7bd3d4 commit e787c94

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

lambda/debuginfo.ml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,19 @@ module Scoped_location = struct
2727
| Sc_partial_or_eta_wrapper
2828
| Sc_lazy
2929

30+
let equal_scope_item si1 si2 =
31+
match si1, si2 with
32+
| Sc_anonymous_function, Sc_anonymous_function
33+
| Sc_value_definition, Sc_value_definition
34+
| Sc_module_definition, Sc_module_definition
35+
| Sc_class_definition, Sc_class_definition
36+
| Sc_method_definition, Sc_method_definition
37+
| Sc_partial_or_eta_wrapper, Sc_partial_or_eta_wrapper
38+
| Sc_lazy, Sc_lazy -> true
39+
| (Sc_anonymous_function | Sc_value_definition | Sc_module_definition
40+
| Sc_class_definition | Sc_method_definition | Sc_partial_or_eta_wrapper
41+
| Sc_lazy), _ -> false
42+
3043
type scopes =
3144
| Empty
3245
| Cons of {item: scope_item; str: string; str_fun: string; name : string; prev: scopes;

lambda/debuginfo.mli

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ module Scoped_location : sig
2323
| Sc_partial_or_eta_wrapper
2424
| Sc_lazy
2525

26+
val equal_scope_item : scope_item -> scope_item -> bool
27+
2628
type scopes = private
2729
| Empty
2830
| Cons of {item: scope_item; str: string; str_fun: string; name : string; prev: scopes;

0 commit comments

Comments
 (0)