aboutsummaryrefslogtreecommitdiff
path: root/tactics
diff options
context:
space:
mode:
authorPierre-Marie Pédrot2015-12-08 23:34:38 +0100
committerPierre-Marie Pédrot2015-12-09 01:15:26 +0100
commit5c5b5906426f38323fc5d63f4dc634672ebd2649 (patch)
treedd157b1da42f4dcf7b0c3778ef71a7f4ec34db21 /tactics
parent19ea51a4b7f7debbe5bdeb2b2689cddadd9876f4 (diff)
Adding an unshelve tactical.
This tactical is inspired by discussions on the Coq-club list. For now it is still undocumented, and there is room left for design issues.
Diffstat (limited to 'tactics')
-rw-r--r--tactics/extratactics.ml410
1 files changed, 10 insertions, 0 deletions
diff --git a/tactics/extratactics.ml4 b/tactics/extratactics.ml4
index 9ffcd2dcff..1355499e48 100644
--- a/tactics/extratactics.ml4
+++ b/tactics/extratactics.ml4
@@ -21,6 +21,7 @@ open Util
open Evd
open Equality
open Misctypes
+open Proofview.Notations
DECLARE PLUGIN "extratactics"
@@ -864,6 +865,15 @@ TACTIC EXTEND shelve_unifiable
[ Proofview.shelve_unifiable ]
END
+(* Unshelves the goal shelved by the tactic. *)
+TACTIC EXTEND unshelve
+| [ "unshelve" tactic(t) ] ->
+ [
+ Proofview.with_shelf (Tacinterp.eval_tactic t) >>= fun (gls, ()) ->
+ Proofview.Unsafe.tclNEWGOALS gls
+ ]
+END
+
(* Command to add every unshelved variables to the focus *)
VERNAC COMMAND EXTEND Unshelve
[ "Unshelve" ]