From: Hendrik Tews <tews@tcs.inf.tu-dresden.de>
To: caml-list@inria.fr
Subject: Re: [Caml-list] Strange output from Camlp4
Date: Tue, 01 Nov 2005 14:54:44 +0100 [thread overview]
Message-ID: <rlvezcmq1n.fsf@ithif59.inf.tu-dresden.de> (raw)
In-Reply-To: <436273A1.9030104@gushee.net>
Matt Gushee <matt@gushee.net> writes:
I have a file, ox.ml, whose contents look like this:
let conf = object
val mutable data:(string * string) list = []
method get k = List.assoc k data
end
An immediate object, this is a bit more difficult. Note that the
quotation expander q_MLast contains no rules for immediate
objects. Further, pr_o.ml and pr_r.ml do not contain MLast.ExObj,
the ast constructor for immediate objects, so when pretty
printing an immediate object, you end up with this code:
| e -> fun curr next _ k -> [: `not_impl "expr" e :] ]}];
BTW, that is deliberately a let binding rather than a class definition.
Is that not supposed to work?
I would say yes. You should submit a bug report about it.
To learn about the revised syntax you have to study the parser
pa_r.ml ... or read about what I have found out at
http://wwwtcs.inf.tu-dresden.de/~tews/ocamlp4/camlp4-undoc.html
The translation to revised syntax of your example is as follows:
value conf = object
value mutable data: list (string * string) = [];
method get k = List.assoc k data;
end;
<advertisement>
Why do you need the revised syntax at all? If you just want to
use quotations, you can use quotations in the original syntax,
see http://wwwtcs.inf.tu-dresden.de/~tews/ocamlp4/ocamlp4.html
Version 0.2 does not have immediate objects, but I have done
immediate objects already and I can release it if you need it. I
plan to upgrade to 3.09 as soon as I find some time.
</advertisement/
Feel free to ask more revised (syntax) questions!
Bye,
Hendrik Tews
prev parent reply other threads:[~2005-11-01 13:54 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-10-28 18:53 Matt Gushee
2005-11-01 13:54 ` Hendrik Tews [this message]
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=rlvezcmq1n.fsf@ithif59.inf.tu-dresden.de \
--to=tews@tcs.inf.tu-dresden.de \
--cc=caml-list@inria.fr \
/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