aboutsummaryrefslogtreecommitdiff
path: root/library
diff options
context:
space:
mode:
Diffstat (limited to 'library')
-rw-r--r--library/global.ml4
-rw-r--r--library/impargs.ml10
2 files changed, 7 insertions, 7 deletions
diff --git a/library/global.ml b/library/global.ml
index 19b4165199..30281bcc70 100644
--- a/library/global.ml
+++ b/library/global.ml
@@ -141,10 +141,10 @@ open Libnames
let type_of_reference env = function
| VarRef id -> Environ.named_type id env
- | ConstRef c -> Environ.constant_type env c
+ | ConstRef c -> Typeops.type_of_constant env c
| IndRef ind ->
let specif = Inductive.lookup_mind_specif env ind in
- Inductive.type_of_inductive specif
+ Inductive.type_of_inductive env specif
| ConstructRef cstr ->
let specif =
Inductive.lookup_mind_specif env (inductive_of_constructor cstr) in
diff --git a/library/impargs.ml b/library/impargs.ml
index ffdeb0b88d..b5488031bf 100644
--- a/library/impargs.ml
+++ b/library/impargs.ml
@@ -259,10 +259,9 @@ let list_of_implicits = function
let constants_table = ref Cmap.empty
-let compute_constant_implicits kn =
+let compute_constant_implicits cst =
let env = Global.env () in
- let cb = lookup_constant kn env in
- auto_implicits env (body_of_type cb.const_type)
+ auto_implicits env (Typeops.type_of_constant env cst)
let constant_implicits sp =
try Cmap.find sp !constants_table with Not_found -> No_impl
@@ -282,12 +281,13 @@ let compute_mib_implicits kn =
let ar =
Array.to_list
(Array.map (* No need to lift, arities contain no de Bruijn *)
- (fun mip -> (Name mip.mind_typename, None, type_of_inductive (mib,mip)))
+ (fun mip ->
+ (Name mip.mind_typename, None, type_of_inductive env (mib,mip)))
mib.mind_packets) in
let env_ar = push_rel_context ar env in
let imps_one_inductive i mip =
let ind = (kn,i) in
- let ar = type_of_inductive (mib,mip) in
+ let ar = type_of_inductive env (mib,mip) in
((IndRef ind,auto_implicits env ar),
Array.mapi (fun j c -> (ConstructRef (ind,j+1),auto_implicits env_ar c))
mip.mind_nf_lc)