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 49D967F84F for ; Thu, 27 Feb 2014 09:34:37 +0100 (CET) Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of olivier.levillain@ssi.gouv.fr) identity=pra; client-ip=86.65.182.16; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="olivier.levillain@ssi.gouv.fr"; x-sender="olivier.levillain@ssi.gouv.fr"; x-conformance=sidf_compatible Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of olivier.levillain@ssi.gouv.fr) identity=mailfrom; client-ip=86.65.182.16; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="olivier.levillain@ssi.gouv.fr"; x-sender="olivier.levillain@ssi.gouv.fr"; x-conformance=sidf_compatible Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@smtp.ssi.gouv.fr) identity=helo; client-ip=86.65.182.16; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="olivier.levillain@ssi.gouv.fr"; x-sender="postmaster@smtp.ssi.gouv.fr"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AsIBAF33DlNWQbYQl2dsb2JhbABaxRYKgRUWDgEBAQEBCBYHPIIlAQEEAXgGCwshFg8JAwIBAgFFiAoMyjQXjlsWhCEEnmuEIIsEOw X-IPAS-Result: AsIBAF33DlNWQbYQl2dsb2JhbABaxRYKgRUWDgEBAQEBCBYHPIIlAQEEAXgGCwshFg8JAwIBAgFFiAoMyjQXjlsWhCEEnmuEIIsEOw X-IronPort-AV: E=Sophos;i="4.97,553,1389740400"; d="scan'208";a="50687101" Received: from smtp.ssi.gouv.fr ([86.65.182.16]) by mail3-smtp-sop.national.inria.fr with ESMTP; 27 Feb 2014 09:34:36 +0100 Received: from smtp-switch.internet.local (smtp-switch [192.168.3.9]) by smtp.ssi.gouv.fr (Postfix) with ESMTP id 8FD7490B845 for ; Thu, 27 Feb 2014 09:34:35 +0100 (CET) Message-ID: <530EF89B.5080900@ssi.gouv.fr> Date: Thu, 27 Feb 2014 09:34:35 +0100 From: Olivier Levillain User-Agent: MIME-Version: 1.0 To: caml-list@inria.fr References: In-Reply-To: X-Enigmail-Version: 1.6 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Validation-by: olivier.levillain@ssi.gouv.fr Subject: Re: [Caml-list] camlp4 for js_of_ocaml toplevels 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