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 AC5727FA1F for ; Fri, 11 Jul 2014 18:07:23 +0200 (CEST) Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of benjamin.canou@gmail.com) identity=pra; client-ip=74.125.82.176; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="benjamin.canou@gmail.com"; x-sender="benjamin.canou@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail3-smtp-sop.national.inria.fr: domain of benjamin.canou@gmail.com designates 74.125.82.176 as permitted sender) identity=mailfrom; client-ip=74.125.82.176; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="benjamin.canou@gmail.com"; x-sender="benjamin.canou@gmail.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-we0-f176.google.com) identity=helo; client-ip=74.125.82.176; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="benjamin.canou@gmail.com"; x-sender="postmaster@mail-we0-f176.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AjYBAIEKwFNKfVKwlGdsb2JhbABZgmqEQcVMAYELFg8BAQEBBwsLCRIqhAQBAQQSEQ8BBQgBGxwBAQMMBgULDwIFFgsCAgkDAgECARERAQUBHAYNAQcCHogLAQMRAQShP2qLJ4FygxCMDgoZJw1khjQRAQUOgR6OHQeCd4FMAQSbBZIrQYR2 X-IPAS-Result: AjYBAIEKwFNKfVKwlGdsb2JhbABZgmqEQcVMAYELFg8BAQEBBwsLCRIqhAQBAQQSEQ8BBQgBGxwBAQMMBgULDwIFFgsCAgkDAgECARERAQUBHAYNAQcCHogLAQMRAQShP2qLJ4FygxCMDgoZJw1khjQRAQUOgR6OHQeCd4FMAQSbBZIrQYR2 X-IronPort-AV: E=Sophos;i="5.01,644,1400018400"; d="scan'208";a="71114042" Received: from mail-we0-f176.google.com ([74.125.82.176]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/RC4-SHA; 11 Jul 2014 18:07:23 +0200 Received: by mail-we0-f176.google.com with SMTP id u56so1304182wes.35 for ; Fri, 11 Jul 2014 09:07:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=OCdwYM+KdIagkGtyiTVA2HdYKdIHdM4bMX5u354WnDg=; b=g07gRXMyD1lg5RCmRHwQ//vrxYGRJOuo7chdQrP4ZVWD6B4Llz8TumB+II6PlS1BYG Wku37mnFq8PM3on8wVKouxK1UhFmrmL6O9870IqdRzP7B5qgYAnyyRP1ai/Y5atc6jXX tO959UlY7hKAd79PPVVnUpFVu+WFybbesMqIp0EVVR97tAaAWa4KiND4Ve4W/8Jf2A2c JfAnAUbbykE4hZzlFUw0eK0zuTFzyRRoe64/qsmKs7TkjK6NB3eyE+MBRFIL/MK4nNnO z8zPSCAqGG0qBV2VdJHvsn41p0dLMy3o1wj3CA6Jh+VA3lKAxtrfgWrAzvpYFfCddJYy zb3A== X-Received: by 10.194.185.113 with SMTP id fb17mr22760923wjc.117.1405094418085; Fri, 11 Jul 2014 09:00:18 -0700 (PDT) Received: from ?IPv6:2001:660:3013:3:9eb6:54ff:fea5:8a99? ([2001:660:3013:3:9eb6:54ff:fea5:8a99]) by mx.google.com with ESMTPSA id jb16sm8849908wic.10.2014.07.11.09.00.16 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 11 Jul 2014 09:00:17 -0700 (PDT) Message-ID: <53C00A10.5090008@gmail.com> Date: Fri, 11 Jul 2014 18:00:16 +0200 From: Benjamin Canou User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:30.0) Gecko/20100101 Icedove/30.0 MIME-Version: 1.0 To: =?UTF-8?B?RGFuaWVsIELDvG56bGk=?= CC: caml-list@inria.fr References: <53BFE73E.6060106@gmail.com> <1F6CA9F698BB4509800C3FD280CE0ACB@erratique.ch> <53BFFADD.8030906@gmail.com> <9EF0E2E1119A470493E366AE6E7BF5F6@erratique.ch> In-Reply-To: <9EF0E2E1119A470493E366AE6E7BF5F6@erratique.ch> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Subject: Re: [Caml-list] proposal for finding, loading and composing ppx preprocessors Le 11/07/2014 17:23, Daniel Bünzli a écrit : > Le vendredi, 11 juillet 2014 à 15:55, Benjamin Canou a écrit : >> Sure, the annotation mechanism itself is the core of what we propose. >> The ppx_loader is just a convenience utility to interpret them fully >> automatically. The tool you propose is another valid way to use them. >> We'll integrate it into ppx_loader as another option. > But if I understand correctly ppx_loader selectively applies ppxs on AST subparts (?). If that the case you won't be able to provide matching functionality by simply listing the ppx to use on the command line, which would apply each ppx on the whole file. True enough. We could force the annotations to be placed at the beginning of files. After all, the interest of selectively applying ppxs to parts of files is not clear. The responsibility of deciding which parts to rewrite probably belongs to each ppx and not ppx_loader.