From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 91C78800B6 for ; Wed, 4 Jan 2017 16:58:00 +0100 (CET) X-IronPort-AV: E=Sophos;i="5.33,459,1477954800"; d="scan'208";a="206953792" Received: from dt-64014.paris.inria.fr (HELO [128.93.64.14]) ([128.93.64.14]) by mail3-relais-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES128-SHA; 04 Jan 2017 16:58:00 +0100 To: =?UTF-8?Q?Christoph_H=c3=b6ger?= , caml users References: <9576980c-9aad-4af2-e512-dc9c42743cf2@inria.fr> From: =?UTF-8?Q?Fran=c3=a7ois_Pottier?= Message-ID: <557e41cc-0805-997b-6ec9-8da7c3cc3352@inria.fr> Date: Wed, 4 Jan 2017 16:58:00 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Subject: Re: [Caml-list] ppx_deriving question: deferring code generation? Dear Christoph, On 04/01/2017 14:53, Christoph Höger wrote: > Just out of curiosity, what does "vistors" do? If it resembles the usual > Visitor Pattern you might find my ppx_deriving_morphism useful: Interesting -- thanks for your reply. Although I did search for related ppx plugins, I did not find yours. At a glance, my plugin seems broadly analogous to yours; it also generates "iter" (= "fold") and "map" visitors. It differs superficially in that it uses OCaml objects instead of OCaml records. It differs perhaps more deeply in that the generated code can have more varied types, beyond your "map_routine" and "fold_routine". But I need to experiment more, and write more documentation, before making a public release. -- François Pottier francois.pottier@inria.fr http://gallium.inria.fr/~fpottier/