caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Peng Zang <peng.zang@gmail.com>
To: caml-list@yquem.inria.fr
Cc: Eric Cooper <ecc@cmu.edu>
Subject: Re: [Caml-list] specifying the type of an argument with more than one #classpath
Date: Thu, 6 Mar 2008 07:02:17 -0500	[thread overview]
Message-ID: <200803060702.20569.peng.zang@gmail.com> (raw)
In-Reply-To: <20080306021630.GB14754@stratocaster.home>

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Ahhh, perfect.  Caml-list at the rescue again.  Thanks Eric,

Peng

On Wednesday 05 March 2008 09:16:30 pm Eric Cooper wrote:
> On Wed, Mar 05, 2008 at 08:52:06PM -0500, Peng Zang wrote:
> > # let takesomefooable_and_barable (x:#foo #bar) = x;;
> > The type constructor bar expects 0 argument(s),
> > but is here applied to 1 argument(s)
> >
> >
> > Which shows I'm clearly not syntactically expressing this correctly.  I
> > checked the manual and it doesn't seem possible...  How do I do this or
> > workaround it?
>
> You were very close:
>
> # let f ((x : #foo) : #bar) = x;;
> val f : (< bar : string; foo : string; .. > as 'a) -> 'a = <fun>


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.7 (GNU/Linux)

iD8DBQFHz91MfIRcEFL/JewRAjTdAKDAf1uJXdXf5+mdPIu5DGZ2TFUO1wCdH+qt
uksXC/TtmRAc8wqympEjCig=
=MfTR
-----END PGP SIGNATURE-----


      reply	other threads:[~2008-03-06 12:02 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-06  1:52 Peng Zang
2008-03-06  1:56 ` [Caml-list] " Edgar Friendly
2008-03-06  2:04   ` Peng Zang
2008-03-06  2:16 ` Eric Cooper
2008-03-06 12:02   ` Peng Zang [this message]

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=200803060702.20569.peng.zang@gmail.com \
    --to=peng.zang@gmail.com \
    --cc=caml-list@yquem.inria.fr \
    --cc=ecc@cmu.edu \
    /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).