caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Joel Reymont <joelr1@gmail.com>
To: Nicolas Pouillard <nicolas.pouillard@gmail.com>
Cc: "OCaml List" <caml-list@inria.fr>
Subject: Re: GenerateFold
Date: Thu, 31 May 2007 19:58:21 +0100	[thread overview]
Message-ID: <979C8DFA-180A-4AA2-8D5A-63083BDDAEE7@gmail.com> (raw)
In-Reply-To: <cd67f63a0705310829k17e9a4eej3cc15fcd66f08b15@mail.gmail.com>

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
   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






  parent reply	other threads:[~2007-05-31 18:58 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-31 12:18 GenerateFold Joel Reymont
2007-05-31 15:29 ` GenerateFold Nicolas Pouillard
2007-05-31 17:41   ` GenerateFold Joel Reymont
2007-05-31 18:58   ` Joel Reymont [this message]
2007-05-31 22:05     ` GenerateFold Nicolas Pouillard
2007-05-31 22:16       ` GenerateFold Joel Reymont
2007-05-31 22:34       ` GenerateFold Joel Reymont
2007-06-01  6:08         ` [Caml-list] GenerateFold Edgar Friendly
2007-06-01 13:22           ` Joel Reymont
2007-06-01 13:30             ` Nicolas Pouillard
2007-06-01 13:44               ` Joel Reymont
2007-06-01 16:07                 ` Nicolas Pouillard
2007-06-05 12:25                   ` Nicolas Pouillard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=979C8DFA-180A-4AA2-8D5A-63083BDDAEE7@gmail.com \
    --to=joelr1@gmail.com \
    --cc=caml-list@inria.fr \
    --cc=nicolas.pouillard@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).