aboutsummaryrefslogtreecommitdiff
path: root/vernac
diff options
context:
space:
mode:
authorGaëtan Gilbert2019-08-18 19:46:50 +0200
committerGaëtan Gilbert2019-10-05 12:10:24 +0200
commit9f6e238fac96a123e7cb2bb2b2caec104bc4b916 (patch)
tree08c10e60d141988ed5a393bd3b67934607f6326b /vernac
parentd5f2e13e51c3404d326f04513a50d264790a7a4c (diff)
Declare universes for variables outside of Declare.declare_variable
(letins still declare universes in declare_variable as they use entries) The section check_same_poly is moved to declare_universe_context (it makes more sense there, universe polymorphism doesn't apply to the variables/letins themselves)
Diffstat (limited to 'vernac')
-rw-r--r--vernac/comAssumption.ml3
-rw-r--r--vernac/lemmas.ml3
2 files changed, 4 insertions, 2 deletions
diff --git a/vernac/comAssumption.ml b/vernac/comAssumption.ml
index e3f90ab98c..f6debd8777 100644
--- a/vernac/comAssumption.ml
+++ b/vernac/comAssumption.ml
@@ -50,7 +50,8 @@ match scope with
| Polymorphic_entry (_, univs) -> Univ.ContextSet.of_context univs
in
let kind = Decls.IsAssumption kind in
- let decl = SectionLocalAssum {typ; univs; poly; impl} in
+ let () = Declare.declare_universe_context ~poly univs in
+ let decl = SectionLocalAssum {typ; impl} in
let () = declare_variable ~name ~kind decl in
let () = assumption_message name in
let r = GlobRef.VarRef name in
diff --git a/vernac/lemmas.ml b/vernac/lemmas.ml
index 42d1a1f3fc..b4875bbdd2 100644
--- a/vernac/lemmas.ml
+++ b/vernac/lemmas.ml
@@ -265,7 +265,8 @@ let save_remaining_recthms env sigma ~poly ~scope ~udecl uctx body opaq i { Rect
Univ.ContextSet.of_context univs
| Monomorphic_entry univs -> univs
in
- let c = Declare.SectionLocalAssum {typ=t_i; univs; poly; impl} in
+ let () = Declare.declare_universe_context ~poly univs in
+ let c = Declare.SectionLocalAssum {typ=t_i; impl} in
let () = Declare.declare_variable ~name ~kind c in
GlobRef.VarRef name, impargs
| Global local ->