From 9f6e238fac96a123e7cb2bb2b2caec104bc4b916 Mon Sep 17 00:00:00 2001 From: Gaƫtan Gilbert Date: Sun, 18 Aug 2019 19:46:50 +0200 Subject: 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) --- vernac/comAssumption.ml | 3 ++- vernac/lemmas.ml | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'vernac') 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 -> -- cgit v1.2.3