From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr 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 4A70CBC57 for ; Sun, 31 Oct 2010 13:22:56 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AswKAAv8zExii1vYZGdsb2JhbACDCZATjjUaCgsFESSpCzyCF4UoiQUBBAQBgR2DL3MEhFeJBQ X-IronPort-AV: E=Sophos;i="4.58,268,1286143200"; d="scan'208";a="76832631" Received: from nm19-vm0.bullet.mail.sp2.yahoo.com ([98.139.91.216]) by mail4-smtp-sop.national.inria.fr with SMTP; 31 Oct 2010 13:22:55 +0100 Received: from [98.139.91.64] by nm19.bullet.mail.sp2.yahoo.com with NNFMP; 31 Oct 2010 12:22:53 -0000 Received: from [98.139.91.30] by tm4.bullet.mail.sp2.yahoo.com with NNFMP; 31 Oct 2010 12:22:53 -0000 Received: from [127.0.0.1] by omp1030.mail.sp2.yahoo.com with NNFMP; 31 Oct 2010 12:22:53 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 336120.1461.bm@omp1030.mail.sp2.yahoo.com Received: (qmail 38296 invoked by uid 60001); 31 Oct 2010 12:22:52 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1288527772; bh=HgBwpLUfSOyxIVV0MTx2W1jPMt1gYe4v16lgKbw663w=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=fyD63OBo2MW23Hez3T+SogFnGWEW7eGzivDHRVha172sAgnGJQtl5dfcfRKxqdZQdTRczbU/oCpSaKppdnLZnBzaSf7DvDO7fUV7KMq2Dj0ukcVC7DKv5l7Dz8drzbArdrykW9frHCF2X/bZmulfXH1NkwC5EPowVRAbPxjyR7Y= DomainKey-Signature:a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=G60/rh2NvdM0w/22p6dBZWnU2lF9WKMMPA/MWoYUaby5NAvHoRhUTIqfYG1aOznj0Pr8VcdfuSfcgTQV51XyK1VatfRBUgCqRlIVJ9rVnwd2Nx7+rFVHFNoCTTR94IutfYVgR7P6V1lQHNm6zwrEkwxN0WPlBUJAsP/FEgPJVOY=; Message-ID: <792627.35144.qm@web111510.mail.gq1.yahoo.com> X-YMail-OSG: ercsdGAVM1nFHvb_saGwHGmiqWp6Cavv.jIDzSozxUU39vh TKOLY0v6jJ18UR7dSLcHUWeTn2ibzgPWkZt5DupKzmHJZ2uXzIBOoOJRUnk6 misyJgcZt0C6AGuZERvRM8myNl6RmBu7Dsq73EzKCBdzm2g3rjosUjdbgMa3 N8sRMrt3X9YB_ul54EdWv1IjNSduauzxSUwL52nyIBTzwscmve4SLn0m182V L45V210krPiZgW9HpDLDhKhsjPEANNjaYt3VClNUmy5g2HP6f5pa2vZuYWjt NrfBrLAuHsFTjdOSCgEg_TH4sqTtiCfH6nE.4JYwEMsJYa_.dj5ZkpzY- Received: from [213.205.70.214] by web111510.mail.gq1.yahoo.com via HTTP; Sun, 31 Oct 2010 05:22:52 PDT X-Mailer: YahooMailClassic/11.4.9 YahooMailWebService/0.8.107.284920 Date: Sun, 31 Oct 2010 05:22:52 -0700 (PDT) From: Dario Teixeira Subject: Re: [Caml-list] Re: Generalized Algebraic Datatypes To: Stefan Monnier Cc: caml-list@yquem.inria.fr In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam: no; 0.00; datatypes:01 iow:01 curried:01 curried:01 val:01 constructors:01 syntax:01 bool:01 bool:01 partial:01 partial:01 caml-list:01 constructor:01 constructor:01 pair:01 Hi,=0A=0A> If I misunderstood you, then I still misunderstand you: the App= =0A> constructor you quoted took only 1 "argument" (a pair), so you can't= =0A> "partially apply it", and that's from the type declaration.=0A> IOW th= e type declaration you quoted is *not* curried.=0A=0ANow I get what you mea= n, and there's definitely been a misunderstanding.=0AFirst, I wasn't referr= ing to constructor App in particular, nor confusing=0Aa tuple argument with= a curried form. I may be abusing the term, but=0AI used "partial applicat= ion" in the most general sense, ie, including=0Aan application with zero ar= guments (in other words, a first-class value).=0A=0ASuppose I had the follo= wing type declaration:=0A=0A val f: int -> int -> int -> int=0A=0AI could = do a partial application with 2 arguments:=0A=0A let f2 =3D f 1 2=0A=0AA p= artial application with 1 argument:=0A=0A let f1 =3D f 1=0A=0AAnd generali= sing, a "partial application" with 0 arguments, which=0Ais simply referring= to f itself:=0A=0A let f0 =3D 0=0A=0ANow, going back to the GADTs example= , a declaration such as the one=0Abelow hints that the constructors may be = used as first-class values=0A(a zero-arg "partial application"), when in fa= ct they cannot. That=0Ais why I find this syntax to be inconsistent with t= he rest of the=0Alanguage.=0A=0Atype _ t =3D=0A | IntLit : int -> int t=0A= | BoolLit : bool -> bool t=0A=0A=0ABest regards,=0ADario Teixeira=0A=0A= =0A=0A