From 5a4cc30c737f113a7c57d14569137b3e06f5639f Mon Sep 17 00:00:00 2001 From: herbelin Date: Fri, 4 Apr 2008 14:55:47 +0000 Subject: Quelques améliorations des intro patterns: - ajout de -> et <- pour substitution immédiate d'une égalité (comportement à la subst si variable, à la rewrite in * sinon) - ajout possibilité d'hypothèses avec paramètres - correction d'un comportement bizarre de l'utilisation des noms dans cas "[[|] H]" (cf CHANGES) Ce serait bien d'avoir quelque chose comme "intros (H as <-) (H' as [ | ])" pour décider de garder les noms, mais la syntaxe est assez moche. Peut-être un "intros H: <- H': [ | ]" ? git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@10753 85f007b7-540e-0410-9357-904b9bb8a0f7 --- interp/genarg.ml | 3 +++ interp/genarg.mli | 1 + 2 files changed, 4 insertions(+) (limited to 'interp') diff --git a/interp/genarg.ml b/interp/genarg.ml index fc93f455a2..ac45bfe8dd 100644 --- a/interp/genarg.ml +++ b/interp/genarg.ml @@ -79,6 +79,7 @@ type intro_pattern_expr = | IntroWildcard | IntroIdentifier of identifier | IntroAnonymous + | IntroRewrite of bool | IntroFresh of identifier and case_intro_pattern_expr = intro_pattern_expr list list @@ -87,6 +88,8 @@ let rec pr_intro_pattern = function | IntroWildcard -> str "_" | IntroIdentifier id -> pr_id id | IntroAnonymous -> str "?" + | IntroRewrite true -> str "->" + | IntroRewrite false -> str "<-" | IntroFresh id -> str "?" ++ pr_id id and pr_case_intro_pattern = function diff --git a/interp/genarg.mli b/interp/genarg.mli index 0df4e66a01..9773082181 100644 --- a/interp/genarg.mli +++ b/interp/genarg.mli @@ -36,6 +36,7 @@ type intro_pattern_expr = | IntroWildcard | IntroIdentifier of identifier | IntroAnonymous + | IntroRewrite of bool | IntroFresh of identifier and case_intro_pattern_expr = intro_pattern_expr list list -- cgit v1.2.3