diff options
| author | Pierre-Marie Pédrot | 2014-06-24 14:23:35 +0200 |
|---|---|---|
| committer | Pierre-Marie Pédrot | 2014-06-24 15:52:31 +0200 |
| commit | 03cab057c3ccc51464ed69531441d3c09b2919a7 (patch) | |
| tree | af11609b17ae021e10ffad2edf2386fcdb0dc70f /proofs | |
| parent | 89dc208ff140ba6ecd7b2c931401f9c58fb2985e (diff) | |
Clenvtac.clenv_refine in the new monad. Not satisfactory though, because it
exhibits the "useless goal" behaviour: there is code out there depending on
the fact that goals cannot be solved by side effects.
Diffstat (limited to 'proofs')
| -rw-r--r-- | proofs/clenvtac.ml | 15 | ||||
| -rw-r--r-- | proofs/clenvtac.mli | 2 |
2 files changed, 11 insertions, 6 deletions
diff --git a/proofs/clenvtac.ml b/proofs/clenvtac.ml index e8af6ffbd4..b2fea6fd10 100644 --- a/proofs/clenvtac.ml +++ b/proofs/clenvtac.ml @@ -59,7 +59,11 @@ let clenv_pose_dependent_evars with_evars clenv = (RefinerError (UnresolvedBindings (List.map (meta_name clenv.evd) dep_mvs))); clenv_pose_metas_as_evars clenv dep_mvs -let clenv_refine with_evars ?(with_classes=true) clenv gls = +let clenv_refine with_evars ?(with_classes=true) clenv = + (** ppedrot: a Goal.enter here breaks things, because the tactic below may + solve goals by side effects, while the compatibility layer keeps those + useless goals. That deserves a FIXME. *) + Proofview.V82.tactic begin fun gl -> let clenv = clenv_pose_dependent_evars with_evars clenv in let evd' = if with_classes then @@ -71,16 +75,17 @@ let clenv_refine with_evars ?(with_classes=true) clenv gls = let clenv = { clenv with evd = evd' } in tclTHEN (tclEVARS (Evd.clear_metas evd')) - (refine_no_check (clenv_cast_meta clenv (clenv_value clenv))) - gls + (refine_no_check (clenv_cast_meta clenv (clenv_value clenv))) gl + end open Unification let dft = default_unify_flags let res_pf clenv ?(with_evars=false) ?(flags=dft ()) = - Proofview.V82.tactic begin fun gl -> - clenv_refine with_evars (clenv_unique_resolver ~flags clenv gl) gl + Proofview.Goal.raw_enter begin fun gl -> + let clenv gl = clenv_unique_resolver ~flags clenv gl in + clenv_refine with_evars (Tacmach.New.of_old clenv (Proofview.Goal.assume gl)) end (* [unifyTerms] et [unify] ne semble pas gérer les Meta, en diff --git a/proofs/clenvtac.mli b/proofs/clenvtac.mli index eea32019ee..789a21c247 100644 --- a/proofs/clenvtac.mli +++ b/proofs/clenvtac.mli @@ -14,7 +14,7 @@ open Unification (** Tactics *) val unify : ?flags:unify_flags -> constr -> unit Proofview.tactic -val clenv_refine : evars_flag -> ?with_classes:bool -> clausenv -> tactic +val clenv_refine : evars_flag -> ?with_classes:bool -> clausenv -> unit Proofview.tactic val res_pf : clausenv -> ?with_evars:evars_flag -> ?flags:unify_flags -> unit Proofview.tactic val clenv_pose_dependent_evars : evars_flag -> clausenv -> clausenv |
