File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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 ;
Original file line number Diff line number Diff 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 ;
You can’t perform that action at this time.
0 commit comments