From: "Nicolas Pouillard" <nicolas.pouillard@gmail.com>
To: "Hezekiah M. Carty" <hcarty@atmos.umd.edu>
Cc: Richard Jones <rich@annexia.org>,
Jeremy Yallop <jeremy.yallop@ed.ac.uk>,
caml-list <caml-list@inria.fr>
Subject: Re: [Caml-list] Custom lexer in Camlp4
Date: Tue, 24 Jun 2008 17:54:26 +0200 [thread overview]
Message-ID: <1214322840-sup-3113@port-ext16.ensta.fr> (raw)
In-Reply-To: <3a360f590806240843o3c13ba0dpf5553f49e2355464@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1097 bytes --]
Excerpts from Hezekiah M. Carty's message of Tue Jun 24 17:43:52 +0200 2008:
> On Tue, Jun 24, 2008 at 11:16 AM, Richard Jones <rich@annexia.org> wrote:
> > On Tue, Jun 24, 2008 at 03:30:23PM +0100, Jeremy Yallop wrote:
> > On a related note I had a crazy brainwave that we could use camlp4 to
> > use 'ordinary' operators in an overloaded context. Something like:
> >
> > INT64 (2L * n / 3L)
> >
> > The INT64(expr) macro would inspect the AST of expr and change + ->
> > Int64.add etc. Of course one can do this using the pa_openin macro
> > and a module which overrides (+) etc, but maybe this is better? I was
> > going to try modifying parts of virt-df to use this syntax to see if
> > it would be beneficial.
>
> I toyed around with a simple extension to the pa_float example on the
> camlp4 wiki. The modified version is here:
[...]
> Sadly camlp4 3.10+ does not play well with the toplevel, so these are
> difficult to work with interactively. I do use pa_context in several
> places though, and it seems to work well.
Can you elaborate on that?
--
Nicolas Pouillard aka Ertai
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 194 bytes --]
next prev parent reply other threads:[~2008-06-24 15:55 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-24 13:03 Jeremy Yallop
2008-06-24 14:32 ` [Caml-list] " Nicolas Pouillard
2008-06-24 14:30 ` Jeremy Yallop
2008-06-24 15:16 ` Richard Jones
2008-06-24 15:43 ` Hezekiah M. Carty
2008-06-24 15:54 ` Nicolas Pouillard [this message]
2008-06-24 16:04 ` Hezekiah M. Carty
2008-06-24 16:59 ` Yaron Minsky
2008-06-25 8:41 ` Richard Jones
2008-06-25 9:17 ` Christophe TROESTLER
2008-06-24 15:37 ` Nicolas Pouillard
2008-06-24 15:43 ` Andrej Bauer
2008-06-25 11:53 ` Jeremy Yallop
2008-06-25 12:16 ` Nicolas Pouillard
2008-06-24 16:07 ` Pietro Abate
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=1214322840-sup-3113@port-ext16.ensta.fr \
--to=nicolas.pouillard@gmail.com \
--cc=caml-list@inria.fr \
--cc=hcarty@atmos.umd.edu \
--cc=jeremy.yallop@ed.ac.uk \
--cc=rich@annexia.org \
/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