From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by sympa.inria.fr (Postfix) with ESMTPS id BBDAA7EE36 for ; Thu, 24 Mar 2016 10:27:24 +0100 (CET) IronPort-PHdr: 9a23:BRajkRyDYS4friTXCy+O+j09IxM/srCxBDY+r6Qd0e4SIJqq85mqBkHD//Il1AaPBtWLrasbwLON6OjJYi8p39WoiDg6aptCVhsI2409vjcLJ4q7M3D9N+PgdCcgHc5PBxdP9nC/NlVJSo6lPwWB6kO74TNaIBjjLw09fr2zQd6CyZ3onLnpoNX6WEZhunmUWftKNhK4rAHc5IE9oLBJDeIP8CbPuWZCYO9MxGlldhq5lhf44dqsrtY4q3wD86Fpy8kVWqz/e+E8TKdEJDUgKWE8osPx5jfZSg7ayXwHTWQQ2gRPBUDv9hz2U431tTSy4uV6wzabO4joCLocRjmoqatmHky7wBwbPiI0pTmEwvd7i7hW9Uqs Authentication-Results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=goswin-v-b@web.de; spf=Pass smtp.mailfrom=goswin-v-b@web.de; spf=None smtp.helo=postmaster@mout.web.de Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of goswin-v-b@web.de) identity=pra; client-ip=212.227.15.14; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="goswin-v-b@web.de"; x-sender="goswin-v-b@web.de"; x-conformance=sidf_compatible Received-SPF: Pass (mail2-smtp-roc.national.inria.fr: domain of goswin-v-b@web.de designates 212.227.15.14 as permitted sender) identity=mailfrom; client-ip=212.227.15.14; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="goswin-v-b@web.de"; x-sender="goswin-v-b@web.de"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@mout.web.de) identity=helo; client-ip=212.227.15.14; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="goswin-v-b@web.de"; x-sender="postmaster@mout.web.de"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0BVAwDxsfNWkw4P49RehQOoNoosiWyGDQKBMjwQAQEBAQEBAQEQAQEBAQcNCQkhL0EBAQMLAoFaghUBAQQnCwFWCxgJJQ8FKDSIEQEVBLtNH4UyAQEIAQEBARyKYoUIgl+CKwWXXo16gXCETIJ3CoVYjwk3gisUCBSBNmuBDTqIDQEBAQ X-IPAS-Result: A0BVAwDxsfNWkw4P49RehQOoNoosiWyGDQKBMjwQAQEBAQEBAQEQAQEBAQcNCQkhL0EBAQMLAoFaghUBAQQnCwFWCxgJJQ8FKDSIEQEVBLtNH4UyAQEIAQEBARyKYoUIgl+CKwWXXo16gXCETIJ3CoVYjwk3gisUCBSBNmuBDTqIDQEBAQ X-IronPort-AV: E=Sophos;i="5.24,384,1454972400"; d="scan'208";a="209905952" Received: from mout.web.de ([212.227.15.14]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 24 Mar 2016 10:27:16 +0100 Received: from frosties.localnet ([134.3.242.84]) by smtp.web.de (mrweb001) with ESMTPSA (Nemesis) id 0LakkS-1a33wx2tei-00kOiZ for ; Thu, 24 Mar 2016 10:27:15 +0100 Received: from mrvn by frosties.localnet with local (Exim 4.84) (envelope-from ) id 1aj1Xu-00006S-UW for caml-list@inria.fr; Thu, 24 Mar 2016 10:27:15 +0100 Date: Thu, 24 Mar 2016 10:27:14 +0100 From: Goswin von Brederlow To: caml-list@inria.fr Message-ID: <20160324092714.GA32689@frosties> References: <56F2C6D7.3080707@inria.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-Provags-ID: V03:K0:w0syxovIZPBVXTQ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] Is it possible to get back some OCaml code after ppx processing ? 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 = > val pp : Format.formatter -> t -> unit = > val show : t -> bytes = > > 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 : > > > 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. 'ocamlc -i' should work too. MfG Goswin