aboutsummaryrefslogtreecommitdiff
path: root/kernel/indTyping.ml
diff options
context:
space:
mode:
authorPierre-Marie Pédrot2019-12-18 16:56:08 +0100
committerPierre-Marie Pédrot2019-12-18 16:56:08 +0100
commit333b2f369c9a0ab61597cc9174a77632d263f386 (patch)
tree2e2db1d45b26c1a758346959a83cd6cd84c36e6a /kernel/indTyping.ml
parentdfdfa9eeedebb0aec2cd72be9c1eee27ca9b2fab (diff)
parent3c24d4f6398cc80fd070c4e6dcac99670c8c1bba (diff)
Merge PR #10616: Fix push_universe_context* interfaces to use a consistent ~strict flag
Ack-by: SkySkimmer Ack-by: ejgallego Reviewed-by: ppedrot
Diffstat (limited to 'kernel/indTyping.ml')
-rw-r--r--kernel/indTyping.ml10
1 files changed, 8 insertions, 2 deletions
diff --git a/kernel/indTyping.ml b/kernel/indTyping.ml
index 982bc49927..d9ccf81619 100644
--- a/kernel/indTyping.ml
+++ b/kernel/indTyping.ml
@@ -293,8 +293,14 @@ let typecheck_inductive env (mie:mutual_inductive_entry) =
let env_univs =
match mie.mind_entry_universes with
| Monomorphic_entry ctx ->
- let env = if has_template_poly then set_universes_lbound env Univ.Level.prop else env in
- push_context_set ctx env
+ if has_template_poly then
+ (* For that particular case, we typecheck the inductive in an environment
+ where the universes introduced by the definition are only [>= Prop] *)
+ let env = set_universes_lbound env Univ.Level.prop in
+ push_context_set ~strict:false ctx env
+ else
+ (* In the regular case, all universes are [> Set] *)
+ push_context_set ~strict:true ctx env
| Polymorphic_entry (_, ctx) -> push_context ctx env
in