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 concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id B3525BC0A for ; Sun, 13 May 2007 09:36:24 +0200 (CEST) Received: from ipmail02.adl2.internode.on.net (ipmail02.adl2.internode.on.net [203.16.214.141]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id l4D7aM1U022303 for ; Sun, 13 May 2007 09:36:23 +0200 X-IronPort-AV: E=Sophos;i="4.14,527,1170595800"; d="scan'208";a="122763516" Received: from ppp24-138.lns4.syd7.internode.on.net (HELO [192.168.1.201]) ([121.44.24.138]) by ipmail02.adl2.internode.on.net with ESMTP; 13 May 2007 17:06:20 +0930 Subject: Re: [Caml-list] Custom operators in the revised syntax From: skaller To: brogoff Cc: Nicolas Pouillard , caml-list@inria.fr In-Reply-To: References: <1884660607.20070511161455@moldavcable.com> Content-Type: text/plain Date: Sun, 13 May 2007 17:36:16 +1000 Message-Id: <1179041776.24955.124.camel@rosella.wigram> Mime-Version: 1.0 X-Mailer: Evolution 2.10.1 Content-Transfer-Encoding: 7bit X-Miltered: at concorde with ID 4646BFF6.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; syntax:01 ocaml:01 camlp:01 haskell:01 nesting:01 syntax:01 2007,:98 harmless:98 sourceforge:01 arbitrary:01 wrote:01 wrote:01 caml-list:01 formulation:01 formulation:01 On Sat, 2007-05-12 at 22:52 -0700, brogoff wrote: > On Sun, 13 May 2007, Nicolas Pouillard wrote: > > I've a tiny patch to do that: > > > > 2 ``List.mem`` [1;2;3] > > > > I think that extension harmless, any thoughts? > > That looks like a good start. This patch is in the new Revised? There was a discussion on this previously, and it can be done now with ordinary Ocaml, no camlp4 needed, and it can be done much better than the weak Haskell formulation. The idea is something like: a <+ b +> c translates to b a c however this formulation not only allows 'b' to be an arbitrary expression, but also supports nesting. The operators are not the ones I listed though .. perhaps someone can search the archives of this mailing list to find the previous discussion. Exactly how the Revised syntax would support this I don't know, however I really think Revised should be thrown out ;( -- John Skaller Felix, successor to C++: http://felix.sf.net