diff options
author | Jasper Hugunin <jasperh@cs.washington.edu> | 2018-06-04 17:26:07 -0700 |
---|---|---|
committer | Jasper Hugunin <jasperh@cs.washington.edu> | 2018-07-01 15:42:26 -0700 |
commit | 29ed1edfa71fec0b72f7286d6396a07cf895e49f (patch) | |
tree | 1409ea8da79e4ce65c4c8ef2744967e157ca7e82 /vernac | |
parent | 313e6bed17b400d638401a5c6e5d442eadb73d3a (diff) |
Add flag Uniform Inductive Parameters
Diffstat (limited to 'vernac')
-rw-r--r-- | vernac/vernacentries.ml | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/vernac/vernacentries.ml b/vernac/vernacentries.ml index e76921d1d..5fda1a0da 100644 --- a/vernac/vernacentries.ml +++ b/vernac/vernacentries.ml @@ -537,7 +537,12 @@ let should_treat_as_cumulative cum poly = else user_err Pp.(str "The NonCumulative prefix can only be used in a polymorphic context.") | None -> poly && Flags.is_polymorphic_inductive_cumulativity () -let should_treat_as_uniform () = ComInductive.NonUniformParameters (* TODO: Add a flag *) +let uniform_inductive_parameters = ref false + +let should_treat_as_uniform () = + if !uniform_inductive_parameters + then ComInductive.UniformParameters + else ComInductive.NonUniformParameters let vernac_record cum k poly finite records = let is_cumulative = should_treat_as_cumulative cum poly in @@ -1474,6 +1479,14 @@ let _ = optwrite = Flags.make_polymorphic_inductive_cumulativity } let _ = + declare_bool_option + { optdepr = false; + optname = "Uniform inductive parameters"; + optkey = ["Uniform"; "Inductive"; "Parameters"]; + optread = (fun () -> !uniform_inductive_parameters); + optwrite = (fun b -> uniform_inductive_parameters := b) } + +let _ = declare_int_option { optdepr = false; optname = "the level of inlining during functor application"; |