aboutsummaryrefslogtreecommitdiff
path: root/tactics
diff options
context:
space:
mode:
authoraspiwack2013-11-02 15:40:17 +0000
committeraspiwack2013-11-02 15:40:17 +0000
commitbd39dfc9d8090f50bff6260495be2782e6d5e342 (patch)
tree31609b55959ed3d0647fc16c7657e95d9451cec1 /tactics
parenta774fb3002f72a24b62415478cb8dd0cc7e5d708 (diff)
A tactic shelve_unifiable.
Puts on the shelf every goals under focus on which other goals under focus depend. Useful when we want to solve these goals by unification (as in a first order proof search procedure, for instance). Also meant to be able to recover approximately the semantics of the old refine with the new implementation (use refine t; shelve_unifiable). TODO: bug dans l'example de shelve_unifiable git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@17017 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'tactics')
-rw-r--r--tactics/extratactics.ml48
-rw-r--r--tactics/tacinterp.ml6
2 files changed, 14 insertions, 0 deletions
diff --git a/tactics/extratactics.ml4 b/tactics/extratactics.ml4
index 44719a9625..a7a89eae73 100644
--- a/tactics/extratactics.ml4
+++ b/tactics/extratactics.ml4
@@ -810,6 +810,14 @@ TACTIC EXTEND shelve
[ Proofview.shelve ]
END
+(* Shelves the unifiable goals under focus, i.e. the goals which
+ appear in other goals under focus (the unfocused goals are not
+ considered). *)
+TACTIC EXTEND shelve_unifiable
+| [ "shelve_unifiable" ] ->
+ [ Proofview.shelve_unifiable ]
+END
+
(* Command to add every unshelved variables to the focus *)
VERNAC COMMAND EXTEND Unshelve
[ "Unshelve" ]
diff --git a/tactics/tacinterp.ml b/tactics/tacinterp.ml
index cb4bc01a35..eae2be0177 100644
--- a/tactics/tacinterp.ml
+++ b/tactics/tacinterp.ml
@@ -2206,6 +2206,12 @@ and interp_atomic ist tac =
end
(* For extensions *)
+ | TacExtend (loc,opn,[]) ->
+ (* spiwack: a special case for tactics (from TACTIC EXTEND) without arguments to
+ be interpreted without a [Proofview.Goal.enter]. Eventually we should make
+ something more fine-grained by modifying [interp_genarg]. *)
+ let tac = lookup_tactic opn in
+ tac [] ist
| TacExtend (loc,opn,l) ->
Proofview.Goal.enter begin fun gl ->
let goal_sigma = Proofview.Goal.sigma gl in