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 mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by sympa.inria.fr (Postfix) with ESMTPS id 38B707EE36 for ; Wed, 23 Mar 2016 17:39:59 +0100 (CET) X-IronPort-AV: E=Sophos;i="5.24,383,1454972400"; d="scan'208";a="170435973" Received: from meleze.ens.fr (HELO [129.199.99.114]) ([129.199.99.114]) by mail3-relais-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES128-SHA; 23 Mar 2016 17:39:52 +0100 To: caml-list@inria.fr From: Francois Berenger Message-ID: <56F2C6D7.3080707@inria.fr> Date: Wed, 23 Mar 2016 17:39:51 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Subject: [Caml-list] Is it possible to get back some OCaml code after ppx processing ? 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.