Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
* Weak types ?
@ 1998-02-03 15:46 Pierre CASTERAN
  1998-02-04 19:07 ` Simon Helsen
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Pierre CASTERAN @ 1998-02-03 15:46 UTC (permalink / raw)
  To: caml-list

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1333 bytes --]



 Hello, all.

 I suppose the following problem concerns "weak" types, but i don't see
 the reason (I have no assignment at all in this definitions !)

let toto =
  let id x = x
  in id id;;
(*
 val toto : '_a -> '_a = <fun>
             ^      ^

             why not " 'a " ?  
             
*)

toto 5;;
(* ok *)

toto (fun z -> z);;

(*
This expression has type 'a -> 'a but is here used with type int
*)

If i  remember Xavier's works, the "weak" types were necessary for
dealing with references, continuations/exceptions, and i/o streams,....

What's the problem with these gentle purely functional top-level 
definitions  ?



Pre Scriptum :

 I (still )  work with Objective Caml version 1.03

-- 
Pierre Casteran,

LaBRI, Universite Bordeaux-I      |    12 place Puy Paulin
351 Cours de la Liberation        |    33000 Bordeaux
F-33405 TALENCE Cedex             |    France
France                            |    (+ 33) 5 56 81 15 80
tel : (+ 33) 5 56 84 69 31
fax : (+ 33) 5 56 84 66 69
email: Pierre . Casteran @ labri . u-bordeaux . fr  (but whithout white space)
www: http://dept-info.labri.u-bordeaux.fr/~casteran

"Combien de petites violences la verité et l'analyse  subissent-elles 
quotidiennement dans le silence de nos pensées engourdies ?"

[Serge Halimi, in "Les nouveaux chiens de garde" (Liber, ed.)]








^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~1998-02-10 18:51 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-02-03 15:46 Weak types ? Pierre CASTERAN
1998-02-04 19:07 ` Simon Helsen
1998-02-05 16:05 ` Juan J. Quintela
1998-02-09 16:00 ` Pierre Weis
1998-02-09 16:31   ` Simon Helsen
1998-02-10 18:51     ` Pierre Weis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox