From: Dirk Thierbach <dthierbach@gmx.de>
To: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] wrapping parameterized types
Date: Fri, 4 May 2007 10:13:06 +0200 [thread overview]
Message-ID: <20070504081306.GA1708@feanor> (raw)
In-Reply-To: <1178241003.7436.10.camel@rosella.wigram>
On Fri, May 04, 2007 at 11:10:03AM +1000, skaller wrote:
> On Thu, 2007-05-03 at 19:16 -0400, Chris King wrote:
> > On 5/3/07, Christopher L Conway <cconway@cs.nyu.edu> wrote:
> > The solution is to use existential types. In a record, you can tell
> > O'Caml that a particular function _must_ be polymorphic:
> >
> > type 'b mylistfun = { listfun: 'a. 'a list -> 'b }
> I'm still confused why this is called an existential, when
> clearly the quantification is universal.
It's because the universal quantifier is in a "negative" position,
which is equivalent to an existential quantifier on the outside.
Just pretend they are logic formulae instead of types, and then
(\forall a. a) -> b is equivalent to \exists a. (a -> b)
using DeMorgan's rule.
- Dirk
next prev parent reply other threads:[~2007-05-04 8:32 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-03 22:31 Christopher L Conway
2007-05-03 23:16 ` [Caml-list] " Chris King
2007-05-04 1:10 ` skaller
2007-05-04 8:13 ` Dirk Thierbach [this message]
2007-05-04 11:47 ` rossberg
2007-05-04 12:13 ` Andrej Bauer
2007-05-04 13:34 ` Dirk Thierbach
2007-05-04 15:58 ` Christopher L Conway
2007-05-04 1:58 ` Christopher L Conway
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=20070504081306.GA1708@feanor \
--to=dthierbach@gmx.de \
--cc=caml-list@yquem.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;
as well as URLs for NNTP newsgroup(s).