aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--doc/refman/RefMan-tac.tex10
-rw-r--r--tactics/extratactics.ml413
2 files changed, 23 insertions, 0 deletions
diff --git a/doc/refman/RefMan-tac.tex b/doc/refman/RefMan-tac.tex
index c1d6b1d0c..3f9f03c40 100644
--- a/doc/refman/RefMan-tac.tex
+++ b/doc/refman/RefMan-tac.tex
@@ -989,6 +989,16 @@ Assumptions} (see Section~\ref{PrintAssumptions}). Admitted subgoals
have names of the form {\ident}\texttt{\_admitted} possibly followed
by a number.
+\subsection{\tt is\_evar \term
+\tacindex{is\_evar}
+\label{isevar}}
+
+This tactic applies to any goal. It checks whether its argument is an
+existential variable. Existential variables are uninstantiated
+variables generated by e.g. {\tt eapply} (see Section~\ref{apply}).
+
+\ErrMsg \errindex{Not an evar}
+
\subsection{Bindings list
\index{Binding list}
\label{Binding-list}}
diff --git a/tactics/extratactics.ml4 b/tactics/extratactics.ml4
index f9c8e47fd..393934abf 100644
--- a/tactics/extratactics.ml4
+++ b/tactics/extratactics.ml4
@@ -705,3 +705,16 @@ END
(* ********************************************************************* *)
+
+TACTIC EXTEND constr_eq
+| [ "constr_eq" constr(x) constr(y) ] -> [
+ if eq_constr x y then tclIDTAC else tclFAIL 0 (str "Not equal") ]
+END
+
+TACTIC EXTEND is_evar
+| [ "is_evar" constr(x) ] ->
+ [ match kind_of_term x with
+ | Evar _ -> tclIDTAC
+ | _ -> tclFAIL 0 (str "Not an evar")
+ ]
+END