Skip to content

Commit 3bfb728

Browse files
authored
Adapt to rocq-prover/rocq#20809 (use evar created by evar tactic instead of hard-coded name in unfold_post) (#834)
1 parent 644b830 commit 3bfb728

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

floyd/forward.v

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -926,10 +926,16 @@ end.
926926
Ltac cancel_for_forward_call := cancel_for_evar_frame.
927927
Ltac default_cancel_for_forward_call := cancel_for_evar_frame.
928928

929+
(* Work-around to obtain the evar that was created by the `evar` tactic.
930+
See PR #834. *)
931+
Ltac evar_value x := (eval unfold x in x).
932+
929933
Ltac unfold_post := match goal with |- ?Post = _ => let A := fresh "A" in let B := fresh "B" in first
930-
[evar (A : Type); evar (B : A -> environ -> mpred); unify Post (@exp _ _ ?A ?B);
934+
[evar (A : Type); evar (B : A -> environ -> mpred); let A_evar := (evar_value A) in let B_evar := (evar_value B) in
935+
unify Post (@exp _ _ A_evar B_evar);
931936
change Post with (@exp _ _ A B); subst A B |
932-
evar (A : list Prop); evar (B : environ -> mpred); unify Post (PROPx ?A ?B);
937+
evar (A : list Prop); evar (B : environ -> mpred); let A_evar := (evar_value A) in let B_evar := (evar_value B) in
938+
unify Post (PROPx A_evar B_evar);
933939
change Post with (PROPx A B); subst A B | idtac] end.
934940

935941

0 commit comments

Comments
 (0)