diff options
| author | Emilio Jesus Gallego Arias | 2020-06-25 16:43:08 +0200 |
|---|---|---|
| committer | Emilio Jesus Gallego Arias | 2020-11-26 21:21:54 +0100 |
| commit | b78f6424d9fa5a8027c4acb21b3e57ee6294bc5f (patch) | |
| tree | 5f62ea350794ecaefd4a447763be8dc35ee92314 /library | |
| parent | b531ef305a0dad301629cf9a51a1a4f0ff925297 (diff) | |
[kernel] Allow to set typing flags in add_constant
This is just an experiment, but makes the uses of the API easier as we
don't mess with the global state anymore.
Diffstat (limited to 'library')
| -rw-r--r-- | library/global.ml | 2 | ||||
| -rw-r--r-- | library/global.mli | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/library/global.ml b/library/global.ml index 5c847fda96..238b9d554b 100644 --- a/library/global.ml +++ b/library/global.ml @@ -105,7 +105,7 @@ let is_cumulative_sprop () = (typing_flags()).Declarations.cumulative_sprop let set_allow_sprop b = globalize0 (Safe_typing.set_allow_sprop b) let sprop_allowed () = Environ.sprop_allowed (env()) let export_private_constants cd = globalize (Safe_typing.export_private_constants cd) -let add_constant id d = globalize (Safe_typing.add_constant (i2l id) d) +let add_constant ?typing_flags id d = globalize (Safe_typing.add_constant ?typing_flags (i2l id) d) let add_private_constant id d = globalize (Safe_typing.add_private_constant (i2l id) d) let add_mind id mie = globalize (Safe_typing.add_mind (i2l id) mie) let add_modtype id me inl = globalize (Safe_typing.add_modtype (i2l id) me inl) diff --git a/library/global.mli b/library/global.mli index 5faf0e8bbd..4c2d427925 100644 --- a/library/global.mli +++ b/library/global.mli @@ -52,6 +52,7 @@ val export_private_constants : Safe_typing.exported_private_constant list val add_constant : + ?typing_flags:Declarations.typing_flags -> Id.t -> Safe_typing.global_declaration -> Constant.t val add_private_constant : Id.t -> Safe_typing.side_effect_declaration -> Constant.t * Safe_typing.private_constants |
