File tree 4 files changed +14
-14
lines changed
4 files changed +14
-14
lines changed Original file line number Diff line number Diff line change @@ -1482,8 +1482,8 @@ and precompile_or ~arg_id (cls : Simple.clause list) ors args def k =
1482
1482
(* bound variables of the or-pattern and used in the orpm
1483
1483
actions *)
1484
1484
Typedtree. pat_bound_idents_full orp
1485
- |> List. filter (fun (id , _ ) -> Ident.Set. mem id pm_fv)
1486
- |> List. map (fun (id , ty ) ->
1485
+ |> List. filter (fun (id , _ , _ ) -> Ident.Set. mem id pm_fv)
1486
+ |> List. map (fun (id , _ , ty ) ->
1487
1487
(id, Typeopt. value_kind orp.pat_env ty))
1488
1488
in
1489
1489
let or_num = next_raise_count () in
@@ -3595,10 +3595,10 @@ let for_let ~scopes loc param pat body =
3595
3595
let catch_ids = pat_bound_idents_full pat in
3596
3596
let ids_with_kinds =
3597
3597
List. map
3598
- (fun (id , typ ) -> (id, Typeopt. value_kind pat.pat_env typ))
3598
+ (fun (id , _ , typ ) -> (id, Typeopt. value_kind pat.pat_env typ))
3599
3599
catch_ids
3600
3600
in
3601
- let ids = List. map (fun (id , _ ) -> id) catch_ids in
3601
+ let ids = List. map (fun (id , _ , _ ) -> id) catch_ids in
3602
3602
let bind =
3603
3603
map_return (assign_pat ~scopes opt nraise ids loc pat) param in
3604
3604
if ! opt then
Original file line number Diff line number Diff line change @@ -1336,9 +1336,9 @@ and transl_match ~scopes e arg pat_expr_list partial =
1336
1336
(* Simplif doesn't like it if binders are not uniq, so we make sure to
1337
1337
use different names in the value and the exception branches. *)
1338
1338
let ids_full = Typedtree. pat_bound_idents_full pv in
1339
- let ids = List. map (fun (id , _ ) -> id) ids_full in
1339
+ let ids = List. map (fun (id , _ , _ ) -> id) ids_full in
1340
1340
let ids_kinds =
1341
- List. map (fun (id , ty ) -> id, Typeopt. value_kind pv.pat_env ty)
1341
+ List. map (fun (id , _ , ty ) -> id, Typeopt. value_kind pv.pat_env ty)
1342
1342
ids_full
1343
1343
in
1344
1344
let vids = List. map Ident. rename ids in
Original file line number Diff line number Diff line change @@ -779,11 +779,11 @@ let rec iter_bound_idents
779
779
: type k . _ -> k general_pattern -> _
780
780
= fun f pat ->
781
781
match pat.pat_desc with
782
- | Tpat_var (id , _ ) ->
783
- f (id, pat.pat_type)
784
- | Tpat_alias (p , id , _ ) ->
782
+ | Tpat_var (id , s ) ->
783
+ f (id,s, pat.pat_type)
784
+ | Tpat_alias (p , id , s ) ->
785
785
iter_bound_idents f p;
786
- f (id, pat.pat_type)
786
+ f (id,s, pat.pat_type)
787
787
| Tpat_or (p1 , _ , _ ) ->
788
788
(* Invariant : both arguments bind the same variables *)
789
789
iter_bound_idents f p1
@@ -799,7 +799,7 @@ let rev_pat_bound_idents_full pat =
799
799
! idents_full
800
800
801
801
let rev_only_idents idents_full =
802
- List. rev_map (fun (id ,_ ) -> id) idents_full
802
+ List. rev_map (fun (id ,_ , _ ) -> id) idents_full
803
803
804
804
let pat_bound_idents_full pat =
805
805
List. rev (rev_pat_bound_idents_full pat)
@@ -826,7 +826,7 @@ let let_bound_idents_with_modes bindings =
826
826
in
827
827
List. iter (fun vb -> loop vb.vb_pat) bindings;
828
828
List. rev_map
829
- (fun (id , _ ) -> id, List. rev (Ident.Tbl. find_all modes id))
829
+ (fun (id , _ , _ ) -> id, List. rev (Ident.Tbl. find_all modes id))
830
830
(rev_let_bound_idents_full bindings)
831
831
832
832
let let_bound_idents_full bindings =
Original file line number Diff line number Diff line change @@ -821,7 +821,7 @@ val exists_pattern: (pattern -> bool) -> pattern -> bool
821
821
822
822
val let_bound_idents : value_binding list -> Ident .t list
823
823
val let_bound_idents_full :
824
- value_binding list -> (Ident .t * Types .type_expr ) list
824
+ value_binding list -> (Ident .t * string loc * Types .type_expr ) list
825
825
val let_bound_idents_with_modes :
826
826
value_binding list
827
827
-> (Ident .t * (Location .t * Types .value_mode ) list ) list
@@ -835,7 +835,7 @@ val mkloc: 'a -> Location.t -> 'a Asttypes.loc
835
835
836
836
val pat_bound_idents : 'k general_pattern -> Ident .t list
837
837
val pat_bound_idents_full :
838
- 'k general_pattern -> (Ident .t * Types .type_expr ) list
838
+ 'k general_pattern -> (Ident .t * string loc * Types .type_expr ) list
839
839
840
840
(* * Splits an or pattern into its value (left) and exception (right) parts. *)
841
841
val split_pattern :
You can’t perform that action at this time.
0 commit comments