aboutsummaryrefslogtreecommitdiff
path: root/tactics
diff options
context:
space:
mode:
authorArnaud Spiwack2014-07-25 18:16:24 +0200
committerArnaud Spiwack2014-07-25 19:06:23 +0200
commitd2d23987680f1328e91e57d93bef875766455cff (patch)
tree84c959d833ba7498a28d71f48ef81302ef078499 /tactics
parent63d3d202022d70b12aceb3f3de13ab49539f2ba4 (diff)
Add a tactic [swap i j] to swap the position of goals [i] and [j].
If [i] or [j] is negative goals are counted from the end.
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 635904cc7e..d0993b66ea 100644
--- a/tactics/extratactics.ml4
+++ b/tactics/extratactics.ml4
@@ -876,3 +876,8 @@ END
TACTIC EXTEND cycle
| [ "cycle" int_or_var(n) ] -> [ Proofview.cycle (out_arg n) ]
END
+
+(* swaps goals number [i] and [j] *)
+TACTIC EXTEND swap
+| [ "swap" int_or_var(i) int_or_var(j) ] -> [ Proofview.swap (out_arg i) (out_arg j) ]
+END