ocamlcamlp4

How to review code generated by camlp4


I'm using a syntax extension and would like to know if it's possible to output the generated code in some way.

I would rather avoid putting debug traces in the extension since I'm not the developer and doesn't know anything to camlp4.


Solution

  • When using syntax extensions (camlp4, ppx, ...) you can show the generated output using the -dsource option of the compiler.