aboutsummaryrefslogtreecommitdiff
path: root/library/global.ml
diff options
context:
space:
mode:
authorMaxime Dénès2018-11-29 15:37:26 +0100
committerMaxime Dénès2018-12-13 10:08:02 +0100
commite20a12d92c7cc7c40ee0ac0b6569b0ee5e0e0b0f (patch)
tree1c9d80fb70c9df0a28e7fc8989e931cffb787b08 /library/global.ml
parentd9a6d4814f0669b586ca5c13d6d6540cd194b45f (diff)
Move shallow state logic to the function preparing state for workers
Diffstat (limited to 'library/global.ml')
-rw-r--r--library/global.ml7
1 files changed, 3 insertions, 4 deletions
diff --git a/library/global.ml b/library/global.ml
index 67b00cf411..84d2a37170 100644
--- a/library/global.ml
+++ b/library/global.ml
@@ -36,10 +36,9 @@ let is_joined_environment () =
let global_env_summary_tag =
Summary.declare_summary_tag global_env_summary_name
- { Summary.freeze_function = (function
- | `Yes -> join_safe_environment (); !global_env
- | `No -> !global_env
- | `Shallow -> !global_env);
+ { Summary.freeze_function = (fun ~marshallable -> if marshallable then
+ (join_safe_environment (); !global_env)
+ else !global_env);
unfreeze_function = (fun fr -> global_env := fr);
init_function = (fun () -> global_env := Safe_typing.empty_environment) }