From 6a5b186d2b53cf2c3e3a7ed5c238d26367a9df96 Mon Sep 17 00:00:00 2001 From: gareuselesinge Date: Fri, 30 Aug 2013 12:20:10 +0000 Subject: recdef: restore old semantics (pre STM) The Stm commit switched from an home made handling of failures to a with_state_protection. This was wrong, since in case of success the global state has to be left altered. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@16746 85f007b7-540e-0410-9357-904b9bb8a0f7 --- library/states.mli | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'library/states.mli') diff --git a/library/states.mli b/library/states.mli index 0babae6af..fae1bfc02 100644 --- a/library/states.mli +++ b/library/states.mli @@ -27,3 +27,10 @@ val unfreeze : state -> unit val with_state_protection : ('a -> 'b) -> 'a -> 'b +(** [with_state_protection_on_exception f x] applies [f] to [x] and restores the + state of the whole system as it was before applying [f] only if an + exception is raised. Unlike [with_state_protection] it also takes into + account the proof state *) + +val with_state_protection_on_exception : ('a -> 'b) -> 'a -> 'b + -- cgit v1.2.3