'ocamlc -i' should work too.On Wed, Mar 23, 2016 at 06:02:49PM +0100, Louis Roché wrote:
> Hi,
>
> 1) With utop, you will get what you want:
>
> utop # type t = {
> i: int;
> f: float
> } [@@deriving eq,show];;
> type t = { i : int; f : float; }
> val equal : t -> t -> bool = <fun>
> val pp : Format.formatter -> t -> unit = <fun>
> val show : t -> bytes = <fun>
>
> 2) I believe that you are looking for an option like -dsource for ocamlc
>
> Louis
>
>
> 2016-03-23 17:39 GMT+01:00 Francois Berenger <francois.berenger@inria.fr>:
>
> > 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.
MfG
Goswin
--
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