[wg-camlp4] [Caml-list] Working Group: the future of syntax extensions in OCaml, after camlp4
DooMeeR
puyo at doomeer.com
Tue Jan 29 09:33:07 GMT 2013
> Assuming it is indeed technically possible, do you think it would be a
> good idea to merge the syntactic categories of patterns and expressions?
Not only would it be useful for -ppx, it would probably help to produce
better error messages as well. A message like "you cannot use { f = …; _
} in expressions, this is only for patterns" is a bit better than "parse
error"…
Not that we cannot do that already with additional rules in the parser,
but after a merge, the type-checker would kind of be forced to handle
these cases. (Unless it uses a catch-all.)
Cheers,
--
Romain Bardou
More information about the wg-camlp4
mailing list