aboutsummaryrefslogtreecommitdiff
path: root/contrib/interface
diff options
context:
space:
mode:
authorletouzey2008-03-01 01:59:59 +0000
committerletouzey2008-03-01 01:59:59 +0000
commit0d62e3344d7f69c0296c347c7aeddabd09bbab60 (patch)
tree38032050565becc6868e462956caeca0367c3a0a /contrib/interface
parent50d4df2da89461f280c302d032422856f8e77991 (diff)
Rework on rich forms of rewrite
1) changed the semantics of rewrite H,H' : the earlier semantics (rewrite H,H' == rewrite H; rewrite H') was poorly suited for situations where first rewrite H generates side-conditions. New semantics is tclTHENFIRST instead of tclTHEN, that is side-conditions are left untouched. Note to myself: check if side-effect-come-first bug of setoid rewrite is still alive, and do something if yes 2) new syntax for rewriting something many times. This syntax is shamelessly taken from ssreflect: rewrite ?H means "H as many times as possible" (i.e. almost repeat rewrite H, except that possible side-conditions are left apart as in 1) rewrite !H means "at least once" (i.e. rewrite H; repeat rewrite H) rewrite 3?H means "up to 3 times", maybe less (i.e. something like: do 3 (try rewrite H)). rewrite 3!H means "exactly 3 times" (i.e. almost do 3 rewrite H). For instance: rewrite 3?foo, <-2!bar in H1,H2|-* 3) By the way, for a try, I've enabled the syntax +/- as synonyms for ->/<- in the orientation of rewrite. Comments welcome ... git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@10612 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'contrib/interface')
-rw-r--r--contrib/interface/depends.ml2
-rw-r--r--contrib/interface/xlate.ml2
2 files changed, 2 insertions, 2 deletions
diff --git a/contrib/interface/depends.ml b/contrib/interface/depends.ml
index 1becbbb94a..77d405e15d 100644
--- a/contrib/interface/depends.ml
+++ b/contrib/interface/depends.ml
@@ -363,7 +363,7 @@ let rec depends_of_gen_tactic_expr depends_of_'constr depends_of_'ind depends_of
| TacTransitivity c -> depends_of_'constr c acc
(* Equality and inversion *)
- | TacRewrite (_,cbl,_) -> list_union_map (o depends_of_'constr_with_bindings snd) cbl acc
+ | TacRewrite (_,cbl,_) -> list_union_map (o depends_of_'constr_with_bindings (fun (_,_,x)->x)) cbl acc
| TacInversion (is, _) -> depends_of_'a_'b_inversion_strength depends_of_'constr is acc
(* For ML extensions *)
diff --git a/contrib/interface/xlate.ml b/contrib/interface/xlate.ml
index 0fbfa39b72..db8963554b 100644
--- a/contrib/interface/xlate.ml
+++ b/contrib/interface/xlate.ml
@@ -1011,7 +1011,7 @@ and xlate_tac =
CT_coerce_TACTIC_COM_to_TACTIC_OPT tac
in
CT_replace_with (c1, c2,cl,tac_opt)
- | TacRewrite(false,[b,cbindl],cl) ->
+ | TacRewrite(false,[b,Precisely 1,cbindl],cl) ->
let cl = xlate_clause cl
and c = xlate_formula (fst cbindl)
and bindl = xlate_bindings (snd cbindl) in