Browse thread
specifying the type of an argument with more than one #classpath
-
Peng Zang
- Edgar Friendly
-
Eric Cooper
- Peng Zang
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: | 2008-03-06 (12:02) |
From: | Peng Zang <peng.zang@g...> |
Subject: | Re: [Caml-list] specifying the type of an argument with more than one #classpath |
-----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-----