Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: Petter Urkedal <paurkedal@gmail.com>
To: caml-list@inria.fr
Subject: [Caml-list] Camlp4 locations for ocamlc
Date: Sat, 26 Mar 2011 12:07:48 +0100	[thread overview]
Message-ID: <AANLkTi==-x9JnRw76m4fB=NsXRMPbmaf3CVs6+QyFRCR@mail.gmail.com> (raw)

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?

                 reply	other threads:[~2011-03-26 11:07 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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='AANLkTi==-x9JnRw76m4fB=NsXRMPbmaf3CVs6+QyFRCR@mail.gmail.com' \
    --to=paurkedal@gmail.com \
    --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