From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id OAA00713; Tue, 13 May 2003 14:21:50 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id OAA01562 for ; Tue, 13 May 2003 14:21:48 +0200 (MET DST) Received: from draco.dyndns.org (81-86-232-122.dsl.pipex.com [81.86.232.122]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id h4DCLlH21938 for ; Tue, 13 May 2003 14:21:47 +0200 (MET DST) Received: from jim by draco.dyndns.org with local (Exim 3.36 #1 (Debian)) id 19FYmx-0000Mg-00 for ; Tue, 13 May 2003 13:21:47 +0100 Date: Tue, 13 May 2003 13:21:47 +0100 From: Jim Farrand To: caml-list@inria.fr Subject: [Caml-list] Inline operators in the revised syntax Message-ID: <20030513122147.GA8982@farrand.net> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline X-Uptime: 23:24:12 up 4:54, 0 users, load average: 2.00, 1.81, 1.74 User-Agent: Mutt/1.5.3i X-Spam: no; 0.00; farrand:01 3.06:01 camlp:01 overkill:01 bool:01 caml:01 toplevel:01 syntax:02 silly:02 revised:03 inline:03 parse:04 grammar:05 seems:05 str:05 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Hi, Is there a simple way to define and use an inline operator in the revised syntax? It seems they can be defined but not used. Silly example: > Objective Caml version 3.06 > Camlp4 Parsing version 3.06 > # value \=== a b = a=b ; > value ( === ) : 'a -> 'a -> bool = > # 1 === 1 ; > Toplevel input: > # 1 === 1 ; > ^^^ > Parse error: ';' expected after [str_item] (in [phrase]) The equivelent in the old syntax works fine. (I realise it's probably possible to use camlp4's grammar extension features to do the same, but I don't know how to do this, and it seems like overkill when it was so easy in the old syntax.) As an aside, do many people actually use the revised syntax? Kind regards, Jim -- Jim Farrand -- ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners