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=0.0 required=5.0 tests=none 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 6BF52BC0A for ; Thu, 5 Apr 2007 23:55:46 +0200 (CEST) Received: from out4.smtp.messagingengine.com (out4.smtp.messagingengine.com [66.111.4.28]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id l35Ltj5o005244 for ; Thu, 5 Apr 2007 23:55:46 +0200 Received: from compute1.internal (compute1.internal [10.202.2.41]) by out1.messagingengine.com (Postfix) with ESMTP id 48DAB211C64; Thu, 5 Apr 2007 17:55:51 -0400 (EDT) Received: from heartbeat1.messagingengine.com ([10.202.2.160]) by compute1.internal (MEProxy); Thu, 05 Apr 2007 17:55:45 -0400 X-Sasl-enc: 0rsit38V/D8JyKcmLWBZMLFsAJ6T+dgJNloM3qjCI4w+ 1175810145 Received: from [172.16.112.115] (burnham.ljcrf.edu [192.231.106.2]) by mail.messagingengine.com (Postfix) with ESMTP id CFDA36C18; Thu, 5 Apr 2007 17:55:44 -0400 (EDT) Date: Thu, 5 Apr 2007 14:54:28 -0700 (PDT) From: Martin Jambon X-X-Sender: martin@localhost To: Hendrik Tews Cc: caml-list@inria.fr Subject: Re: [Caml-list] 2 camlp4 questions In-Reply-To: <17941.26750.232997.697322@tandem.cs.ru.nl> Message-ID: References: <17941.26750.232997.697322@tandem.cs.ru.nl> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Miltered: at concorde with ID 46157061.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; ens-lyon:01 camlp:01 hendrik:01 tews:01 camlp:01 sig:01 sig:01 expander:01 explicitely:01 mlast:01 expr:01 expr:01 2007,:98 wrote:01 caml-list:01 On Thu, 5 Apr 2007, Hendrik Tews wrote: > Hi, > > I am still reading the camlp4 sources: > > 1. Is there a special @loc quotation form? For instance in > camlp4/Camlp4Bin.ml line 141 > > [ <:sig_item@loc< # $n$ $str:s$ >> -> Some (loc, n, s) > > What does it do? Or is ``sig_item@loc'' just the identifier of > the quotation expander? I can answer this one: @x means "bind the location to x". Before you had to extract the location explicitely using one of the MLast.loc_of_* functions. It's not done by default using _loc because of cases like this one: match e1, e2 with <:expr< ...>>, <:expr< ... >> -> ... Martin -- Martin Jambon http://martin.jambon.free.fr