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.1 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 06CCBBC69 for ; Fri, 11 May 2007 22:37:25 +0200 (CEST) Received: from wr-out-0506.google.com (wr-out-0506.google.com [64.233.184.231]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id l4BKb257008501 for ; Fri, 11 May 2007 22:37:24 +0200 Received: by wr-out-0506.google.com with SMTP id l58so1072028wrl for ; Fri, 11 May 2007 13:37:24 -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=PMMjVoDD0I2OaJgoQeXud7c3PltmeVn+Lc2Tj1nM2Qaw1CY0fDp2VAwMIR68Z5WLm06IAk6HV4CQgg3dpyKbEDesCbk3jcnlfvE2Y72OzzIjlGo+D1//hxh35v32P5ZxjqKcJpIo/mwOTT5ZFJ7ewpf2ulcwI2iUC4t7MI1lh3I= 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=pUgev9PkG+9aOZWoY+cOu4tBHGa5qp5+UxdhRBVduPk96oCi/H9KukJ8gRL5OG1oTrav/BP9TUN/AFn2ML4BTxd5OTzFVZczEGTTivV8lMPPLcnUWqLJUY6A6gs8NBYpfr/kdgEWVB6BdBz5mMNm7qcmHI5C8sRW55HN4juHE1o= Received: by 10.114.149.2 with SMTP id w2mr19127wad.1178915841918; Fri, 11 May 2007 13:37:21 -0700 (PDT) Received: by 10.114.183.4 with HTTP; Fri, 11 May 2007 13:37:21 -0700 (PDT) Message-ID: Date: Fri, 11 May 2007 22:37:21 +0200 From: "Nicolas Pouillard" To: brogoff Subject: Re: [Caml-list] Custom operators in the revised syntax Cc: caml-list@inria.fr In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <1884660607.20070511161455@moldavcable.com> X-j-chkmail-Score: MSGID : 4644D3EE.000 on concorde : j-chkmail score : X : 0/20 1 0.000 -> 1 X-Miltered: at concorde with ID 4644D3EE.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; syntax:01 haskell:01 infix:01 foo:01 syntax:01 variants:01 parsers:01 haskell:01 ocaml:01 reloaded:01 camlp:01 2007,:98 polymorphic:01 wrote:01 wrote:01 On 5/11/07, brogoff wrote: > On Fri, 11 May 2007, Nicolas Pouillard wrote: > > On 5/11/07, brogoff wrote: > > > Any chance we could have something like in Haskell where you easily > > > define new infix names? > > > > Something general like: x `foo` y ? > > Exactly. Fine, but what syntax? The backquote is already use for polymorphic variants (and in stream parsers too). > > > In Haskell you can put brackets and semi-colons if you dislike > > significant layout. > > Yes, I know. I don't dislike significant layout, I'm just pointing out > that the (relatively minor) issues I have with OCaml syntax, like > try/with or if/then capturing more than I expect, are fixed in Revised, > by using more brackets. Personally I would prefer just an "end" to close them. That's what I've done in a small *experimental* extension called Reloaded. It's usable on top of the original syntax or the revised one. camlp4o -parser rr -str "match x with A -> 1 | B -> 2 end" -- Nicolas Pouillard