aboutsummaryrefslogtreecommitdiff
path: root/pretyping
diff options
context:
space:
mode:
authorHugo Herbelin2015-07-16 09:32:36 +0200
committerHugo Herbelin2015-07-16 09:40:08 +0200
commit93579407f5795c117d6c6f1399396b690f80d723 (patch)
tree701aad6c0994ae5e533d86847b67e8ea827abf30 /pretyping
parentc57c7edbe517851c7309112f6eb5d8297f03e000 (diff)
Fixing anomaly #3743 while printing an error message involving evar constraints.
Indeed, the name of a bound variable was lost when unifying under a Prod in evarconv. The error message for "Unable to satisfy the following constraints" is still to be improved though.
Diffstat (limited to 'pretyping')
-rw-r--r--pretyping/evarconv.ml5
1 files changed, 3 insertions, 2 deletions
diff --git a/pretyping/evarconv.ml b/pretyping/evarconv.ml
index 97b1b16455..64d1345c1f 100644
--- a/pretyping/evarconv.ml
+++ b/pretyping/evarconv.ml
@@ -726,12 +726,13 @@ and evar_eqappr_x ?(rhs_is_already_stuck = false) ts env evd pbty
UnifFailure (evd,UnifUnivInconsistency p)
| e when Errors.noncritical e -> UnifFailure (evd,NotSameHead))
- | Prod (n,c1,c'1), Prod (_,c2,c'2) when app_empty ->
+ | Prod (n1,c1,c'1), Prod (n2,c2,c'2) when app_empty ->
ise_and evd
[(fun i -> evar_conv_x ts env i CONV c1 c2);
(fun i ->
let c = nf_evar i c1 in
- evar_conv_x ts (push_rel (n,None,c) env) i pbty c'1 c'2)]
+ let na = Nameops.name_max n1 n2 in
+ evar_conv_x ts (push_rel (na,None,c) env) i pbty c'1 c'2)]
| Rel x1, Rel x2 ->
if Int.equal x1 x2 then