aboutsummaryrefslogtreecommitdiff
path: root/test-suite
diff options
context:
space:
mode:
authorJason Gross2019-09-16 19:19:07 -0400
committerJason Gross2019-11-26 14:14:04 -0500
commitb09444fdaee1cf608dd40465d5e400fbd46ef6ad (patch)
tree96918b6f363dcbad148d8b5cb4623eacddd3c75e /test-suite
parent49d21a292c3a57e8ec01888745957716834f1e36 (diff)
Make rapply handle all numbers of underscores
Also add a tactic notation so that it takes in uconstrs by default. Also add some basic tests for `rapply`. Also document rapply in the manual
Diffstat (limited to 'test-suite')
-rw-r--r--test-suite/success/rapply.v22
1 files changed, 22 insertions, 0 deletions
diff --git a/test-suite/success/rapply.v b/test-suite/success/rapply.v
new file mode 100644
index 0000000000..5bc2322842
--- /dev/null
+++ b/test-suite/success/rapply.v
@@ -0,0 +1,22 @@
+Require Import Coq.Program.Tactics.
+
+Ltac test n :=
+ (*let __ := match goal with _ => idtac n end in*)
+ lazymatch n with
+ | O => let __ := match goal with _ => assert True by rapply I; clear end in
+ uconstr:(fun _ => I)
+ | S ?n'
+ => let lem := test n' in
+ let __ := match goal with _ => assert True by (unshelve rapply lem; try exact I); clear end in
+ uconstr:(fun _ : True => lem)
+ end.
+
+Goal True.
+ assert True by rapply I.
+ assert True by (unshelve rapply (fun _ => I); try exact I).
+ assert True by (unshelve rapply (fun _ _ => I); try exact I).
+ assert True by (unshelve rapply (fun _ _ _ => I); try exact I).
+ clear.
+ Time let __ := test 50 in idtac.
+ rapply I.
+Qed.