aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorherbelin2010-04-11 13:35:15 +0000
committerherbelin2010-04-11 13:35:15 +0000
commit99574cda788bb61599a73474d66050ffeb6db9d9 (patch)
tree0406f7d78db94db43cb27cca40675799610c6430
parentffa867c4b33c7b52e72ce005cd8183d8e51f310b (diff)
Recovering 8.2 behavior of "simple (e)apply" (and hence of "(e)auto").
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@12927 85f007b7-540e-0410-9357-904b9bb8a0f7
-rw-r--r--pretyping/unification.ml2
-rw-r--r--test-suite/success/apply.v26
2 files changed, 27 insertions, 1 deletions
diff --git a/pretyping/unification.ml b/pretyping/unification.ml
index 648dcee0c8..35543ce24a 100644
--- a/pretyping/unification.ml
+++ b/pretyping/unification.ml
@@ -187,7 +187,7 @@ let default_no_delta_unify_flags = {
use_metas_eagerly = true;
modulo_delta = empty_transparent_state;
resolve_evars = false;
- use_evars_pattern_unification = true;
+ use_evars_pattern_unification = false;
}
let use_evars_pattern_unification flags =
diff --git a/test-suite/success/apply.v b/test-suite/success/apply.v
index 10182bdc8c..a6f9fa238d 100644
--- a/test-suite/success/apply.v
+++ b/test-suite/success/apply.v
@@ -358,6 +358,32 @@ intro x;
apply x.
Qed.
+(* The following worked in 8.2 but was not accepted from r12229 to
+ r12926 because "simple apply" started to use pattern unification of
+ evars. Evars pattern unification for simple (e)apply was disabled
+ in 12927 but "simple eapply" below worked from 12898 to 12926
+ because pattern-unification also started supporting abstraction
+ over Metas. However it did not find the "simple" solution and hence
+ the subsequent "assumption" failed. *)
+
+Goal exists f:nat->nat, forall x y, x = y -> f x = f y.
+intros; eexists; intros.
+simple eapply (@f_equal nat).
+assumption.
+Existential 1 := fun x => x.
+Qed.
+
+(* The following worked in 8.2 but was not accepted from r12229 to
+ r12897 for the same reason because eauto uses "simple apply". It
+ worked from 12898 to 12926 because eauto uses eassumption and not
+ assumption. *)
+
+Goal exists f:nat->nat, forall x y, x = y -> f x = f y.
+intros; eexists; intros.
+eauto.
+Existential 1 := fun x => x.
+Qed.
+
(* The following was accepted before r12612 but is still not accepted in r12658
Goal forall x : { x:nat | x = 0}, proj1_sig x = 0.