aboutsummaryrefslogtreecommitdiff
path: root/kernel/typeops.ml
diff options
context:
space:
mode:
authorMaxime Dénès2019-04-12 15:23:57 +0200
committerMaxime Dénès2019-04-12 15:25:09 +0200
commit478db417e1a3a493870f012495bbc7348581ac17 (patch)
treee7355bd68247bc16f02d0c077ab914bc041c257d /kernel/typeops.ml
parent38b86f40b3e2c6ce0ea77c94cf0c48efbf7c9f13 (diff)
Remove `constr_of_global_in_context`
This function seems unused.
Diffstat (limited to 'kernel/typeops.ml')
-rw-r--r--kernel/typeops.ml22
1 files changed, 0 insertions, 22 deletions
diff --git a/kernel/typeops.ml b/kernel/typeops.ml
index 12ffbf4357..af710e7822 100644
--- a/kernel/typeops.ml
+++ b/kernel/typeops.ml
@@ -462,28 +462,6 @@ let type_of_global_in_context env r =
let inst = Univ.make_abstract_instance univs in
Inductive.type_of_constructor (cstr,inst) specif, univs
-(* 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 GlobRef in
- match r with
- | VarRef id -> mkVar id, Univ.AUContext.empty
- | ConstRef c ->
- let cb = 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,_) = 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,_) =
- 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
-
(************************************************************************)
(************************************************************************)