diff options
| author | herbelin | 2006-10-28 19:35:09 +0000 |
|---|---|---|
| committer | herbelin | 2006-10-28 19:35:09 +0000 |
| commit | 359e4ffe307d7d8dd250735373fc6354a58ecff5 (patch) | |
| tree | 7204cb80cb272118a7ee60e9790d91d0efd11894 /kernel/cooking.ml | |
| parent | 8bcd34ae13010797a974b0f3c16df6e23f2cb254 (diff) | |
Extension du polymorphisme de sorte au cas des définitions dans Type.
(suppression au passage d'un cast dans constant_entry_of_com - ce
n'est pas normal qu'on force le type s'il n'est pas déjà présent mais
en même temps il semble que ce cast serve pour rafraîchir les univers
algébriques...)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@9310 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'kernel/cooking.ml')
| -rw-r--r-- | kernel/cooking.ml | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/kernel/cooking.ml b/kernel/cooking.ml index dffbb76c09..68d301eb46 100644 --- a/kernel/cooking.ml +++ b/kernel/cooking.ml @@ -122,7 +122,14 @@ 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 + let ctx,_ = dest_prod env typ in + PolymorphicArity (ctx,s) in let boxed = Cemitcodes.is_boxed cb.const_body_code in (body, typ, cb.const_constraints, cb.const_opaque, boxed) |
