From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: * X-Spam-Status: No, score=1.0 required=5.0 tests=AWL,SPF_NEUTRAL autolearn=disabled version=3.1.3 Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by yquem.inria.fr (Postfix) with ESMTP id D7463BBC1 for ; Thu, 6 Mar 2008 13:02:25 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgAAAAZsz0fY7zq/kmdsb2JhbACQeQEBAQEHBAQJChaTWoZ5 X-IronPort-AV: E=Sophos;i="4.25,455,1199660400"; d="scan'208";a="23436260" Received: from gv-out-0910.google.com ([216.239.58.191]) by mail4-smtp-sop.national.inria.fr with ESMTP; 06 Mar 2008 13:02:25 +0100 Received: by gv-out-0910.google.com with SMTP id l14so2319441gvf.4 for ; Thu, 06 Mar 2008 04:02:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:reply-to:to:subject:date:user-agent:cc:references:in-reply-to:content-type:content-transfer-encoding:content-disposition:message-id; bh=SeE8mqx0T7uwoH7rGbdbr/CrCOXKDv0kK5TlakqhKec=; b=JsV83z87kvhlZmB9JK9S33sHyO/A2/runcaQLjc0vC+0BXJF2NubiVAcd6fB1D6fCM5p8pFIeyIjoM0YsJBMBJeItHUwZ0tBP3nO7WqJFwqCX2TifTXaVMbg4hJdA3drheqqLOHvLFxZr9GQYNn8GHzM7FBw9hd02FI64TCjgeo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:reply-to:to:subject:date:user-agent:cc:references:in-reply-to:content-type:content-transfer-encoding:content-disposition:message-id; b=kK3K1+XIYpCe64WNINZmsAwOy37LuwxVGl7B1vEI9kcnpfBhjEIg3ePlFGgkSaDYFdW20YxZfp4Q5k8fwGS1oqHb59wCt+VKLCzxFrXGbWbRoXzcmn6B0GX5hMaKz/SbwN6Rbr32J6U+VyDaz2trFSk9zjPcYEtM2Pmqozqj5Vg= Received: by 10.151.13.7 with SMTP id q7mr1916085ybi.13.1204804943502; Thu, 06 Mar 2008 04:02:23 -0800 (PST) Received: from tama-chan ( [24.99.180.210]) by mx.google.com with ESMTPS id a45sm4335069rne.1.2008.03.06.04.02.22 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 06 Mar 2008 04:02:22 -0800 (PST) From: Peng Zang Reply-To: peng.zang@gmail.com To: caml-list@yquem.inria.fr Subject: Re: [Caml-list] specifying the type of an argument with more than one #classpath Date: Thu, 6 Mar 2008 07:02:17 -0500 User-Agent: KMail/1.9.7 Cc: Eric Cooper References: <200803052052.10651.peng.zang@gmail.com> <20080306021630.GB14754@stratocaster.home> In-Reply-To: <20080306021630.GB14754@stratocaster.home> Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200803060702.20569.peng.zang@gmail.com> X-Spam: no; 0.00; hash:01 foo:01 foo:01 val:01 peng:98 peng:98 ahhh:98 rescue:98 dgz:98 wrote:01 wrote:01 caml-list:01 caml-list:01 constructor:01 argument:02 -----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 = -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.7 (GNU/Linux) iD8DBQFHz91MfIRcEFL/JewRAjTdAKDAf1uJXdXf5+mdPIu5DGZ2TFUO1wCdH+qt uksXC/TtmRAc8wqympEjCig= =MfTR -----END PGP SIGNATURE-----