aboutsummaryrefslogtreecommitdiff
path: root/interp
diff options
context:
space:
mode:
authorHugo Herbelin2019-11-14 13:42:35 +0100
committerHugo Herbelin2020-02-22 22:37:42 +0100
commita905e70df85ef7bf700bb3d6a1b48ae180dfa987 (patch)
treef80547285ccfee9f0d64f6dabd9c0a6b72e1c181 /interp
parent9da7715108554a5105c012685e90b2fa563abf08 (diff)
Inherit arguments scopes in pattern notations bound to some @id.
Diffstat (limited to 'interp')
-rw-r--r--interp/constrintern.ml5
1 files changed, 3 insertions, 2 deletions
diff --git a/interp/constrintern.ml b/interp/constrintern.ml
index 1b9b45c3fb..f68f4e67b9 100644
--- a/interp/constrintern.ml
+++ b/interp/constrintern.ml
@@ -1659,10 +1659,11 @@ let drop_notations_pattern looked_for genv =
let () = assert (List.is_empty vars) in
let (_,argscs) = find_remaining_scopes [] pats g in
Some (g, [], List.map2 (in_pat_sc scopes) argscs pats)
- | NApp (NRef g,[]) -> (* special case: Syndef for @Cstr, this deactivates *)
+ | NApp (NRef g,[]) -> (* special case: Syndef for @Cstr deactivates implicit arguments *)
test_kind top g;
let () = assert (List.is_empty vars) in
- Some (g, List.map (in_pat false scopes) pats, [])
+ let (_,argscs) = find_remaining_scopes [] pats g in
+ Some (g, List.map2 (in_pat_sc scopes) argscs pats, [])
| NApp (NRef g,args) ->
(* Convention: do not deactivate implicit arguments and scopes for further arguments *)
test_kind top g;