ocaml - How can I see the result Camlp4's preprocessing? -


After

I am using the Sexplib syntax extension in a file called module.ml , and I would like to see the code to be compiled after the camel-4 preprocessing in the compiler. Is there an easy way to do this using ocamlfind or not?

This production

  $ camlp4o` ocamlfind query type_conv` / pa_type_conv.cma `ocamlfind query sexplib` / pa_sexp_conv.cma /home/kakadu/.opam/4.01.0/lib / ocaml / camlp4 / Camlp4Printers /Camlp4OCamlPrinter.cmo a.ml | PR-T-O4 type T = (int * string) let _ = fun (_: t) - & gt; (__t_of_sexp__ = Enter _tp_loc = "a.ml.t" in the function). Sexpleb Sexp.List ([v1; v2]) - & gt; Let v1 = int_of_sexp v1 and v2 = string_of_sexp v2 in (v1, v2) | Sexuality - & gt; Sexplib.Conv_error.tuple_of_size_n_expected _tp_loc 2 sexp go _ = __t_of_sexp__ to t_of_sexp sexp = with __t_of_sexp__ sexp try | Sexplib.Conv_error.No_variant_match ((_tp_loc, sexp)) - & gt; Sexplib.Conv_error.no_matching_variant_found _tp_loc sexp let_ = t_of_sexp Let sexp_of_t (v1, v2) = Let v1 = sexp_of_int v1 and v2 = sexp_of_string Sexplib.Sexp.List [v1 to v2; V2] Let _ = sexp_of_t  

for this source

  $ cat a.ml type t = int * sexp with string  < / Pre> 

Comments