aboutsummaryrefslogtreecommitdiffhomepage
path: root/proofs/proofview.ml
diff options
context:
space:
mode:
authorGravatar aspiwack <aspiwack@85f007b7-540e-0410-9357-904b9bb8a0f7>2013-11-02 15:39:54 +0000
committerGravatar aspiwack <aspiwack@85f007b7-540e-0410-9357-904b9bb8a0f7>2013-11-02 15:39:54 +0000
commitc9504af26647ab745dc22811a2db8058e0b66632 (patch)
tree753c2029810002b23946636a3add74aacf86566c /proofs/proofview.ml
parent8d68ee674daa5deaa327b80e75f01876ef6ea9a0 (diff)
Adds a shelve tactic.
The shelve tactic puts all the focused goals out of sight. They can be later recalled by the Unshelve command. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@17013 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'proofs/proofview.ml')
-rw-r--r--proofs/proofview.ml18
1 files changed, 16 insertions, 2 deletions
diff --git a/proofs/proofview.ml b/proofs/proofview.ml
index bb1d5758d..5e1e1e6a4 100644
--- a/proofs/proofview.ml
+++ b/proofs/proofview.ml
@@ -565,7 +565,21 @@ let tclTIMEOUT n t =
| Util.Inr e -> tclZERO e
let mark_as_unsafe =
- Proof.put false
+ Proof.put (false,[])
+
+(* Shelves all the goals under focus. *)
+let shelve =
+ (* spiwack: convenience notations, waiting for ocaml 3.12 *)
+ let (>>=) = Proof.bind in
+ let (>>) = Proof.seq in
+ Proof.get >>= fun initial ->
+ Proof.set {initial with comb=[]} >>
+ Proof.put (true,initial.comb)
+
+(* [unshelve l p] adds all the goals in [l] at the end of the focused
+ goals of p *)
+let unshelve l p =
+ { p with comb = p.comb@l }
(*** Commands ***)
@@ -690,7 +704,7 @@ module V82 = struct
with Proof_errors.TacticFailure e -> raise e
let put_status b =
- Proof.put b
+ Proof.put (b,[])
let catchable_exception = catchable_exception
end