caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] simple typing question
@ 2002-07-02  4:14 Michael Vanier
  2002-07-02  9:14 ` Pierre Weis
  0 siblings, 1 reply; 14+ messages in thread
From: Michael Vanier @ 2002-07-02  4:14 UTC (permalink / raw)
  To: caml-list


I imagine this has been asked and answered before, so I apologize in
advance.

Compare these two functions:

# let f x = List.map (fun y -> y) x ;;
val f : 'a list -> 'a list = <fun>

and

# let f = List.map (fun y -> y) ;;
val f : '_a list -> '_a list = <fun>

Why does the second use the '_a type variable instead of 'a?  I thought
that special type variables only had to do with polymorphic references.
The FAQ states that the latter expression can't be generalized, but I don't
really understand why.

Mike
-------------------
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


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

end of thread, other threads:[~2002-07-04 14:55 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-07-02  4:14 [Caml-list] simple typing question Michael Vanier
2002-07-02  9:14 ` Pierre Weis
2002-07-02  9:49   ` Michael Vanier
2002-07-02 11:29     ` Daniel de Rauglaudre
2002-07-02 11:42     ` Xavier Leroy
2002-07-02 18:57       ` Pixel
2002-07-02 20:59         ` Pierre Weis
2002-07-03  0:39           ` Pixel
2002-07-03  1:49             ` Jacques Garrigue
2002-07-03 23:24               ` Pixel
2002-07-03  7:51             ` Francois Pottier
2002-07-03 11:25               ` Pixel
2002-07-03 18:10       ` Lauri Alanko
2002-07-02 14:56     ` Pierre Weis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).