caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* Predicativity?
@ 2008-09-15  7:26 Wei Hu
  0 siblings, 0 replies; only message in thread
From: Wei Hu @ 2008-09-15  7:26 UTC (permalink / raw)
  To: caml-list

Hello,

Isn't OCaml's polymorphism predicative? Then, why does the following code in 
the interactive toplevel type check?

# let id x = x;;
val id : 'a -> 'a = <fun>
# let f x = (id id) x;;
val f : 'a -> 'a = <fun>

I thought id could not be applied to itself under predicative polymorphism. Is 
my understanding wrong? Can you show an example that doesn't type check in 
OCaml, but would type check under impredicate polymorphism?

Thanks!


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-09-15 15:20 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-09-15  7:26 Predicativity? Wei Hu

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).