diff options
| -rw-r--r-- | pretyping/evarconv.ml | 9 | ||||
| -rw-r--r-- | test-suite/success/evars.v | 7 |
2 files changed, 15 insertions, 1 deletions
diff --git a/pretyping/evarconv.ml b/pretyping/evarconv.ml index c20235f539..e906629508 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 diff --git a/test-suite/success/evars.v b/test-suite/success/evars.v index f42c6a036e..4e2bf45118 100644 --- a/test-suite/success/evars.v +++ b/test-suite/success/evars.v @@ -408,3 +408,10 @@ Check match Some _ with None => _ | _ => _ end. (* Used to fail for a couple of days in Nov 2014 *) Axiom test : forall P1 P2, P1 = P2 -> P1 -> P2. + +(* Check use of candidates *) + +Import EqNotations. +Definition test2 {A B:Type} {H:A=B} (a:A) : B := rew H in a. + + |
