From: Wei Hu <weihu@cs.virginia.edu>
To: caml-list@inria.fr
Subject: Predicativity?
Date: Mon, 15 Sep 2008 07:26:14 +0000 (UTC) [thread overview]
Message-ID: <loom.20080915T071146-518@post.gmane.org> (raw)
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!
reply other threads:[~2008-09-15 15:20 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=loom.20080915T071146-518@post.gmane.org \
--to=weihu@cs.virginia.edu \
--cc=caml-list@inria.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox