aboutsummaryrefslogtreecommitdiff
path: root/interp/constrextern.ml
diff options
context:
space:
mode:
authorHugo Herbelin2020-05-09 15:05:33 +0200
committerHugo Herbelin2020-05-09 15:05:33 +0200
commit56e2d2fe23bfe69f7c181e3786e8e95f1ee6151b (patch)
treea90ea6b71c1aa506c43ead2b55bfb4ffaa1f0866 /interp/constrextern.ml
parent3d20cedd6c7a38e712a6d94ecf52158fe6aa49db (diff)
parent4c39126f0a0a97152f67a3a5e7c86db860f48e39 (diff)
Merge PR #12163: Fix #12159 (Numeral Notations do not play well with multiple scopes for the same inductive)
Diffstat (limited to 'interp/constrextern.ml')
-rw-r--r--interp/constrextern.ml11
1 files changed, 3 insertions, 8 deletions
diff --git a/interp/constrextern.ml b/interp/constrextern.ml
index a37bac3275..d5a5bde616 100644
--- a/interp/constrextern.ml
+++ b/interp/constrextern.ml
@@ -435,13 +435,10 @@ let extern_record_pattern cstrsp args =
let rec extern_cases_pattern_in_scope (custom,scopes as allscopes) vars pat =
try
if !Flags.in_debugger || !Flags.raw_print || !print_no_symbol then raise No_match;
- let (na,sc,p) = uninterp_prim_token_cases_pattern pat in
+ let (na,p,key) = uninterp_prim_token_cases_pattern pat scopes in
match availability_of_entry_coercion custom InConstrEntrySomeLevel with
| None -> raise No_match
| Some coercion ->
- match availability_of_prim_token p sc scopes with
- | None -> raise No_match
- | Some key ->
let loc = cases_pattern_loc pat in
insert_pat_coercion ?loc coercion
(insert_pat_alias ?loc (insert_pat_delimiters ?loc (CAst.make ?loc @@ CPatPrim p) key) na)
@@ -848,13 +845,11 @@ let same_binder_type ty nal c =
(* one with no delimiter if possible) *)
let extern_possible_prim_token (custom,scopes) r =
- let (sc,n) = uninterp_prim_token r in
+ let (n,key) = uninterp_prim_token r scopes in
match availability_of_entry_coercion custom InConstrEntrySomeLevel with
| None -> raise No_match
| Some coercion ->
- match availability_of_prim_token n sc scopes with
- | None -> raise No_match
- | Some key -> insert_entry_coercion coercion (insert_delimiters (CAst.make ?loc:(loc_of_glob_constr r) @@ CPrim n) key)
+ insert_entry_coercion coercion (insert_delimiters (CAst.make ?loc:(loc_of_glob_constr r) @@ CPrim n) key)
let filter_enough_applied nargs l =
match nargs with