caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Olivier Levillain <olivier.levillain@ssi.gouv.fr>
To: caml-list@inria.fr
Subject: Re: [Caml-list] camlp4 for js_of_ocaml toplevels
Date: Thu, 27 Feb 2014 09:34:35 +0100	[thread overview]
Message-ID: <530EF89B.5080900@ssi.gouv.fr> (raw)
In-Reply-To: <CAHYOizGtocS17dt8FcEo9QmOCZvA=Kzoknekk7a4QvbhVgftFA@mail.gmail.com>

Hi,

> One thing I noticed was when I (accidentally) had unix_isatty
> returning false, and presumably camlp4 attempting to marshal a
> compiler ast the js_of_ocaml runtime would die with a JSON error.  I
> presume this is an issue with js_of_ocaml's marshalling code?

I think I recently stumbled on this one: the default camlp4 printer is
"auto", which prints text when stdout is a tty and binary AST when it is
not. To force the text or AST setting, you should use the -printer
option of camlp4, with either "Camlp4OCamlPrinter" (text) or
"Camlp4OCamlAstDumper" parameter.

The name of the available printers correspond to files in the
/usr/lib/ocaml/camlp4/Camlp4Printers (on Debian).

Sorry for the noise if I'm wrong.

Regards,
Olivier Levillain

      parent reply	other threads:[~2014-02-27  8:34 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-22  3:07 Andy Ray
2014-02-23 20:18 ` Anil Madhavapeddy
2014-02-24 17:55   ` Andy Ray
2014-02-24 23:31     ` Anil Madhavapeddy
2014-02-27  8:34     ` Olivier Levillain [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=530EF89B.5080900@ssi.gouv.fr \
    --to=olivier.levillain@ssi.gouv.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;
as well as URLs for NNTP newsgroup(s).