aboutsummaryrefslogtreecommitdiffhomepage
path: root/theories/Init
diff options
context:
space:
mode:
authorGravatar letouzey <letouzey@85f007b7-540e-0410-9357-904b9bb8a0f7>2006-10-05 12:38:33 +0000
committerGravatar letouzey <letouzey@85f007b7-540e-0410-9357-904b9bb8a0f7>2006-10-05 12:38:33 +0000
commit19a8469f7accf0671bc0270c66d7725ae57f6720 (patch)
treeb4e45bacc3b0949c456dd5760ff3605a7be5fb7b /theories/Init
parent4524219d80c2d5ea50ca8bba819bbc14bd6b9988 (diff)
revision de la semantique de rewrite ... in <clause>. details dans la doc
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@9211 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'theories/Init')
-rw-r--r--theories/Init/Tactics.v23
1 files changed, 3 insertions, 20 deletions
diff --git a/theories/Init/Tactics.v b/theories/Init/Tactics.v
index 9750be0df..7b03a56c5 100644
--- a/theories/Init/Tactics.v
+++ b/theories/Init/Tactics.v
@@ -49,24 +49,7 @@ Ltac f_equal :=
| _ => idtac
end.
-(* Rewriting in all hypothesis. *)
+(* Rewriting in all hypothesis several times everywhere *)
-Ltac rewrite_all Eq := match type of Eq with
- ?a = ?b =>
- generalize Eq; clear Eq;
- match goal with
- | H : context [a] |- _ => intro Eq; rewrite Eq in H; rewrite_all Eq
- | _ => intro Eq; try rewrite Eq
- end
- end.
-
-Ltac rewrite_all_rev Eq := match type of Eq with
- ?a = ?b =>
- generalize Eq; clear Eq;
- match goal with
- | H : context [b] |- _ => intro Eq; rewrite <- Eq in H; rewrite_all_rev Eq
- | _ => intro Eq; try rewrite <- Eq
- end
- end.
-
-Tactic Notation "rewrite_all" "<-" constr(H) := rewrite_all_rev H.
+Tactic Notation "rewrite_all" constr(eq) := repeat rewrite eq in *.
+Tactic Notation "rewrite_all" "<-" constr(eq) := repeat rewrite <- eq in *.