[wg-camlp4] About 'a loc in the Parsetree
Alain Frisch
alain.frisch at lexifi.com
Thu Apr 4 19:34:54 BST 2013
On 4/4/2013 4:51 PM, Gabriel Scherer wrote:
> (How good is your coverage of the existing codebase, in the
> distribution, that depends on the parsetree and typedtree structure?
> There is Camlp4 of course, and in this case I think you could easily
> make it compatible to your changes.
"make world opt opt.opt" is ok. It means in particular that Camlp4 has
been minimally adapted to target the revised Parsetree only; it hasn't
been extended to support new syntactic features in its parser and own
representation of the OCaml AST. As I mentioned in my email to
wg-camlp4 (not caml-devel), any help in updating Camlp4 will be much
appreciated, and I think it's better to work on this quite soon in order
to evaluate possible migration plans and inter-operation between camlp4
and ppx + extension_points. For instance, if Jane Street starts porting
some of their extensions to ppx in order to experiment with
extension_points and provide feedback, they will need camlp4 to support
attributes/extensions to be able to apply those ppx filters to their
real code base, which also depends on other camlp4 extensions.
Ocamldoc compiles but I haven't tried it. Maybe it works fine, maybe it
needs to be adapted to report in a clean way new features. Also even
without big refactoring plans, it would probably be easy to have it
support attributes in addition to the current syntax for comments (thus
making it possible for -ppx rewriters to generate documentations snippet).
> I am a bit more worried about the
> not-clearly-defined stuff that was added with bin-annot, (printing
> typedtree and stuff), some of which in tools/, some in other places,
> that I'm not sure are all exercised or even compiled by the usual
> "make world.opt" drill.)
pprintast (the pretty-printer of the Parsetree in "source syntax")
compiles but fails on or does not print properly new constructions.
I'm not aware of other new fancy stuff depending on the Parsetree.
Alain
More information about the wg-camlp4
mailing list