Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: Peter Zotov <whitequark@whitequark.org>
To: Andy Ray <andy.ray@ujamjar.com>
Cc: Ocaml Mailing List <caml-list@inria.fr>, caml-list-request@inria.fr
Subject: Re: [Caml-list] Static linking of ppx for iocamljs notebooks
Date: Sat, 10 Jan 2015 07:33:52 +0300	[thread overview]
Message-ID: <9ec6055cb59fb4240dfd8549618b0be7@whitequark.org> (raw)
In-Reply-To: <CAHYOizEhm2oVbeRPUXxQJ40SSa4AgqDmVYao32Y3E9a-PAN+zg@mail.gmail.com>

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

      reply	other threads:[~2015-01-10  4:33 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-10  2:12 Andy Ray
2015-01-10  4:33 ` Peter Zotov [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9ec6055cb59fb4240dfd8549618b0be7@whitequark.org \
    --to=whitequark@whitequark.org \
    --cc=andy.ray@ujamjar.com \
    --cc=caml-list-request@inria.fr \
    --cc=caml-list@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox