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 /pretyping | |
| 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 'pretyping')
| -rw-r--r-- | pretyping/inductiveops.ml | 5 | ||||
| -rw-r--r-- | pretyping/inductiveops.mli | 1 |
2 files changed, 6 insertions, 0 deletions
diff --git a/pretyping/inductiveops.ml b/pretyping/inductiveops.ml index 79d9e381ee..d4290c7641 100644 --- a/pretyping/inductiveops.ml +++ b/pretyping/inductiveops.ml @@ -31,6 +31,11 @@ let type_of_constructor env cstr = Inductive.lookup_mind_specif env (inductive_of_constructor cstr) in Inductive.type_of_constructor cstr specif +(* Return constructor types in user form *) +let type_of_constructors env ind = + let specif = Inductive.lookup_mind_specif env ind in + Inductive.type_of_constructors ind specif + (* Return constructor types in normal form *) let arities_of_constructors env ind = let specif = Inductive.lookup_mind_specif env ind in diff --git a/pretyping/inductiveops.mli b/pretyping/inductiveops.mli index 3cc24a184f..46692b33b3 100644 --- a/pretyping/inductiveops.mli +++ b/pretyping/inductiveops.mli @@ -22,6 +22,7 @@ val type_of_inductive : env -> inductive -> types (* Return type as quoted by the user *) val type_of_constructor : env -> constructor -> types +val type_of_constructors : env -> inductive -> types array (* Return constructor types in normal form *) val arities_of_constructors : env -> inductive -> types array |
