aboutsummaryrefslogtreecommitdiffhomepage
path: root/printing/prettyp.ml
diff options
context:
space:
mode:
authorGravatar Pierre-Marie Pédrot <pierre-marie.pedrot@inria.fr>2017-07-11 15:42:43 +0200
committerGravatar Pierre-Marie Pédrot <pierre-marie.pedrot@inria.fr>2017-07-11 15:54:46 +0200
commit91df402729f70144a4e4d198c4384dc515920e59 (patch)
treec750afbc9119b7da597235bb62432ff42c871e25 /printing/prettyp.ml
parentc401fc96c3271746448600ca097876bd139b10e9 (diff)
Moving the last bits of abtraction-breaking code out of the kernel.
Diffstat (limited to 'printing/prettyp.ml')
-rw-r--r--printing/prettyp.ml11
1 files changed, 10 insertions, 1 deletions
diff --git a/printing/prettyp.ml b/printing/prettyp.ml
index d9bb97be1..ff12737f6 100644
--- a/printing/prettyp.ml
+++ b/printing/prettyp.ml
@@ -514,7 +514,16 @@ let print_instance sigma cb =
let print_constant with_values sep sp =
let cb = Global.lookup_constant sp in
let val_0 = Global.body_of_constant_body cb in
- let typ = Declareops.type_of_constant cb in
+ let typ = match cb.const_type with
+ | RegularArity t as x ->
+ begin match cb.const_universes with
+ | Monomorphic_const _ -> x
+ | Polymorphic_const univs ->
+ let inst = Univ.AUContext.instance univs in
+ RegularArity (Vars.subst_instance_constr inst t)
+ end
+ | TemplateArity _ as x -> x
+ in
let typ = ungeneralized_type_of_constant_type typ in
let univs =
let otab = Global.opaque_tables () in