aboutsummaryrefslogtreecommitdiff
path: root/test-suite
diff options
context:
space:
mode:
authorHugo Herbelin2020-05-14 21:34:17 +0200
committerHugo Herbelin2020-05-14 21:34:17 +0200
commit56e23844e80e6d607ad5fa56dfeedcd70e97ee70 (patch)
tree403c7b43e73fa4159fd997ca26953098b34e22b5 /test-suite
parentcc54af3842cbf99f169f7937b0e31f737652bd3a (diff)
parentb5ecd2e46202f47cfccf305e449bcdd8a6a14a0f (diff)
Merge PR #12256: Move the static check of evaluability in unfold tactic to runtime.
Reviewed-by: herbelin
Diffstat (limited to 'test-suite')
-rw-r--r--test-suite/bugs/closed/bug_11727.v8
-rw-r--r--test-suite/bugs/closed/bug_4925.v6
-rw-r--r--test-suite/bugs/closed/bug_5159.v12
-rw-r--r--test-suite/bugs/closed/bug_5764.v7
-rw-r--r--test-suite/success/with_strategy.v8
5 files changed, 37 insertions, 4 deletions
diff --git a/test-suite/bugs/closed/bug_11727.v b/test-suite/bugs/closed/bug_11727.v
new file mode 100644
index 0000000000..d346f05c10
--- /dev/null
+++ b/test-suite/bugs/closed/bug_11727.v
@@ -0,0 +1,8 @@
+Tactic Notation "myunfold" reference(x) := unfold x.
+Notation idnat := (@id nat).
+Goal let n := 0 in idnat n = 0.
+Proof.
+ intro n.
+ myunfold idnat.
+ myunfold n.
+Abort.
diff --git a/test-suite/bugs/closed/bug_4925.v b/test-suite/bugs/closed/bug_4925.v
new file mode 100644
index 0000000000..d4e4b35351
--- /dev/null
+++ b/test-suite/bugs/closed/bug_4925.v
@@ -0,0 +1,6 @@
+Axiom a: bool.
+
+Goal a = true.
+Proof.
+try unfold a.
+Abort.
diff --git a/test-suite/bugs/closed/bug_5159.v b/test-suite/bugs/closed/bug_5159.v
new file mode 100644
index 0000000000..cbc924c2d3
--- /dev/null
+++ b/test-suite/bugs/closed/bug_5159.v
@@ -0,0 +1,12 @@
+Axiom foo : Type.
+Definition bar := 1.
+Definition bar' := Eval cbv -[bar] in bar.
+Declare Reduction red' := cbv -[bar].
+Opaque bar.
+Definition bar'' := Eval red' in bar.
+Declare Reduction red'' := cbv -[bar]. (* Error: Cannot coerce bar to an
+evaluable reference. *)
+Definition bar''' := Eval cbv -[bar] in bar. (* Error: Cannot coerce bar to an
+evaluable reference. *)
+Definition foo' := Eval cbv -[foo] in foo. (* Error: Cannot coerce foo to an
+evaluable reference. *)
diff --git a/test-suite/bugs/closed/bug_5764.v b/test-suite/bugs/closed/bug_5764.v
new file mode 100644
index 0000000000..0b015d9c7e
--- /dev/null
+++ b/test-suite/bugs/closed/bug_5764.v
@@ -0,0 +1,7 @@
+Module Type A.
+Parameter a : nat.
+End A.
+
+Module B (mA : A).
+Ltac cbv_a := cbv [mA.a].
+End B.
diff --git a/test-suite/success/with_strategy.v b/test-suite/success/with_strategy.v
index 077b57c87f..6f0833211e 100644
--- a/test-suite/success/with_strategy.v
+++ b/test-suite/success/with_strategy.v
@@ -195,8 +195,8 @@ Opaque F.id.
Goal F.id 0 = F.id 0.
Fail unfold F.id.
- (* This should work, but it fails with "Cannot coerce F.id to an evaluable reference." *)
- Fail F.with_transparent_id ltac:(progress unfold F.id).
+ F.with_transparent_id ltac:(progress unfold F.id).
+ Undo.
F.with_transparent_id ltac:(let x := constr:(@F.id) in progress unfold x).
Abort.
@@ -212,8 +212,8 @@ Opaque F2.id.
Goal F2.id 0 = F2.id 0.
Fail unfold F2.id.
- (* This should work, but it fails with "Cannot coerce F2.id to an evaluable reference." *)
- Fail F2.with_transparent_id ltac:(progress unfold F2.id).
+ F2.with_transparent_id ltac:(progress unfold F2.id).
+ Undo.
F2.with_transparent_id ltac:(let x := constr:(@F2.id) in progress unfold x).
Abort.