From 04d70321a920edfb2b0572e21a5758b423477fa9 Mon Sep 17 00:00:00 2001 From: Ralf Jung <jung@mpi-sws.org> Date: Wed, 24 Feb 2016 14:24:48 +0100 Subject: [PATCH] make find_pat more robust: work with idtac --- prelude/tactics.v | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/prelude/tactics.v b/prelude/tactics.v index 5ca37ea37..9843baa66 100644 --- a/prelude/tactics.v +++ b/prelude/tactics.v @@ -303,7 +303,8 @@ Tactic Notation "feed" "destruct" constr(H) "as" simple_intropattern(IP) := It will search for the first subterm of the goal matching [pat], and then call [tac] with that subterm. *) Ltac find_pat pat tac := - match goal with |- context [?x] => unify pat x; tac x || fail 2 + match goal with |- context [?x] => + unify pat x; tryif tac x then idtac else fail 2 end. (** Coq's [firstorder] tactic fails or loops on rather small goals already. In -- GitLab