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 QAA31524; Wed, 29 Jan 2003 16:43:30 +0100 (MET) 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 QAA25154 for ; Wed, 29 Jan 2003 16:43:29 +0100 (MET) Received: from shiva.jussieu.fr (shiva.jussieu.fr [134.157.0.129]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id h0TFhSr07591 for ; Wed, 29 Jan 2003 16:43:28 +0100 (MET) Received: from akasha.ijm.jussieu.fr (akasha.ijm.jussieu.fr [134.157.173.57]) by shiva.jussieu.fr (8.12.5/jtpda-5.4) with ESMTP id h0TFh7YY076803 ; Wed, 29 Jan 2003 16:43:18 +0100 (CET) Received: by akasha.ijm.jussieu.fr (Postfix, from userid 11004) id 781F53CDBB; Wed, 29 Jan 2003 16:43:01 +0100 (CET) From: Olivier Andrieu MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15927.63109.279741.539157@akasha.ijm.jussieu.fr> Date: Wed, 29 Jan 2003 16:43:01 +0100 To: Mike Potanin Cc: caml-list@inria.fr Subject: Re: [Caml-list] AST and "when" In-Reply-To: References: <15927.58952.223959.906400@akasha.ijm.jussieu.fr> X-Mailer: VM 7.07 under Emacs 21.2.1 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Mike Potanin [Wednesday 29 January 2003] : > On Wed, 29 Jan 2003, Olivier Andrieu wrote: > > Mike Potanin [Wednesday 29 January 2003] : > > That should be : > > <:expr< let p x = match x with [ a when a<0 -> 1 | b -> b ] in p z >> > > > > AST quotations use the revised syntax. > > Thank you! > Can I use <:patt< ... >> for this resalt? I don't think so: in `a when a<0', only the first `a' is a pattern, the when + expr is part of the `match' (or `try' or `function') construct which is at the expression level. > (MLast.PaLid ((0, 0), "a"), > Some > (MLast.ExApp ((0, 0), > MLast.ExApp ((0, 0), MLast.ExLid ((0, 0), "<"), > MLast.ExLid ((0, 0), "a")), > MLast.ExInt ((0, 0), "0"))) that's not a single pattern (MLast.patt), that's a tuple of type `MLast.patt * MLast.expr option' -- Olivier ------------------- 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