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 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id 63812BC69 for ; Tue, 17 Jul 2007 22:46:36 +0200 (CEST) Received: from wa-out-1112.google.com (wa-out-1112.google.com [209.85.146.176]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id l6HKkZK3007251 for ; Tue, 17 Jul 2007 22:46:35 +0200 Received: by wa-out-1112.google.com with SMTP id m34so2410790wag for ; Tue, 17 Jul 2007 13:46:34 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=WHwc+6QZiTUGgtK87Pa45aJJ/Vq4CtE/dS+D9nLZ2hLXuLGVfW8BsgbjCaLvFaMkSaAAwpW7mXSxEmzR0HtOZU1fh8nGfPRga1Gd0aMdxXnbeKXJTGN9D87Ntuu1a2OUYw32mDlZoOBQU9hLVmuq72Dp/dZ8ujAaU+MQ9MZAzSE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=iClBilPB/SgAMW3FgYePUicn6o4VQ0uYgJpZIliD6CakyBAyL/EPJO23ggK0MtCRUEntrjC3XW8ePsp8sgyRH5kA5JZWNwWHBiTu+5fUtL4YJoEiz2MnuqS4GBv9+kYfA5jnqpSoSssGYHO8Rs7ugjG1d52aKs47HpDzbyeCJdQ= Received: by 10.114.132.5 with SMTP id f5mr769638wad.1184705194765; Tue, 17 Jul 2007 13:46:34 -0700 (PDT) Received: by 10.114.235.10 with HTTP; Tue, 17 Jul 2007 13:46:34 -0700 (PDT) Message-ID: <875c7e070707171346w43610622qbb918860b2573b53@mail.gmail.com> Date: Tue, 17 Jul 2007 16:46:34 -0400 From: "Chris King" To: "Brian Hurt" Subject: Re: [Caml-list] List.cons and "::" Cc: "Sam Steingold" , caml-list@inria.fr In-Reply-To: <469D235E.9000008@janestcapital.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <469D2055.5080408@gnu.org> <469D235E.9000008@janestcapital.com> X-j-chkmail-Score: MSGID : 469D2AAB.000 on concorde : j-chkmail score : X : 0/20 1 0.000 -> 1 X-Miltered: at concorde with ID 469D2AAB.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; foo:01 foo:01 syntax:01 constructors:01 haskell:01 o'caml:01 wrote:01 caml-list:01 constructor:01 int:01 int:01 override:03 cons:04 brian:05 chris:06 On 7/17/07, Brian Hurt wrote: > I wouldn't recommend it, but you could. > :: and , you can't override. Actually, # type foo = :: of int * int;; # 1 :: 2;; - : foo = :: (1, 2) :) This is because :: is considered a constructor, and not just syntax (as is , or []). But in general automatic currying of constructors would be nice (I think Haskell does this). There is probably some technical reason why it's not a good idea in O'Caml though. - Chris