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 811817FBC5; Sat, 10 Jan 2015 05:33:55 +0100 (CET) Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of whitequark@whitequark.org) identity=pra; client-ip=176.58.103.125; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="whitequark@whitequark.org"; x-sender="whitequark@whitequark.org"; x-conformance=sidf_compatible Received-SPF: Pass (mail3-smtp-sop.national.inria.fr: domain of whitequark@whitequark.org designates 176.58.103.125 as permitted sender) identity=mailfrom; client-ip=176.58.103.125; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="whitequark@whitequark.org"; x-sender="whitequark@whitequark.org"; 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.whitequark.org) identity=helo; client-ip=176.58.103.125; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="whitequark@whitequark.org"; x-sender="postmaster@mail.whitequark.org"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AkULANeqsFSwOmd9/2dsb2JhbABchmaFUKs4AgEBBpVigk8CgVoBAQEBAX2EDQEFOAI/EAQHGC4sKwYbiCjKIAEBAQcCAR+GBYNshggHhCkBBIlfiiKVNiKDcTuCdAEBAQ X-IPAS-Result: AkULANeqsFSwOmd9/2dsb2JhbABchmaFUKs4AgEBBpVigk8CgVoBAQEBAX2EDQEFOAI/EAQHGC4sKwYbiCjKIAEBAQcCAR+GBYNshggHhCkBBIlfiiKVNiKDcTuCdAEBAQ X-IronPort-AV: E=Sophos;i="5.07,735,1413237600"; d="scan'208";a="95930758" Received: from fehu.whitequark.org (HELO mail.whitequark.org) ([176.58.103.125]) by mail3-smtp-sop.national.inria.fr with ESMTP; 10 Jan 2015 05:33:54 +0100 Received: by mail.whitequark.org (Postfix, from userid 33) id 0780A10C1EA; Sat, 10 Jan 2015 04:33:52 +0000 (UTC) To: Andy Ray X-PHP-Originating-Script: 1000:rcube.php MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Sat, 10 Jan 2015 07:33:52 +0300 From: Peter Zotov Cc: Ocaml Mailing List , caml-list-request@inria.fr In-Reply-To: References: Message-ID: <9ec6055cb59fb4240dfd8549618b0be7@whitequark.org> X-Sender: whitequark@whitequark.org User-Agent: Roundcube Webmail/1.1-beta Subject: Re: [Caml-list] Static linking of ppx for iocamljs notebooks On 2015-01-10 05:12, Andy Ray wrote: > Hi, > > Is it possible to statically link and initialise a ppx filter before > an OCaml top level runs? This is needed for IOCaml in it's javascript > variant. > > Also, is there a general set of files that should be installed in > order for ppx to work for us static linker types? Hi, Currently, ppx in the compiler is hardcoded to invoke external processes, see Pparse.apply_rewriter. However, it is possible to work around that by overriding: * Ast_mapper.register_function, to remember the mapper structure, * and Toploop.preprocess_phrase, to apply the mapper to the incoming phrase. -- Peter Zotov