English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    
Browse thread
RE: [Caml-list] Turning off type-checking
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Christophe Raffalli <raffalli@u...>
Subject: Re: [Caml-list] Turning off type-checking
Le mar 14/05/2002 à 10:20, Alain Frisch a écrit :
 
> Mmm, I thought (misleaded by a teacher, of course) that the following
> would exhibit exponential behavior of type-inference:
> 
> let f y z = (z y) y
> let f y = f (f y)
> let f y = f (f y)
> let f y = f (f y)
> let f y = f (f y)
> let f y = f (f y)
> (* ad libitum *)
> 
> It seems that what takes time is occurence checking (disabled
> with -rectypes) and pretty-printing of types (because internally, there

For pretty printing, why not printing types with sharing like

val f : type 'b = 'a -> 'a in 'b -> 'b.

For large type it can be easier to read (especially if you could choose
the name of type variables):

# let f x:'c = x;;
val f : 'a -> 'a = <fun>

Is very ennoying and should really be

# let f x:'arg = x;;
val f : 'arg -> 'arg = <fun>

-- 
Christophe Raffalli
Université de Savoie
Batiment Le Chablais, bureau 21
73376 Le Bourget-du-Lac Cedex

tél: (33) 4 79 75 81 03
fax: (33) 4 79 75 87 42
mail: Christophe.Raffalli@univ-savoie.fr
www: http://www.lama.univ-savoie.fr/~RAFFALLI
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners