summaryrefslogtreecommitdiff
path: root/kernel/cooking.ml
diff options
context:
space:
mode:
authorGravatar Samuel Mimram <smimram@debian.org>2006-11-21 21:38:49 +0000
committerGravatar Samuel Mimram <smimram@debian.org>2006-11-21 21:38:49 +0000
commit70b9be8acc1d1ada178a95c1cd4013506e9d0d1b (patch)
treef672a286d962cc67c95874b3b60402fc957870b6 /kernel/cooking.ml
parenta5bd4e097a94cc4f863bf4d4bcc5ce592c30ba47 (diff)
parent208a0f7bfa5249f9795e6e225f309cbe715c0fad (diff)
Merge commit 'upstream/8.1.gamma' into 8.1
Diffstat (limited to 'kernel/cooking.ml')
-rw-r--r--kernel/cooking.ml12
1 files changed, 9 insertions, 3 deletions
diff --git a/kernel/cooking.ml b/kernel/cooking.ml
index 58c21d9f..6b2a6245 100644
--- a/kernel/cooking.ml
+++ b/kernel/cooking.ml
@@ -6,7 +6,7 @@
(* * GNU Lesser General Public License Version 2.1 *)
(************************************************************************)
-(*i $Id: cooking.ml 8752 2006-04-27 19:37:33Z herbelin $ i*)
+(*i $Id: cooking.ml 9320 2006-10-30 16:53:43Z barras $ i*)
open Pp
open Util
@@ -122,7 +122,13 @@ let cook_constant env r =
on_body (fun c ->
abstract_constant_body (expmod_constr r.d_modlist c) hyps)
cb.const_body in
- let typ =
- abstract_constant_type (expmod_constr r.d_modlist cb.const_type) hyps in
+ let typ = match cb.const_type with
+ | NonPolymorphicType t ->
+ let typ = abstract_constant_type (expmod_constr r.d_modlist t) hyps in
+ NonPolymorphicType typ
+ | PolymorphicArity (ctx,s) ->
+ let t = mkArity (ctx,Type s.poly_level) in
+ let typ = abstract_constant_type (expmod_constr r.d_modlist t) hyps in
+ Typeops.make_polymorphic_if_arity env typ in
let boxed = Cemitcodes.is_boxed cb.const_body_code in
(body, typ, cb.const_constraints, cb.const_opaque, boxed)