* camlp4 Filters changed?
@ 2008-01-26 0:34 Joel Reymont
2008-01-27 12:58 ` [Caml-list] " Nicolas Pouillard
0 siblings, 1 reply; 6+ messages in thread
From: Joel Reymont @ 2008-01-26 0:34 UTC (permalink / raw)
To: caml-list List
I get the error "This expression has no method expr" and it points to
super#expr below.
Is there no expr in map anymore or am I doing something wrong?
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
Thanks, Joel
--
http://wagerlabs.com
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Caml-list] camlp4 Filters changed?
2008-01-26 0:34 camlp4 Filters changed? Joel Reymont
@ 2008-01-27 12:58 ` Nicolas Pouillard
2008-01-27 16:07 ` Joel Reymont
0 siblings, 1 reply; 6+ messages in thread
From: Nicolas Pouillard @ 2008-01-27 12:58 UTC (permalink / raw)
To: joelr1; +Cc: caml-list
[-- Attachment #1: Type: text/plain, Size: 581 bytes --]
Excerpts from joelr1's message of Sat Jan 26 01:34:25 +0100 2008:
> I get the error "This expression has no method expr" and it points to
> super#expr below.
>
> Is there no expr in map anymore or am I doing something wrong?
>
> class map = Camlp4Filters.GenerateMap.generated;;
It's now:
class map = Camlp4MapGenerator.generated;
I've just updated the wiki.
> let strip_token_loc = object
> inherit map as super
> method expr e =
> match super#expr e with
> | `TokenPos (a, _) -> a
> | e -> e
> end
--
Nicolas Pouillard aka Ertai
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 186 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Caml-list] camlp4 Filters changed?
2008-01-27 12:58 ` [Caml-list] " Nicolas Pouillard
@ 2008-01-27 16:07 ` Joel Reymont
2008-01-27 16:32 ` Nicolas Pouillard
0 siblings, 1 reply; 6+ messages in thread
From: Joel Reymont @ 2008-01-27 16:07 UTC (permalink / raw)
To: Nicolas Pouillard; +Cc: caml-list
I edited my code but I still get the "no expr" error in
let strip_token_loc = object
inherit map as super
method expr e =
match super#expr e with
| `TokenPos (a, _) -> a
| e -> e
end
I'll check the wiki but please let me know what other changes I missed.
Thanks, Joel
On Jan 27, 2008, at 12:58 PM, Nicolas Pouillard wrote:
> It's now:
>
> class map = Camlp4MapGenerator.generated;
>
> I've just updated the wiki.
-
http://wagerlabs.com
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Caml-list] camlp4 Filters changed?
2008-01-27 16:07 ` Joel Reymont
@ 2008-01-27 16:32 ` Nicolas Pouillard
2008-01-27 16:37 ` Joel Reymont
0 siblings, 1 reply; 6+ messages in thread
From: Nicolas Pouillard @ 2008-01-27 16:32 UTC (permalink / raw)
To: joelr1; +Cc: caml-list
Excerpts from joelr1's message of Sun Jan 27 17:07:15 +0100 2008:
> I edited my code but I still get the "no expr" error in
>
> let strip_token_loc = object
> inherit map as super
> method expr e =
> match super#expr e with
> | `TokenPos (a, _) -> a
> | e -> e
> end
>
> I'll check the wiki but please let me know what other changes I missed.
That's certainly because you need to define your types as one big definition (using "and").
type t1 = ...
and t2 = ...
and t3 = ...
class map = Camlp4MapGenerator.generated;
Because the generation declaration take only the last definition group now.
> On Jan 27, 2008, at 12:58 PM, Nicolas Pouillard wrote:
>
> > It's now:
> >
> > class map = Camlp4MapGenerator.generated;
> >
> > I've just updated the wiki.
>
>
> -
> http://wagerlabs.com
--
Nicolas Pouillard aka Ertai
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Caml-list] camlp4 Filters changed?
2008-01-27 16:32 ` Nicolas Pouillard
@ 2008-01-27 16:37 ` Joel Reymont
2008-01-27 17:24 ` Nicolas Pouillard
0 siblings, 1 reply; 6+ messages in thread
From: Joel Reymont @ 2008-01-27 16:37 UTC (permalink / raw)
To: Nicolas Pouillard; +Cc: caml-list
On Jan 27, 2008, at 4:32 PM, Nicolas Pouillard wrote:
> That's certainly because you need to define your types as one big
> definition (using "and").
>
> type t1 = ...
> and t2 = ...
> and t3 = ...
>
> class map = Camlp4MapGenerator.generated;
>
> Because the generation declaration take only the last definition
> group now.
That's exactly what my AST looks like. Then I have (in a different ml
file)
open Easy_ast
class map = Camlp4MapGenerator.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;;
module Camlp4Trash = struct
INCLUDE "easy_ast.ml";;
end;;
This used to work just fine before.
Thanks, Joel
--
http://wagerlabs.com
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Caml-list] camlp4 Filters changed?
2008-01-27 16:37 ` Joel Reymont
@ 2008-01-27 17:24 ` Nicolas Pouillard
0 siblings, 0 replies; 6+ messages in thread
From: Nicolas Pouillard @ 2008-01-27 17:24 UTC (permalink / raw)
To: joelr1; +Cc: caml-list
Excerpts from joelr1's message of Sun Jan 27 17:37:58 +0100 2008:
>
> On Jan 27, 2008, at 4:32 PM, Nicolas Pouillard wrote:
>
> > That's certainly because you need to define your types as one big
> > definition (using "and").
> >
> > type t1 = ...
> > and t2 = ...
> > and t3 = ...
> >
> > class map = Camlp4MapGenerator.generated;
> >
> > Because the generation declaration take only the last definition
> > group now.
>
>
> That's exactly what my AST looks like. Then I have (in a different ml
> file)
>
> open Easy_ast
>
Move it there
> module Camlp4Trash = struct
> INCLUDE "easy_ast.ml";;
> end;;
> class map = Camlp4MapGenerator.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;;
>
>
> This used to work just fine before.
The generator works on the last defined types before the "class map =
Camlp4MapGenerator.generated;;".
--
Nicolas Pouillard aka Ertai
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2008-01-27 17:25 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-01-26 0:34 camlp4 Filters changed? Joel Reymont
2008-01-27 12:58 ` [Caml-list] " Nicolas Pouillard
2008-01-27 16:07 ` Joel Reymont
2008-01-27 16:32 ` Nicolas Pouillard
2008-01-27 16:37 ` Joel Reymont
2008-01-27 17:24 ` Nicolas Pouillard
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox