From 09d0ba708a96125632344f2f994b45e9075fc303 Mon Sep 17 00:00:00 2001 From: Hugo Herbelin Date: Tue, 9 Oct 2018 20:46:15 +0200 Subject: Moving Global.constr_of_global_in_context to Typeops. It is purely functional, so no need for it to be in global now that GlobRef.t are in the kernel. --- library/global.ml | 23 +---------------------- 1 file changed, 1 insertion(+), 22 deletions(-) (limited to 'library') diff --git a/library/global.ml b/library/global.ml index 1672d508c2..3781ff3230 100644 --- a/library/global.ml +++ b/library/global.ml @@ -167,28 +167,7 @@ let env_of_context hyps = open Globnames -(** Build a fresh instance for a given context, its associated substitution and - the instantiated constraints. *) - -let constr_of_global_in_context env r = - let open Constr in - match r with - | VarRef id -> mkVar id, Univ.AUContext.empty - | ConstRef c -> - let cb = Environ.lookup_constant c env in - let univs = Declareops.constant_polymorphic_context cb in - mkConstU (c, Univ.make_abstract_instance univs), univs - | IndRef ind -> - let (mib, oib as specif) = Inductive.lookup_mind_specif env ind in - let univs = Declareops.inductive_polymorphic_context mib in - mkIndU (ind, Univ.make_abstract_instance univs), univs - | ConstructRef cstr -> - let (mib,oib as specif) = - Inductive.lookup_mind_specif env (inductive_of_constructor cstr) - in - let univs = Declareops.inductive_polymorphic_context mib in - mkConstructU (cstr, Univ.make_abstract_instance univs), univs - +let constr_of_global_in_context = Typeops.constr_of_global_in_context let type_of_global_in_context = Typeops.type_of_global_in_context let universes_of_global gr = -- cgit v1.2.3