ocamlbyexample icon indicating copy to clipboard operation
ocamlbyexample copied to clipboard

chapter: ppx

Open mimoo opened this issue 3 years ago • 3 comments

you can dump any AST by doing ocamlfind ppx_tools/dumpast your_file.ml

mimoo avatar Nov 05 '22 05:11 mimoo

or ocamlfind ppx_tools/dumpast -e "1 + 1" (from https://tarides.com/blog/2019-05-09-an-introduction-to-ocaml-ppx-ecosystem)

Similarly, you can use the -t or -p options to respectively pretty print ASTs from type expressions or patterns.

mimoo avatar Nov 05 '22 05:11 mimoo

Screenshot 2022-12-13 at 12 43 02 AM

(https://ocaml-ppx.github.io/ppxlib/ppxlib/manual.html#what-is-ppx)

mimoo avatar Dec 13 '22 08:12 mimoo

started here: https://github.com/o1-labs/ocamlbyexample/commit/7c6a95ddc67b6dd827172e87c735a95ed97f53dc

mimoo avatar Jan 04 '23 04:01 mimoo