diff options
| -rw-r--r-- | tactics/rewrite.ml | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/tactics/rewrite.ml b/tactics/rewrite.ml index f251d69d90..a9c60a1edf 100644 --- a/tactics/rewrite.ml +++ b/tactics/rewrite.ml @@ -1512,15 +1512,15 @@ let cl_rewrite_clause_newtac ?abs strat clause = | Some id, (undef, None, newt) -> Proofview.V82.tactic (Tacmach.convert_hyp_no_check (id, None, newt)) | None, (undef, Some p, newt) -> - let refable = Goal.Refinable.make - (fun handle -> - Goal.bind env - (fun env -> Goal.bind (Refinable.mkEvar handle env newt) - (fun ev -> - Goal.Refinable.constr_of_open_constr handle true - (undef, mkApp (p, [| ev |]))))) - in - Proofview.tclSENSITIVE (Goal.bind refable Goal.refine) + Proofview.Goal.raw_enter begin fun gl -> + let env = Proofview.Goal.env gl in + let make h = + let (h, ()) = Proofview.Refine.update h (fun _ -> undef, ()) in + let (h, ev) = Proofview.Refine.new_evar h env newt in + h, mkApp (p, [| ev |]) + in + Proofview.Refine.refine make + end | None, (undef, None, newt) -> Proofview.V82.tactic (Tacmach.convert_concl_no_check newt DEFAULTcast) in |
