File tree Expand file tree Collapse file tree 4 files changed +1
-17
lines changed Expand file tree Collapse file tree 4 files changed +1
-17
lines changed Original file line number Diff line number Diff line change @@ -489,7 +489,7 @@ let find_field_name_for_punning_field patt = function
489
489
List. find_opt ~f: (fun (_ , _ , opat ) ->
490
490
let ppat_loc = patt.Typedtree. pat_loc
491
491
and opat_loc = opat.Typedtree. pat_loc in
492
- Location_aux . equal ppat_loc opat_loc
492
+ Int . equal ( Location_aux. compare ppat_loc opat_loc) 0
493
493
) fields |> Option. map ~f: (fun (_ , label , _ ) -> label)
494
494
| _ -> None
495
495
Original file line number Diff line number Diff line change @@ -38,12 +38,6 @@ let compare (l1: t) (l2: t) =
38
38
| 0 -> Lexing. compare_pos l1.loc_end l2.loc_end
39
39
| _ -> assert false
40
40
41
- let equal
42
- { loc_start = start_a ; loc_end = end_a ; loc_ghost = ghost_a }
43
- { loc_start = start_b ; loc_end = end_b ; loc_ghost = ghost_b } =
44
- Lexing. equal_position start_a start_b && Lexing. equal_position end_a end_b &&
45
- Bool. equal ghost_a ghost_b
46
-
47
41
let compare_pos pos loc =
48
42
if Lexing. compare_pos pos loc.Location. loc_start < 0 then
49
43
- 1
Original file line number Diff line number Diff line change @@ -35,9 +35,6 @@ val compare : t -> t -> int
35
35
36
36
val compare_pos : Lexing .position -> t -> int
37
37
38
- (* * [equal l1 l2] equality between location *)
39
- val equal : t -> t -> bool
40
-
41
38
(* * Return the smallest location covered by both arguments,
42
39
ghost if both are ghosts *)
43
40
val union : t -> t -> t
Original file line number Diff line number Diff line change @@ -549,13 +549,6 @@ module Lexing = struct
549
549
include (Lexing : module type of struct include Lexing end
550
550
with type position := position)
551
551
552
-
553
- let equal_position
554
- { pos_fname = fname_a ; pos_lnum = lnum_a ; pos_bol = bol_a ; pos_cnum = cnum_a }
555
- { pos_fname = fname_b ; pos_lnum = lnum_b ; pos_bol = bol_b ; pos_cnum = cnum_b } =
556
- String. equal fname_a fname_b && Int. equal lnum_a lnum_b &&
557
- Int. equal bol_a bol_b && Int. equal cnum_a cnum_b
558
-
559
552
let move buf p =
560
553
buf.lex_abs_pos < - (p.pos_cnum - buf.lex_curr_pos);
561
554
buf.lex_curr_p < - p
You can’t perform that action at this time.
0 commit comments