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 --- library/summary.ml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'library/summary.ml') diff --git a/library/summary.ml b/library/summary.ml index 53e9f7002..b46ce85b1 100644 --- a/library/summary.ml +++ b/library/summary.ml @@ -10,8 +10,9 @@ open Pp open Errors open Util +type marshallable = [ `Yes | `No | `Shallow ] type 'a summary_declaration = { - freeze_function : bool -> 'a; + freeze_function : marshallable -> 'a; unfreeze_function : 'a -> unit; init_function : unit -> unit } @@ -48,7 +49,7 @@ let freeze_summaries ~marshallable = Hashtbl.iter (fun id decl -> (* to debug missing Lazy.force - if marshallable then begin + if marshallable <> `No then begin prerr_endline ("begin marshalling " ^ id); ignore(Marshal.to_string (decl.freeze_function marshallable) []); prerr_endline ("end marshalling " ^ id); -- cgit v1.2.3