From dfe97724fb6034fc06b3ef693f6a3ed94733adbc Mon Sep 17 00:00:00 2001 From: herbelin Date: Sun, 29 Oct 2006 20:11:08 +0000 Subject: Compatibilité du polymorphisme de constantes avec les sections. Amélioration affichage des univers. Réparation de petits oublis du premier commit. Essai d'une nouvelle stratégie : si le type d'une constante est mentionné explicitement, la constante est monomorphe dans Type. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@9314 85f007b7-540e-0410-9357-904b9bb8a0f7 --- parsing/prettyp.ml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'parsing') diff --git a/parsing/prettyp.ml b/parsing/prettyp.ml index 7495349842..64953592bc 100644 --- a/parsing/prettyp.ml +++ b/parsing/prettyp.ml @@ -330,10 +330,14 @@ let print_body = function let print_typed_body (val_0,typ) = (print_body val_0 ++ fnl () ++ str " : " ++ pr_ltype typ ++ fnl ()) +let ungeneralized_type_of_constant_type = function + | PolymorphicArity (ctx,a) -> mkArity (ctx, Type a.poly_level) + | NonPolymorphicType t -> t + let print_constant with_values sep sp = let cb = Global.lookup_constant sp in let val_0 = cb.const_body in - let typ = Typeops.type_of_constant_type (Global.env()) cb.const_type in + let typ = ungeneralized_type_of_constant_type cb.const_type in hov 0 ( match val_0 with | None -> -- cgit v1.2.3