ppx and extension points.

Alain Frisch

The release of OCaml 4.02 is approaching and amongst many other new stuff, it will include the work on -ppx and extension points, supporting light-weight syntactic tools (without Camlp4).

This effort was coordinated with the OCaml community through the [wg-camlp4] (http://lists.ocaml.org/listinfo/wg-camlp4) mailing list, and now it is very enjoyable to see the community starting to make good use of these new features. In this post, I wanted to collect pointers to blogs and projects making use of extension points. They could serve as starting point for people who want to learn more about extension points and see them in action. Please comment if you want to add to the list!

Blog posts around extension points

You might also want to read the nice talk at OCaml 2013 about extension points by Leo White (Leo was a co-moderator of wg-camlp4 and a key contributor to the effort).

Projects using extension points

  • Findlib is being extended to support -ppx.

  • Bisect has support for -ppx.

  • ppx_protobuf an OCaml codec generator for Google Protocol Buffers.

  • ppx_deriving a library simplifying type-driven code generation.

  • Labqt has now a ppx-based syntactic support.

  • lwt seems to be gaining a very nice syntactic support based on extension points (in addition to the Camp4 syntax extension).

  • sedlex, the successor of ulex based on extension points instead of Camlp4.

  • ppx_tools, a collection of tools to help authors of syntactic tools.

And hopefully more to come…