summaryrefslogtreecommitdiff
path: root/test-suite/success/ltac.v
diff options
context:
space:
mode:
authorGravatar Samuel Mimram <smimram@debian.org>2008-07-25 15:12:53 +0200
committerGravatar Samuel Mimram <smimram@debian.org>2008-07-25 15:12:53 +0200
commita0cfa4f118023d35b767a999d5a2ac4b082857b4 (patch)
treedabcac548e299fee1da464c93b3dba98484f45b1 /test-suite/success/ltac.v
parent2281410e38ef99d025ea77194585a9bc019fdaa9 (diff)
Imported Upstream version 8.2~beta3+dfsgupstream/8.2.beta3+dfsg
Diffstat (limited to 'test-suite/success/ltac.v')
-rw-r--r--test-suite/success/ltac.v47
1 files changed, 46 insertions, 1 deletions
diff --git a/test-suite/success/ltac.v b/test-suite/success/ltac.v
index 3f25f703..757cf6a4 100644
--- a/test-suite/success/ltac.v
+++ b/test-suite/success/ltac.v
@@ -173,5 +173,50 @@ Abort.
empty args *)
Goal True.
-match None with @None => exact I end.
+match constr:@None with @None => exact I end.
Abort.
+
+(* Check second-order pattern unification *)
+
+Ltac to_exist :=
+ match goal with
+ |- forall x y, @?P x y =>
+ let Q := eval lazy beta in (exists x, forall y, P x y) in
+ assert (Q->Q)
+ end.
+
+Goal forall x y : nat, x = y.
+to_exist. exact (fun H => H).
+Abort.
+
+(* Used to fail in V8.1 *)
+
+Tactic Notation "test" constr(t) integer(n) :=
+ set (k := t) in |- * at n.
+
+Goal forall x : nat, x = 1 -> x + x + x = 3.
+intros x H.
+test x 2.
+Abort.
+
+(* Utilisation de let rec sans arguments *)
+
+Ltac is :=
+ let rec i := match goal with |- ?A -> ?B => intro; i | _ => idtac end in
+ i.
+
+Goal True -> True -> True.
+is.
+exact I.
+Abort.
+
+(* Interférence entre espaces des noms *)
+
+Ltac O := intro.
+Ltac Z1 t := set (x:=t).
+Ltac Z2 t := t.
+Goal True -> True.
+Z1 O.
+Z2 ltac:O.
+exact I.
+Qed.