From 9fa14555270fa8f2368a7f4df1510bd2937d25ec Mon Sep 17 00:00:00 2001 From: gareuselesinge Date: Mon, 6 May 2013 13:40:58 +0000 Subject: States: frozen states can hold closures States.freeze takes ~marshallable:bool, so that (only) when we want to marshal data to disk/network we can ask the freeze functions of the summary to force lazy values. The flag is propagated to Lib and Summary. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@16478 85f007b7-540e-0410-9357-904b9bb8a0f7 --- library/lib.ml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'library/lib.ml') diff --git a/library/lib.ml b/library/lib.ml index e33bf5b15..0ba9fd919 100644 --- a/library/lib.ml +++ b/library/lib.ml @@ -249,7 +249,8 @@ let add_anonymous_leaf obj = add_entry oname (Leaf obj) let add_frozen_state () = - add_anonymous_entry (FrozenState (Summary.freeze_summaries())) + add_anonymous_entry + (FrozenState (Summary.freeze_summaries ~marshallable:false)) (* Modules. *) @@ -487,7 +488,7 @@ let open_section id = let name = make_path id, make_kn id (* this makes little sense however *) in if Nametab.exists_section dir then errorlabstrm "open_section" (pr_id id ++ str " already exists."); - let fs = Summary.freeze_summaries() in + let fs = Summary.freeze_summaries ~marshallable:false in add_entry name (OpenedSection (prefix, fs)); (*Pushed for the lifetime of the section: removed by unfrozing the summary*) Nametab.push_dir (Nametab.Until 1) dir (DirOpenSection prefix); @@ -608,7 +609,7 @@ let label_before_name (loc,id) = type frozen = Names.DirPath.t option * library_segment -let freeze () = (!comp_name, !lib_stk) +let freeze ~marshallable:_ = (!comp_name, !lib_stk) let unfreeze (mn,stk) = comp_name := mn; -- cgit v1.2.3