aboutsummaryrefslogtreecommitdiff
path: root/tactics
diff options
context:
space:
mode:
authorletouzey2011-10-07 14:24:01 +0000
committerletouzey2011-10-07 14:24:01 +0000
commit34a02fb37167a302fb05a4d2eb01321a02a0ffa9 (patch)
tree81e30ee3ec8155af45a2a833efc14bcb512982dc /tactics
parent1f84b509851f3eead190eac2300ee77611ed9ff4 (diff)
A new tactic is_var to check whether a term is a goal/section variable
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@14524 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'tactics')
-rw-r--r--tactics/extratactics.ml47
1 files changed, 7 insertions, 0 deletions
diff --git a/tactics/extratactics.ml4 b/tactics/extratactics.ml4
index e25e551353..4af1bce7de 100644
--- a/tactics/extratactics.ml4
+++ b/tactics/extratactics.ml4
@@ -754,3 +754,10 @@ TACTIC EXTEND has_evar
| [ "has_evar" constr(x) ] ->
[ if has_evar x then tclIDTAC else tclFAIL 0 (str "No evars") ]
END
+
+TACTIC EXTEND is_hyp
+| [ "is_var" constr(x) ] ->
+ [ match kind_of_term x with
+ | Var _ -> tclIDTAC
+ | _ -> tclFAIL 0 (str "Not a variable or hypothesis") ]
+END