aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Gross2014-06-12 13:54:41 +0100
committerPierre Boutillier2014-08-25 16:46:45 +0200
commitaa2f0216bb39a1054737b1edf695f28f59c14ea7 (patch)
tree7001a2b200084faaa8fad700d555590e7ef8634b
parentf23e7e7d6f8912ef3ddcc6288cd0f5710a12b99a (diff)
Add an is_cofix tactic
Should we also add is_* tactics for other things? is_rel, is_meta, is_sort, is_cast, is_prod, is_lambda, is_letin, is_app, is_const, is_ind, is_constructor, is_case, is_proj?
-rw-r--r--tactics/extratactics.ml47
1 files changed, 7 insertions, 0 deletions
diff --git a/tactics/extratactics.ml4 b/tactics/extratactics.ml4
index c681078fa4..ec120f9c6a 100644
--- a/tactics/extratactics.ml4
+++ b/tactics/extratactics.ml4
@@ -836,6 +836,13 @@ TACTIC EXTEND is_fix
| _ -> Tacticals.New.tclFAIL 0 (Pp.str "not a fix definition") ]
END;;
+TACTIC EXTEND is_cofix
+| [ "is_cofix" constr(x) ] ->
+ [ match kind_of_term x with
+ | CoFix _ -> Proofview.tclUNIT ()
+ | _ -> Tacticals.New.tclFAIL 0 (Pp.str "not a cofix definition") ]
+END;;
+
(* Command to grab the evars left unresolved at the end of a proof. *)
(* spiwack: I put it in extratactics because it is somewhat tied with
the semantics of the LCF-style tactics, hence with the classic tactic