aboutsummaryrefslogtreecommitdiffhomepage
path: root/library/global.ml
diff options
context:
space:
mode:
authorGravatar Pierre-Marie Pédrot <pierre-marie.pedrot@inria.fr>2017-07-12 15:55:51 +0200
committerGravatar Pierre-Marie Pédrot <pierre-marie.pedrot@inria.fr>2017-07-13 15:14:45 +0200
commit469a9b3242891b089b4a211e96b5b568277f7fc0 (patch)
treebd6854ea387f33192bf3d44c6d729e5d23471f49 /library/global.ml
parent34bcd562cc9c8e5e6b0f3b79a15b9c55dd98813e (diff)
Remove the function Global.type_of_global_unsafe.
Diffstat (limited to 'library/global.ml')
-rw-r--r--library/global.ml18
1 files changed, 0 insertions, 18 deletions
diff --git a/library/global.ml b/library/global.ml
index 5fff26566..5b17855dc 100644
--- a/library/global.ml
+++ b/library/global.ml
@@ -173,24 +173,6 @@ open Globnames
(** Build a fresh instance for a given context, its associated substitution and
the instantiated constraints. *)
-let type_of_global_unsafe r =
- let env = env() in
- match r with
- | VarRef id -> Environ.named_type id env
- | ConstRef c ->
- let cb = Environ.lookup_constant c env in
- let inst = Univ.AUContext.instance (Declareops.constant_polymorphic_context cb) in
- let ty = Typeops.type_of_constant_type env cb.Declarations.const_type in
- Vars.subst_instance_constr inst ty
- | IndRef ind ->
- let (mib, oib as specif) = Inductive.lookup_mind_specif env ind in
- let inst = Univ.AUContext.instance (Declareops.inductive_polymorphic_context mib) in
- Inductive.type_of_inductive env (specif, inst)
- | ConstructRef cstr ->
- let (mib,oib as specif) = Inductive.lookup_mind_specif env (inductive_of_constructor cstr) in
- let inst = Univ.AUContext.instance (Declareops.inductive_polymorphic_context mib) in
- Inductive.type_of_constructor (cstr,inst) specif
-
let constr_of_global_in_context env r =
let open Constr in
match r with