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 mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by sympa.inria.fr (Postfix) with ESMTPS id 6DD8B7ED7A for ; Tue, 2 Oct 2012 00:45:18 +0200 (CEST) Received-SPF: None (mail1-smtp-roc.national.inria.fr: no sender authenticity information available from domain of anil@recoil.org) identity=pra; client-ip=89.16.177.154; receiver=mail1-smtp-roc.national.inria.fr; envelope-from="anil@recoil.org"; x-sender="anil@recoil.org"; x-conformance=sidf_compatible Received-SPF: None (mail1-smtp-roc.national.inria.fr: no sender authenticity information available from domain of anil@recoil.org) identity=mailfrom; client-ip=89.16.177.154; receiver=mail1-smtp-roc.national.inria.fr; envelope-from="anil@recoil.org"; x-sender="anil@recoil.org"; x-conformance=sidf_compatible Received-SPF: None (mail1-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@dark.recoil.org) identity=helo; client-ip=89.16.177.154; receiver=mail1-smtp-roc.national.inria.fr; envelope-from="anil@recoil.org"; x-sender="postmaster@dark.recoil.org"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AmsCAGkcalBZELGagWdsb2JhbAArGqxEkikBARYmJ4IgAQEEATo0CwULCxgNISEkEgYTEodhAwkKByyvRQMKiVSKPWKFa2ADiFiLPIFVgRWKC4gS X-IronPort-AV: E=Sophos;i="4.80,519,1344204000"; d="scan'208";a="175351601" Received: from recoil.dh.bytemark.co.uk (HELO dark.recoil.org) ([89.16.177.154]) by mail1-smtp-roc.national.inria.fr with SMTP; 02 Oct 2012 00:45:17 +0200 Received: (qmail 4871 invoked by uid 634); 1 Oct 2012 22:45:14 -0000 X-Spam-Level: * X-Spam-Check-By: dark.recoil.org Received: from 192-5-67-11.sri.com (HELO [10.255.242.49]) (192.5.67.11) (smtp-auth username remote@recoil.org, mechanism cram-md5) by dark.recoil.org (qpsmtpd/0.84) with ESMTPA; Mon, 01 Oct 2012 23:45:13 +0100 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 6.1 \(1498\)) From: Anil Madhavapeddy In-Reply-To: Date: Mon, 1 Oct 2012 15:45:10 -0700 Cc: Philippe Veber , caml users Content-Transfer-Encoding: quoted-printable Message-Id: <5149DC70-C455-4BA1-AE3F-8A8CC5B6111C@recoil.org> References: To: Jeremy Yallop X-Mailer: Apple Mail (2.1498) X-Virus-Checked: Checked by ClamAV on dark.recoil.org Subject: Re: [Caml-list] Strange camlp4 issue Another reason it might be going wrong is that your quotations are generating invalid ASTs. This can happen when using the original syntax quotations (which are more ambiguous than the revised syntax). To get around this sort of problem, I tend to use the 'camlp4orf' variant, which uses the original syntax as the host language, and revised syntax for quotations. This will mean that you need to learn the revised syntax for the sole goal of writing quotations, but it is actually quite pleasant to use (and certainly more fun than staring at dumps of raw AST fragments). -anil On 1 Oct 2012, at 15:39, Jeremy Yallop wrote: > Dear Philippe, >=20 > On 1 October 2012 17:21, Philippe Veber wrote: >> let _ =3D (a7818b19c#compound : Rbase.compound 'abdf8= 9974) >=20 > This appears to be the line where things are going wrong. > Rbase.compound 'abdf89974 is not a valid type in original (i.e. > standard) OCaml syntax, but is valid in the revised syntax. It may be > that you're using the wrong camlp4 executable somewhere along the > line: for example, using quotations for revised syntax in your > extension, but building the extension using an original-syntax based > executable such as camlp4o. There's a handy guide to the various > camlp4 executables on the wiki: >=20 > http://brion.inria.fr/gallium/index.php/Using_Camlp4#Camlp4_executables_f= unctionalities >=20 > You're seeing different error-reporting behaviour depending on whether > you redirect the file because camlp4 checks whether it's printing to a > terminal when deciding whether to print textual or binary output by > default: >=20 > http://caml.inria.fr/svn/ocaml/trunk/camlp4/Camlp4Printers/Camlp4AutoPrin= ter.ml >=20 > Hope that helps a bit, >=20 > Jeremy. >=20 > --=20 > Caml-list mailing list. Subscription management and archives: > https://sympa.inria.fr/sympa/arc/caml-list > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners > Bug reports: http://caml.inria.fr/bin/caml-bugs >=20