diff options
| author | Pierre-Marie Pédrot | 2020-04-23 14:53:23 +0200 |
|---|---|---|
| committer | Pierre-Marie Pédrot | 2020-04-23 14:53:23 +0200 |
| commit | 48f73e492465f3c46438583c069bc0ba745ef56f (patch) | |
| tree | e499cc660630fcadd08aff5a127a8c34455d664d /kernel/environ.ml | |
| parent | 7863c12930687e1e2dc982d9b406fb4d6e7a02c1 (diff) | |
| parent | 3231196c77c0641d7c59191bf691378b334afc46 (diff) | |
Merge PR #12034: Make cumulative sprop a typing flag, deprecate command line -sprop-cumulative
Reviewed-by: Zimmi48
Reviewed-by: ppedrot
Diffstat (limited to 'kernel/environ.ml')
| -rw-r--r-- | kernel/environ.ml | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/kernel/environ.ml b/kernel/environ.ml index de8692ff21..cf01711fe7 100644 --- a/kernel/environ.ml +++ b/kernel/environ.ml @@ -431,7 +431,7 @@ let push_subgraph (levels,csts) env = in map_universes add_subgraph env -let set_engagement c env = (* Unsafe *) +let set_engagement c env = { env with env_stratification = { env.env_stratification with env_engagement = c } } @@ -445,6 +445,7 @@ let same_flags { share_reduction; enable_VM; enable_native_compiler; + cumulative_sprop; } alt = check_guarded == alt.check_guarded && check_positive == alt.check_positive && @@ -453,14 +454,18 @@ let same_flags { indices_matter == alt.indices_matter && share_reduction == alt.share_reduction && enable_VM == alt.enable_VM && - enable_native_compiler == alt.enable_native_compiler + enable_native_compiler == alt.enable_native_compiler && + cumulative_sprop == alt.cumulative_sprop [@warning "+9"] -let set_typing_flags c env = (* Unsafe *) +let set_cumulative_sprop b = map_universes (UGraph.set_cumulative_sprop b) + +let set_typing_flags c env = if same_flags env.env_typing_flags c then env - else { env with env_typing_flags = c } + else set_cumulative_sprop c.cumulative_sprop { env with env_typing_flags = c } -let make_sprop_cumulative = map_universes UGraph.make_sprop_cumulative +let set_cumulative_sprop b env = + set_typing_flags {env.env_typing_flags with cumulative_sprop=b} env let set_allow_sprop b env = { env with env_stratification = |
