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=1.1 required=5.0 tests=AWL,SPF_NEUTRAL 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 B2336BC69 for ; Fri, 1 Jun 2007 00:05:42 +0200 (CEST) Received: from nz-out-0506.google.com (nz-out-0506.google.com [64.233.162.233]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id l4VM5fk3026103 for ; Fri, 1 Jun 2007 00:05:42 +0200 Received: by nz-out-0506.google.com with SMTP id s18so271822nze for ; Thu, 31 May 2007 15:05:40 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=dYP+df31gMD30U2bOgMVTPFAmT10FlwwQkQFSdG0Bn4Q6Tv2+kT3rkt3KDCsiAbJBoJ4SB6G+37CRO5EtMLv42ZSQjQY1M3ewEsTBfypFwAAbV43NbT/CuF9WPsddMZ1CbvIrbZK+3LVlmJf/DboW8hYkoHyNS5DjLOB67uLJLw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=WKcgOlvlOhetendWgkeLD6zU77uoI9Rfa5l1/lTFSMJ0GW8TvdC3luHe7/HDMyIcH46I4gzvWzwzrwPU/vku52+ARQp79822IDXYdRtTSNbAjq25WvP6htvp0e+sV+PspUszOw0Vw4etz+nZCI1BKsFIsXlXhS4dYC4KlKSLMs4= Received: by 10.114.126.1 with SMTP id y1mr1118348wac.1180649139785; Thu, 31 May 2007 15:05:39 -0700 (PDT) Received: by 10.114.181.8 with HTTP; Thu, 31 May 2007 15:05:39 -0700 (PDT) Message-ID: Date: Fri, 1 Jun 2007 00:05:39 +0200 From: "Nicolas Pouillard" To: "Joel Reymont" Subject: Re: GenerateFold Cc: "OCaml List" In-Reply-To: <979C8DFA-180A-4AA2-8D5A-63083BDDAEE7@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <5F8F1647-A4A8-4C71-9958-9370C44ECB84@gmail.com> <979C8DFA-180A-4AA2-8D5A-63083BDDAEE7@gmail.com> X-j-chkmail-Score: MSGID : 465F46B5.000 on concorde : j-chkmail score : X : 0/20 1 0.000 -> 1 X-Miltered: at concorde with ID 465F46B5.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; annotations:01 camlp:01 expr:01 expr:01 camlp:01 val:01 decl:01 decl:01 struct:01 blog:98 wrote:01 token:01 token:01 inherit:01 inherit:01 On 5/31/07, Joel Reymont wrote: > I can remove everything but class fold = ... in my code [1] but I > would still get the error I mentioned previously. Is there an issue > with GenerateFold? > > Thanks, Joel > > [1] Code... > > (* Remove annotations for unit testing *) > > class map = Camlp4Filters.GenerateMap.generated;; > > let strip_token_loc = object > inherit map as super > method expr e = > match super#expr e with > | `TokenPos (a, _) -> a > | e -> e > end > > let strip_stmt x = strip_token_loc#statement x;; > > class fold = Camlp4Filters.GenerateFold.generated;; > > let is_fun_arg = object self is missing let is_fun_arg = object (self) > inherit fold as super > val found = false > method found = found > method input_decl x = > match super#input_decl x with > | `FunArgDecl _ -> {< found = true >} > | _ -> self > end > > let is_fun x = (is_fun_arg#statement x)#found;; > > module Camlp4Trash = struct > INCLUDE "easy_ast.ml";; > end;; > > > -- > http://topdog.cc - EasyLanguage to C# translator > http://wagerlabs.com - Blog > > > > > > -- Nicolas Pouillard