aboutsummaryrefslogtreecommitdiff
path: root/tactics
diff options
context:
space:
mode:
authorArnaud Spiwack2014-07-25 18:05:05 +0200
committerArnaud Spiwack2014-07-25 19:06:23 +0200
commit63d3d202022d70b12aceb3f3de13ab49539f2ba4 (patch)
tree3d0ee784b563d8111a932bdfdcd8dc80e1b44b28 /tactics
parente8d79faee901881fc08ea31761d530832105eaf7 (diff)
Adds a cycle tactic to reorder goals in a loop.
[cycle 1] puts the first goal last, [cycle -1] puts the last goal first, [cycle n] is like [do n cycle 1], [cycle -n] is like [do n cycle -1].
Diffstat (limited to 'tactics')
-rw-r--r--tactics/extratactics.ml45
1 files changed, 5 insertions, 0 deletions
diff --git a/tactics/extratactics.ml4 b/tactics/extratactics.ml4
index fa2ac37126..635904cc7e 100644
--- a/tactics/extratactics.ml4
+++ b/tactics/extratactics.ml4
@@ -871,3 +871,8 @@ TACTIC EXTEND give_up
| [ "give_up" ] ->
[ Proofview.give_up ]
END
+
+(* cycles [n] goals *)
+TACTIC EXTEND cycle
+| [ "cycle" int_or_var(n) ] -> [ Proofview.cycle (out_arg n) ]
+END