Skip to content

Commit 89ec88f

Browse files
committed
Quick fix to another bug of "subst" introduced in 4e3d464 and spotted by Maxime.
1 parent c78af97 commit 89ec88f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tactics/equality.ml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1752,15 +1752,16 @@ let subst_all ?(flags=default_subst_tactic_flags ()) () =
17521752
let process hyp =
17531753
Proofview.Goal.enter begin fun gl ->
17541754
let gl = Proofview.Goal.assume gl in
1755+
let env = Proofview.Goal.env gl in
17551756
let find_eq_data_decompose = find_eq_data_decompose gl in
17561757
let (_,_,c) = pf_get_hyp hyp gl in
17571758
let _,_,(_,x,y) = find_eq_data_decompose c in
17581759
(* J.F.: added to prevent failure on goal containing x=x as an hyp *)
17591760
if Term.eq_constr x y then Proofview.tclUNIT () else
17601761
match kind_of_term x, kind_of_term y with
1761-
| Var x', _ when not (occur_term x y) ->
1762+
| Var x', _ when not (occur_term x y) && not (is_evaluable env (EvalVarRef x')) ->
17621763
subst_one flags.rewrite_dependent_proof x' (hyp,y,true)
1763-
| _, Var y' when not (occur_term y x) ->
1764+
| _, Var y' when not (occur_term y x) && not (is_evaluable env (EvalVarRef y')) ->
17641765
subst_one flags.rewrite_dependent_proof y' (hyp,x,false)
17651766
| _ ->
17661767
Proofview.tclUNIT ()

0 commit comments

Comments
 (0)