aboutsummaryrefslogtreecommitdiff
path: root/pretyping
diff options
context:
space:
mode:
authorPierre-Marie Pédrot2016-10-05 18:18:22 +0200
committerPierre-Marie Pédrot2016-10-05 18:18:22 +0200
commit2dcd8f2e82366bb3b0f51a42426ccdfbb00281dc (patch)
tree4e9a44599dec13e262538e70a6a60bcf3e5fa97e /pretyping
parent01a448be0133872a686e613ab1034b4cb97cd666 (diff)
parent8114da3ba8a9b31ffe194e7f7f0239ecc2219b9c (diff)
Merge branch 'v8.6'
Diffstat (limited to 'pretyping')
-rw-r--r--pretyping/cases.ml7
-rw-r--r--pretyping/unification.ml2
2 files changed, 5 insertions, 4 deletions
diff --git a/pretyping/cases.ml b/pretyping/cases.ml
index 72baa34931..0d30b3e4c8 100644
--- a/pretyping/cases.ml
+++ b/pretyping/cases.ml
@@ -2577,6 +2577,9 @@ let compile_cases loc style (typing_fun, evdref) tycon env (predopt, tomatchl, e
typing_function = typing_fun } in
let j = compile pb in
+
+ (* We coerce to the tycon (if an elim predicate was provided) *)
+ let j = inh_conv_coerce_to_tycon loc env myevdref j tycon in
evdref := !myevdref;
j in
@@ -2587,6 +2590,4 @@ let compile_cases loc style (typing_fun, evdref) tycon env (predopt, tomatchl, e
(* We check for unused patterns *)
List.iter (check_unused_pattern env) matx;
- (* We coerce to the tycon (if an elim predicate was provided) *)
- inh_conv_coerce_to_tycon loc env evdref j tycon
-
+ j
diff --git a/pretyping/unification.ml b/pretyping/unification.ml
index 5653b5675f..5d6c41103e 100644
--- a/pretyping/unification.ml
+++ b/pretyping/unification.ml
@@ -1588,7 +1588,7 @@ let make_abstraction_core name (test,out) env sigma c ty occs check_occs concl =
let x = id_of_name_using_hdchar (Global.env()) t name in
let ids = ids_of_named_context (named_context env) in
if name == Anonymous then next_ident_away_in_goal x ids else
- if mem_named_context x (named_context env) then
+ if mem_named_context_val x (named_context_val env) then
user_err ~hdr:"Unification.make_abstraction_core"
(str "The variable " ++ Nameops.pr_id x ++ str " is already declared.")
else