From: Jeff Henrikson <jehenrik@yahoo.com>
To: nicolas.pouillard@gmail.com, caml-list@inria.fr
Subject: camlp4 beta
Date: Mon, 29 May 2006 13:52:41 -0700 [thread overview]
Message-ID: <447B5F19.4080708@yahoo.com> (raw)
Hello,
Glad to see camlp4 getting an upgrade. I have written several simple
extensions in the old camlp4 but I can't seem to make your new examples
work:
http://gallium.inria.fr/~pouillar/camlp4-changes.html
Is the beta currently capable of running in a toplevel? I downloaded
the 3.10+... tarball, compiled and installed, and ran various
permutations of:
#load "camlp4o.cma";;
#directory "+camlp4";;
#directory "+camlp4/Camlp4Top";;
#directory "+camlp4/Camlp4Parsers";;
#load "Camlp4Top.cmo";;
#load "grammar.cmo";;
#load "Camlp4o.cmo";;
open Camlp4.Entry;;
open Camlp4.Grammar;;
open Camlp4.PreCast;;
open Syntax;;
And then ran each example. I have no idea what I'm doing here with all
the directories and uppercase filenames. I thought ocaml broke weirdly
with leading upper case filenames. Example problem I am having with
with dynamic_old_syntax.ml Unbound identifier Entry.mk. I can't find
how to load the new definition of Entry.mk. In the old ocaml you just
needed #load "camlp4o.cma" I believe.
Are all the code examples *supposed* to run? It's not clear by simple
visual inspection of the doc some of them are only for the old
framework. Then there's that (...) notation, which looks like "put
special module here". Being literal in the docs about which examples
run, and which don't is a necessity, IMHO. Also, if applicable, their
respective camlp4 versions and a list of any code additions which are
necessary to get the examples to run.
A weakness of the old camlp4 was just getting it configured. I like the
-printer -filter, etc switches are the right direction. But I mostly
write my macros in the toplevel. Some simple "enter these lines into
the toplevel and it will work" examples might be in order?
As far as architectural choices, and I can't tell if you've handled this
without actually running your exmaples and making sense of them, I would
like the ability to quote/print *unexpanded* macros. This was not to my
knowledge possible in the old camlp4. For example, if I extend the
traditional caml syntax with a for loop, even though I am defining for
in terms of a transformation to regular caml, I want to be able to read
a block of text into an AST with a production for the for loop. A
killer app would be an eclipse plugin which could indent all possible
Camlp4 grammars. Not only would there finally be support for revised
syntax, but removing the emacs mode as the only supported indenting
could significantly expand the ocaml community. At my last job I was
giving an ocaml tutorial to a non-emacsy coworker, and at the point
where it got to all the bizarre emacs lore hotkeys, I had this feeling
like *why* do I bother. And Eclipse support for each new DSL that I do,
for free? That would be amazing.
Sorry for taking a couple of weeks to take a look. Best wishes
finishing up your internship.
Jeff Henrikson
reply other threads:[~2006-05-29 20:45 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=447B5F19.4080708@yahoo.com \
--to=jehenrik@yahoo.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).