aboutsummaryrefslogtreecommitdiffhomepage
path: root/library/lib.ml
diff options
context:
space:
mode:
authorGravatar gareuselesinge <gareuselesinge@85f007b7-540e-0410-9357-904b9bb8a0f7>2013-05-06 13:40:58 +0000
committerGravatar gareuselesinge <gareuselesinge@85f007b7-540e-0410-9357-904b9bb8a0f7>2013-05-06 13:40:58 +0000
commit9fa14555270fa8f2368a7f4df1510bd2937d25ec (patch)
tree5ca417f25ef2f0c2425820494f0a097b12f82b50 /library/lib.ml
parent683afb998ceb8302f3d9ec1d69cfe1ee86816c13 (diff)
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
Diffstat (limited to 'library/lib.ml')
-rw-r--r--library/lib.ml7
1 files changed, 4 insertions, 3 deletions
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;