From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by walapai.inria.fr (8.13.6/8.13.6) with ESMTP id p2QB7tvS030211 for ; Sat, 26 Mar 2011 12:07:55 +0100 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AocDADHIjU3RVdQ2kGdsb2JhbACYY4x2CBQBAQEBCQkNBxQEIagrilSCIYRpL4hcAQEDBYVkBIx1iQo6 X-IronPort-AV: E=Sophos;i="4.63,247,1299452400"; d="scan'208";a="91271952" Received: from mail-vw0-f54.google.com ([209.85.212.54]) by mail4-smtp-sop.national.inria.fr with ESMTP/TLS/RC4-SHA; 26 Mar 2011 12:07:49 +0100 Received: by vws18 with SMTP id 18so2516388vws.27 for ; Sat, 26 Mar 2011 04:07:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:date:message-id:subject:from:to :content-type; bh=nZIawb3EprIh8c5m+jXPX4HjoSOnKMUWb1KF1KIHCqo=; b=w6u2FBVFalpxKMTuUIR8L/nh0QcR0IDXrIjiBL7KOMgNU2tThcwY5gm3Hi+VyvAleQ NF/J8VpTFt/PhjXhwcgsKUlT0ygCUe6qjp0S+RIU51jPMuURK12moct8uzoqAT+Wzbu6 BeXXiQceG3GDauLr2q5UPWkGiGh0FtLrarsgs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=xp8av8j3y+SUFImjvK1kgIygVZufLImw5qhD5lYc+zo5ACH8bOqiFRc/wDNiqPZ5cp 2OeiFwXTn/Zt5nO6XdCF6xoOhk3Opzlx9UyrENikWHyvvXXvPGojCJzFE6NOyTXdF+ll KdCLqG+1OtiCRridgc8sjOqufFbI4N3PygOFo= MIME-Version: 1.0 Received: by 10.220.178.10 with SMTP id bk10mr481481vcb.240.1301137668447; Sat, 26 Mar 2011 04:07:48 -0700 (PDT) Received: by 10.220.181.200 with HTTP; Sat, 26 Mar 2011 04:07:48 -0700 (PDT) Date: Sat, 26 Mar 2011 12:07:48 +0100 Message-ID: From: Petter Urkedal To: caml-list@inria.fr Content-Type: text/plain; charset=ISO-8859-1 Subject: [Caml-list] Camlp4 locations for ocamlc I'm using camlp4 to emit O'Caml code for an ML-like language. I would like error messages form ocamlc (and ocamlopt) to point to the original source code. Changing Printers.OCaml.print_implem ~output_file omod into module Ocaml_printer = Camlp4.Printers.OCaml.Make(Camlp4.PreCast.Syntax) ... Ocaml_printer.print output_file (fun o -> o#set_loc_and_comments#implem) omod gives location comments in the output down to column granularity, which is what I hoped for, but they are not recognised by ocamlc. Is it possible to tell ocamlc to recognise them, or to change the format emitted by camlp4 to standard O'Caml locations?