From 8287733d5df1bd673a38e92f23c47e95d1bb7a91 Mon Sep 17 00:00:00 2001 From: Pierre-Marie Pédrot Date: Wed, 3 Sep 2014 21:43:45 +0200 Subject: Putting back normalized goals when entering them. This should allow tactics after a Goal.enter not to have to renormalize them uselessly. --- proofs/goal.ml | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'proofs/goal.ml') diff --git a/proofs/goal.ml b/proofs/goal.ml index 5bbc502bd..1ada11745 100644 --- a/proofs/goal.ml +++ b/proofs/goal.ml @@ -246,6 +246,19 @@ let enter f = (); fun env rdefs gl info -> let sigma = !rdefs in f env sigma (Evd.evar_hyps info) (Evd.evar_concl info) gl +let nf_enter f = (); fun env rdefs gl info -> + let sigma = !rdefs in + if gl.cache == sigma then + f env sigma (Evd.evar_hyps info) (Evd.evar_concl info) gl + else + let info = Evarutil.nf_evar_info sigma info in + let sigma = Evd.add sigma gl.content info in + let gl = { gl with cache = sigma } in + let () = rdefs := sigma in + let hyps = Evd.evar_hyps info in + let env = Environ.reset_with_named_context hyps env in + f env sigma hyps (Evd.evar_concl info) gl + (* Layer to implement v8.2 tactic engine ontop of the new architecture. Types are different from what they used to be due to a change of the internal types. *) -- cgit v1.2.3