123456789101112131415161718192021222324252627282930313233(************************************************************************)(* * The Coq Proof Assistant / The Coq Development Team *)(* v * Copyright INRIA, CNRS and contributors *)(* <O___,, * (see version control and CREDITS file for authors & dates) *)(* \VV/ **************************************************************)(* // * This file is distributed under the terms of the *)(* * GNU Lesser General Public License Version 2.1 *)(* * (see LICENSE file for the text of the license) *)(************************************************************************)(** Monomorphic universes need to survive sections. *)letname_instanceinst=letmaplvl=matchUniv.Level.namelvlwith|None->(* Having Prop/Set/Var as section universes makes no sense *)assertfalse|Somena->tryletqid=Nametab.shortest_qualid_of_universeNames.Id.Map.emptynainNames.Name(Libnames.qualid_basenameqid)withNot_found->(* Best-effort naming from the string representation of the level.
See univNames.ml for a similar hack. *)Names.Name(Names.Id.of_string_soft(Univ.Level.to_stringlvl))inArray.mapmap(Univ.Instance.to_arrayinst)letdeclare_universe_context~polyctx=ifpolythenletuctx=Univ.ContextSet.to_contextname_instancectxinGlobal.push_section_contextuctxelseGlobal.push_context_set~strict:truectx