Hi Francois, You can use ppx_tools (https://github.com/alainfrisch/ppx_tools) to do it: ocamlfind ppx_tools/rewriter ./my_ppx_rewriter foo.ml Cheers, Nicolas On Wed, Mar 23, 2016 at 5:39 PM, Francois Berenger < francois.berenger@inria.fr> wrote: > Dear list, > > I am completely new to the -ppx option of the compiler, so please > forgive in advance my (probably stupid) two questions. > > Here is some example code: > --- > type t = { > i: int; > f: float > } [@@deriving sexp] > --- > > 1) I'd like to see all the functions automatically created > by the magical spell "[@@deriving sexp]". > At least their names and type signatures would be nice. > How to do that? > > 2) If that's not possible, I'd like to get back some > OCaml code corresponding to the AST after ppx processing. > If that's possible, how to do that? > > Thanks a lot, > Francois. > > -- > Caml-list mailing list. Subscription management and archives: > https://sympa.inria.fr/sympa/arc/caml-list > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners > Bug reports: http://caml.inria.fr/bin/caml-bugs >