diff options
| author | herbelin | 2008-07-25 19:59:53 +0000 |
|---|---|---|
| committer | herbelin | 2008-07-25 19:59:53 +0000 |
| commit | 98f9fb6ea86529fc623c031933e88ae9a8354a02 (patch) | |
| tree | 15af56cae1f17a581d1ef16349c2997fc54ea4c7 /kernel/indtypes.ml | |
| parent | d1622072214a433d875cbb25abe1b3e7d929e578 (diff) | |
Correction d'une incohérence de typage des inductifs polymorphes: les
contraintes bornant par le haut le type de l'inductif (ce qui peut
arriver quand l'inductif est argument d'une constante) étaient
oubliées : on pouvait se retrouver avec des inductifs dont le type des
constructeurs, une fois instancié par des paramètres) n'était plus
typable (seul leur réduit, après expansion des constantes, était
typable). [kernel, test-suite]
+ Affichage des inductifs (via Print) en prenant la forme utilisateur des
constructeurs.
+ Correction warning dans compilation gallina.ml.
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@11266 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'kernel/indtypes.ml')
| -rw-r--r-- | kernel/indtypes.ml | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/kernel/indtypes.ml b/kernel/indtypes.ml index cd9e2e81f4..5786e67d53 100644 --- a/kernel/indtypes.ml +++ b/kernel/indtypes.ml @@ -254,10 +254,13 @@ let typecheck_inductive env mie = array_fold_map2' (fun ((id,full_arity,ar_level),cn,info,lc,_) lev cst -> let sign, s = dest_arity env full_arity in let status,cst = match s with - | Type _ when ar_level <> None (* Explicitly polymorphic *) -> + | Type u when ar_level <> None (* Explicitly polymorphic *) + && no_upper_constraints u cst -> (* The polymorphic level is a function of the level of the *) (* conclusions of the parameters *) - Inr (param_ccls, lev), cst + (* We enforce [u >= lev] in case [lev] has a strict upper *) + (* constraints over [u] *) + Inr (param_ccls, lev), enforce_geq u lev cst | Type u (* Not an explicit occurrence of Type *) -> Inl (info,full_arity,s), enforce_geq u lev cst | Prop Pos when engagement env <> Some ImpredicativeSet -> |
