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 RAA19051; Tue, 28 May 2002 17:55:00 +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 RAA19184 for ; Tue, 28 May 2002 17:54:59 +0200 (MET DST) Received: from laurelin.dementia.org ([208.167.88.73]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id g4SFswv20520 for ; Tue, 28 May 2002 17:54:58 +0200 (MET DST) Received: by laurelin.dementia.org (Postfix, from userid 1001) id CCEB07099; Tue, 28 May 2002 12:00:40 -0400 (EDT) To: dengping zhu Cc: Ocaml Subject: Re: [Caml-list] infix precedence References: From: John Prevost Date: 28 May 2002 12:00:40 -0400 In-Reply-To: Message-ID: <86k7pofejb.fsf@laurelin.dementia.org> User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk >>>>> "zd" == dengping zhu writes: zd> Hi, all, I have a question about the precedence of infix in zd> ocaml. I define a few infixes as follow: zd> let (^^) x y = ... let (^+) x y = ... let (^<) x y = ... zd> Now how can I define the precedence of them? At first, I want zd> to use brackets to solve it, but later I find out it is almost zd> impossible because there are a lot of recursive functions and zd> combination of these infixes. zd> Can you give me any idea? Thanks a lot! The precedence and fixity of the infix is determined by the first character. This is why most "families" of infixes look like: ^^ +^ <^ rather than ^^ ^+ ^< John. ------------------- 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