From 4457e6d75affd20c1c13c0d798c490129525bcb5 Mon Sep 17 00:00:00 2001 From: Pierre-Marie Pédrot Date: Tue, 4 Jul 2017 13:38:22 +0200 Subject: More precise type for universe entries. We use an algebraic type instead of a pair of a boolean and the corresponding data. For now, this is isomorphic, but this allows later change in the structure. --- vernac/indschemes.ml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'vernac/indschemes.ml') diff --git a/vernac/indschemes.ml b/vernac/indschemes.ml index 3d97a767c..6ea8bc7f2 100644 --- a/vernac/indschemes.ml +++ b/vernac/indschemes.ml @@ -109,13 +109,17 @@ let _ = let define id internal ctx c t = let f = declare_constant ~internal in + let _, univs = Evd.universe_context ctx in + let univs = + if Flags.is_universe_polymorphism () then Polymorphic_const_entry univs + else Monomorphic_const_entry univs + in let kn = f id (DefinitionEntry { const_entry_body = c; const_entry_secctx = None; const_entry_type = t; - const_entry_polymorphic = Flags.is_universe_polymorphism (); - const_entry_universes = snd (Evd.universe_context ctx); + const_entry_universes = univs; const_entry_opaque = false; const_entry_inline_code = false; const_entry_feedback = None; -- cgit v1.2.3