aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGES4
-rw-r--r--pretyping/tacred.ml3
2 files changed, 6 insertions, 1 deletions
diff --git a/CHANGES b/CHANGES
index 71bc1cc720..d79b1d02ff 100644
--- a/CHANGES
+++ b/CHANGES
@@ -43,6 +43,10 @@ Tactics
behaves like if matching on "?X pat1 ... patn", i.e. accepting "_"
to be instantiated by an applicative term (experimental at this
stage, potential source of incompatibilities).
+- "change ... in ..." and "simpl ... in ..." now consider nested
+ occurrences (possible source of incompatibilities since this alters
+ the numbering of occurrences).
+
Program
diff --git a/pretyping/tacred.ml b/pretyping/tacred.ml
index 08d2c7cdf4..31cf52eace 100644
--- a/pretyping/tacred.ml
+++ b/pretyping/tacred.ml
@@ -897,7 +897,8 @@ let contextually byhead (occs,c) f env sigma t =
else not (List.mem !pos locs) in
incr pos;
if ok then
- f subst env sigma t
+ let subst' = List.map (on_snd (traverse envc)) subst in
+ f subst' env sigma t
else if byhead then
(* find other occurrences of c in t; TODO: ensure left-to-right *)
let (f,l) = destApp t in