From 4e59a68fd6f2cd3cdf936c10cdbfeb46fc22ca95 Mon Sep 17 00:00:00 2001 From: Maxime Dénès Date: Thu, 11 Jun 2020 13:11:21 +0200 Subject: Better encapsulation of future goals We try to encapsulate the future goals abstraction in the evar map. A few calls to `save_future_goals` and `restore_future_goals` are still there, but we try to minimize them. This is a preliminary refactoring to make the invariants between the shelf and future goals more explicit, before giving unification access to the shelf, which is needed for #7825. --- engine/evarutil.ml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'engine/evarutil.ml') diff --git a/engine/evarutil.ml b/engine/evarutil.ml index 01c4e5fd72..9d3ae95e7d 100644 --- a/engine/evarutil.ml +++ b/engine/evarutil.ml @@ -522,9 +522,7 @@ let restrict_evar evd evk filter ?src candidates = let evd, evk' = Evd.restrict evk filter ?candidates ?src evd in (* Mark new evar as future goal, removing previous one, circumventing Proofview.advance but making Proof.run_tactic catch these. *) - let future_goals = Evd.save_future_goals evd in - let future_goals = Evd.filter_future_goals (fun evk' -> not (Evar.equal evk evk')) future_goals in - let evd = Evd.restore_future_goals evd future_goals in + let evd = Evd.filter_future_goals (fun evk' -> not (Evar.equal evk evk')) evd in (Evd.declare_future_goal evk' evd, evk') let rec check_and_clear_in_constr env evdref err ids global c = -- cgit v1.2.3