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 JAA25792; Thu, 24 Oct 2002 09:36:16 +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 JAA26225 for ; Thu, 24 Oct 2002 09:36:15 +0200 (MET DST) X-SPAM-Warning: Sending machine is listed in blackholes.five-ten-sg.com Received: from athlon.baretta.com ([62.211.4.209]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id g9O7aE516837 for ; Thu, 24 Oct 2002 09:36:14 +0200 (MET DST) Received: from baretta.com (localhost.localdomain [127.0.0.1]) by athlon.baretta.com (Postfix) with ESMTP id 991F227250 for ; Thu, 24 Oct 2002 09:44:14 +0200 (CEST) Message-ID: <3DB7A4B9.1030607@baretta.com> Date: Thu, 24 Oct 2002 09:43:53 +0200 From: Alessandro Baretta Organization: Baretta srl -- www.baretta.com User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.1) Gecko/20020826 X-Accept-Language: it, en MIME-Version: 1.0 To: Ocaml Subject: Re: [Caml-list] Again on pattern matching and strings References: <3DB73515.90705@baretta.com> <15799.14325.887770.501722@karryall.dnsalias.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Olivier Andrieu wrote: > Alessandro Baretta [Thursday 24 October 2002] : > > I write this message because I would like to know what kind > > of complications would need to be added to the compiler to > > make the above trick work. > > None ! You can do it with camlp4 ! Unless I'm mistaken, what's > described there : > seems > to apply to your case. Ah, woe is me! I put ashes on my head. I do not understand the example, but yes, what I am asking for is essentially, a substitution of constant expressions for their alias in the syntax tree of the program. So yes: CamlP4 can do it. Since I don't want to reinvent the wheel, has anyone written--and documented for the syntax laymen--such an extension? Alex ------------------- 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