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 mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by yquem.inria.fr (Postfix) with ESMTP id 766DBBBAF for ; Sat, 30 Oct 2010 00:07:45 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AhkBAKDiykxKfVK2kGdsb2JhbAChSQgVAQEBAQkJDAcRAx+kOItwAQWPFwEEhUiKVw X-IronPort-AV: E=Sophos;i="4.58,261,1286143200"; d="scan'208";a="85764456" Received: from mail-wy0-f182.google.com ([74.125.82.182]) by mail1-smtp-roc.national.inria.fr with ESMTP; 30 Oct 2010 00:07:45 +0200 Received: by wyb42 with SMTP id 42so3708879wyb.27 for ; Fri, 29 Oct 2010 15:07:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:subject:references :date:in-reply-to:message-id:user-agent:mime-version:content-type; bh=P81q/bruh4Ceo2vsIYiIK4cA1cch6HNbpAIMUsZ5Mh0=; b=cAAC7Qv3ZCkdfK0fc5/tL8qmstOS0kcmLwK9riwnRPhmY4LHo/blyJ8Rwd7hHQwJbJ EXQNRk4t8zoIBx4CqmNAKnnTeXFdK/GmiF6/aRHWXNMkQCrIaZvhUK5t/5mM8HqAGuxZ EVhN5qYl/p5Uu91vZhMCi04JMcsUqujuBJTvw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; b=N126t9uDWqfARzCDgoDX3oobzVB60S43KlTx5MhWUhwVSrQGZu/uzA372pIOo/08uH k5nRMa5XOABAr/V41fYQhQHSnaMowbGgj9GvmIpaK/GutR36X6Qckf2/HdttmVuyfb3H FWLjO7SciXRGPcuyX7Izj+Tds0DGf2xnoBp44= Received: by 10.227.127.134 with SMTP id g6mr12801738wbs.54.1288390065095; Fri, 29 Oct 2010 15:07:45 -0700 (PDT) Received: from spec-desktop.specuu.com (host81-129-248-158.range81-129.btcentralplus.com [81.129.248.158]) by mx.google.com with ESMTPS id x65sm1956258weq.25.2010.10.29.15.07.41 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 29 Oct 2010 15:07:44 -0700 (PDT) From: Wojciech Daniel Meyer To: Stefan Monnier Cc: caml-list@inria.fr Subject: Re: [Caml-list] Re: Generalized Algebraic Datatypes References: <904846.44200.qm@web111513.mail.gq1.yahoo.com> Date: Fri, 29 Oct 2010 23:05:44 +0100 In-Reply-To: (Stefan Monnier's message of "Fri, 29 Oct 2010 17:10:04 -0400") Message-ID: <87lj5gu01z.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 MIME-Version: 1.0 Content-Type: text/plain X-Spam: no; 0.00; datatypes:01 iirc:01 ocaml:01 constructors:01 ocaml:01 constructors:01 curried:01 sml:01 partial:01 partial:01 caml-list:01 constructor:01 writes:01 data:02 data:02 Stefan Monnier writes: > Indeed IIRC OCaml does not accept "App" as an expression (you have to > provide arguments to the construct). Maybe this is a good opportunity > to lift this restriction. > I wish to see first class data constructors in OCaml someday. > > The types above don't allow partial applications either. They use the > OCaml/SML style of constructors were partial application is not possible > because the various arguments are not provided in a curried way. Probably it will never happen to un-curry the arguments for the data constructors in OCaml. It is too massive change, but passing the constructor as a standalone argument should be fairly possible, Wojciech