diff options
| author | Pierre-Marie Pédrot | 2019-05-17 15:58:05 +0200 |
|---|---|---|
| committer | Pierre-Marie Pédrot | 2019-09-25 22:14:34 +0200 |
| commit | 24eccfc6dfec012da081a0891c397f013cc590e5 (patch) | |
| tree | 2149f64a0aac6694977bfbb35b0f79c61c00dd7e /library/global.ml | |
| parent | 4838fd47542018ba61cd096c93edf45b7ef68529 (diff) | |
Stub code for handling sections in kernel.
For now we only keep a count of the number of open sections, discriminating
between polymorphic and monomorphic ones.
Diffstat (limited to 'library/global.ml')
| -rw-r--r-- | library/global.ml | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/library/global.ml b/library/global.ml index 6bb4614aa4..e51c147f6e 100644 --- a/library/global.ml +++ b/library/global.ml @@ -104,6 +104,13 @@ let add_modtype id me inl = globalize (Safe_typing.add_modtype (i2l id) me inl) let add_module id me inl = globalize (Safe_typing.add_module (i2l id) me inl) let add_include me ismod inl = globalize (Safe_typing.add_include me ismod inl) +let open_section ~poly = globalize0 (Safe_typing.open_section ~poly) +let close_section fs = + (* TODO: use globalize0_with_summary *) + Summary.unfreeze_summaries fs; + let env = Safe_typing.close_section (safe_env ()) in + GlobalSafeEnv.set_safe_env env + let start_module id = globalize (Safe_typing.start_module (i2l id)) let start_modtype id = globalize (Safe_typing.start_modtype (i2l id)) |
