aboutsummaryrefslogtreecommitdiff
path: root/interp/constrintern.ml
diff options
context:
space:
mode:
authorHugo Herbelin2017-10-04 23:55:54 +0200
committerHugo Herbelin2017-10-05 00:31:40 +0200
commit26f216653aed171a70513d3f5ece059ab30bcd73 (patch)
tree94f94e0af01f74136cec2637ad29f3c1401436e2 /interp/constrintern.ml
parentb9740771e8113cb9e607793887be7a12587d0326 (diff)
Fixing #5762 (supporting imp. args. in "where" clause of an inductive def.).
This allows e.g. the following to work: Reserved Notation "* a" (at level 70). Inductive P {n : nat} : nat -> Prop := c m : *m where "* m" := (P m). We seize this opportunity to make main calls to Metasyntax to depend on an arbitrary env rather than on Global.env. Incidentally, this fixes a little coqdoc bug in classifying the inductive type referred to in the "where" clause.
Diffstat (limited to 'interp/constrintern.ml')
-rw-r--r--interp/constrintern.ml4
1 files changed, 1 insertions, 3 deletions
diff --git a/interp/constrintern.ml b/interp/constrintern.ml
index 6f7c6c8277..d19f3b7f65 100644
--- a/interp/constrintern.ml
+++ b/interp/constrintern.ml
@@ -2133,8 +2133,7 @@ let intern_constr_pattern env ?(as_type=false) ?(ltacvars=empty_ltac_sign) c =
~pattern_mode:true ~ltacvars env c in
pattern_of_glob_constr c
-let interp_notation_constr ?(impls=empty_internalization_env) nenv a =
- let env = Global.env () in
+let interp_notation_constr env ?(impls=empty_internalization_env) nenv a =
(* [vl] is intended to remember the scope of the free variables of [a] *)
let vl = Id.Map.map (fun typ -> (ref true, ref None, typ)) nenv.ninterp_var_type in
let c = internalize (Global.env()) {ids = extract_ids env; unb = false;
@@ -2213,4 +2212,3 @@ let interp_context_evars ?(global_level=false) ?(impl_env=empty_internalization_
let int_env,bl = intern_context global_level env impl_env params in
let x = interp_glob_context_evars env evdref shift bl in
int_env, x
-