From 80aba8d52c650ef8e4ada694c20bf12c15849694 Mon Sep 17 00:00:00 2001 From: gareuselesinge Date: Thu, 8 Aug 2013 18:52:47 +0000 Subject: enhance marshallable option for freeze (minor TODO in safe_typing) It can be: `Yes Full data, in a state that can be marshalled `No Full data, good for Undo only `Shallow Partial data, marshallable, good for slave processes git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@16682 85f007b7-540e-0410-9357-904b9bb8a0f7 --- proofs/proof_global.ml | 9 ++++++++- proofs/proof_global.mli | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) (limited to 'proofs') diff --git a/proofs/proof_global.ml b/proofs/proof_global.ml index 0c0aac715a..470d19b718 100644 --- a/proofs/proof_global.ml +++ b/proofs/proof_global.ml @@ -391,6 +391,13 @@ module V82 = struct end type state = pstate list -let freeze () = !pstates +let drop_hook_mode p = { p with hook = None; mode = None } + +let freeze ~marshallable = + match marshallable with + | `Yes -> + Errors.anomaly (Pp.str"full marshalling of proof state not supported") + | `Shallow -> List.map drop_hook_mode !pstates + | `No -> !pstates let unfreeze s = pstates := s; update_proof_mode () diff --git a/proofs/proof_global.mli b/proofs/proof_global.mli index a5fe33992f..61bb5c0dd8 100644 --- a/proofs/proof_global.mli +++ b/proofs/proof_global.mli @@ -140,5 +140,5 @@ module V82 : sig end type state -val freeze : unit -> state +val freeze : marshallable:[`Yes | `No | `Shallow] -> state val unfreeze : state -> unit -- cgit v1.2.3