aboutsummaryrefslogtreecommitdiffhomepage
path: root/pretyping
diff options
context:
space:
mode:
authorGravatar Hugo Herbelin <Hugo.Herbelin@inria.fr>2015-01-01 09:32:02 +0100
committerGravatar Hugo Herbelin <Hugo.Herbelin@inria.fr>2015-01-01 09:35:58 +0100
commit3bd9cb26be01d0791fdf2dc56d3aacaa1379e50c (patch)
tree6771bc930f8ec5eb67f7eb388f7b16c6a74faa8f /pretyping
parent47b8109321446ebf153807fe8a26151c7c0b003a (diff)
An optimization in the use of unification candidates so as to get the
following working: Definition test {A B:Type} {H:A=B} (a:A) : B := rew H in a.
Diffstat (limited to 'pretyping')
-rw-r--r--pretyping/evarconv.ml9
1 files changed, 8 insertions, 1 deletions
diff --git a/pretyping/evarconv.ml b/pretyping/evarconv.ml
index c20235f53..e90662950 100644
--- a/pretyping/evarconv.ml
+++ b/pretyping/evarconv.ml
@@ -480,8 +480,15 @@ and evar_eqappr_x ?(rhs_is_already_stuck = false) ts env evd pbty
[eta;(* Postpone the use of an heuristic *)
(fun i ->
if not (occur_rigidly (fst ev) i tR) then
+ let i,tF =
+ if isRel tR || isVar tR then
+ (* Optimization so as to generate candidates *)
+ let i,ev = evar_absorb_arguments env i ev lF in
+ i,mkEvar ev
+ else
+ i,Stack.zip apprF in
switch (fun x y -> Success (add_conv_pb (pbty,env,x,y) i))
- (Stack.zip apprF) tR
+ tF tR
else
UnifFailure (evd,OccurCheck (fst ev,tR)))])
ev lF tR evd