aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--kernel/cooking.ml8
-rw-r--r--library/declare.ml1
2 files changed, 7 insertions, 2 deletions
diff --git a/kernel/cooking.ml b/kernel/cooking.ml
index 4435b6ca1d..be71bd7b41 100644
--- a/kernel/cooking.ml
+++ b/kernel/cooking.ml
@@ -236,7 +236,13 @@ let cook_constant env { from = cb; info } =
proj_eta = etab, etat;
proj_type = ty'; proj_body = c' }
in
- let univs = UContext.union abs_ctx univs in
+ let univs =
+ let abs' =
+ if cb.const_polymorphic then abs_ctx
+ else instantiate_univ_context abs_ctx
+ in
+ UContext.union abs' univs
+ in
(body, typ, Option.map projection cb.const_proj,
cb.const_polymorphic, univs, cb.const_inline_code,
Some const_hyps)
diff --git a/library/declare.ml b/library/declare.ml
index 8f0ce9eb2c..7f42a747ed 100644
--- a/library/declare.ml
+++ b/library/declare.ml
@@ -146,7 +146,6 @@ let discharged_hyps kn sechyps =
let discharge_constant ((sp, kn), obj) =
let con = constant_of_kn kn in
-
let from = Global.lookup_constant con in
let modlist = replacement_context () in
let hyps,subst,uctx = section_segment_of_constant con in