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=0.0 required=5.0 tests=none autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by yquem.inria.fr (Postfix) with ESMTP id 9BCAABBC1 for ; Thu, 6 Mar 2008 03:16:42 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgAAAGLjzkeAAskQnmdsb2JhbACBVo8jAQEBAQEGBAYHChiaUg X-IronPort-AV: E=Sophos;i="4.25,454,1199660400"; d="scan'208";a="9929264" Received: from jackfruit.srv.cs.cmu.edu ([128.2.201.16]) by mail3-smtp-sop.national.inria.fr with ESMTP; 06 Mar 2008 03:16:31 +0100 Received: from stratocaster.home (c-71-199-104-241.hsd1.pa.comcast.net [71.199.104.241]) (authenticated bits=0) by jackfruit.srv.cs.cmu.edu (8.13.6/8.13.6) with ESMTP id m262GUR7012149 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NO); Wed, 5 Mar 2008 21:16:30 -0500 (EST) Received: from ecc by stratocaster.home with local (Exim 4.69) (envelope-from ) id 1JX5eo-00047E-1L; Wed, 05 Mar 2008 21:16:30 -0500 Date: Wed, 5 Mar 2008 21:16:30 -0500 From: Eric Cooper To: caml-list@yquem.inria.fr, caml-list@inria.fr Subject: Re: [Caml-list] specifying the type of an argument with more than one #classpath Message-ID: <20080306021630.GB14754@stratocaster.home> Mail-Followup-To: caml-list@yquem.inria.fr, caml-list@inria.fr References: <200803052052.10651.peng.zang@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200803052052.10651.peng.zang@gmail.com> User-Agent: Mutt/1.5.17+20080114 (2008-01-14) X-Spam: no; 0.00; foo:01 foo:01 val:01 peng:98 wrote:01 caml-list:01 constructor:01 argument:02 argument:02 string:02 string:02 workaround:03 let:03 let:03 correctly:04 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 = -- Eric Cooper e c c @ c m u . e d u