From: Peter Zotov <whitequark@whitequark.org>
To: Jun Furuse <jun.furuse@gmail.com>
Cc: caml-list <caml-list@inria.fr>, caml-list-request@inria.fr
Subject: Re: [Caml-list] [ANN] ppx_overload : ppx for user definable SML style overloading
Date: Mon, 13 Oct 2014 17:56:24 +0400 [thread overview]
Message-ID: <8d73ce9dd0bb6d400565617d992736b5@whitequark.org> (raw)
In-Reply-To: <CAAoLEWsY8oJZGMEy5CXxQT3FA8iTnO_Ct2SSgbqaJ4CW4fjSuA@mail.gmail.com>
On 2014-10-13 17:49, Jun Furuse wrote:
> Hi,
>
> I have OPAM-released ppx_overload, a ppx for user definable SML style
> overloading.
Hi,
Great hack! I wanted to do something similar, but yours is much more
elegant than what I had in mind.
One note though:
> Unfortunately this ppx trick does not work for the toplevel. It is
> since OCaml toplevel
> re-execute the ppx filter each time it gets a toplevel phrase. This
> makes the ppx filter
> hard to keep its state, in this case, the typing environment.
In 4.02.1 the toplevel allows the ppx rewriter to save some state.
See
http://caml.inria.fr/cgi-bin/viewvc.cgi/ocaml/trunk/parsing/ast_mapper.mli?view=markup#l192.
--
Peter Zotov
next prev parent reply other threads:[~2014-10-13 13:56 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-13 13:49 Jun Furuse
2014-10-13 13:56 ` Peter Zotov [this message]
2014-10-13 14:54 ` Alain Frisch
2014-10-14 13:08 ` Jun Furuse
2014-10-14 14:55 ` Peter Zotov
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=8d73ce9dd0bb6d400565617d992736b5@whitequark.org \
--to=whitequark@whitequark.org \
--cc=caml-list-request@inria.fr \
--cc=caml-list@inria.fr \
--cc=jun.furuse@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