* [Caml-list] Camlp4 locations for ocamlc
@ 2011-03-26 11:07 Petter Urkedal
0 siblings, 0 replies; only message in thread
From: Petter Urkedal @ 2011-03-26 11:07 UTC (permalink / raw)
To: caml-list
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?
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2011-03-26 11:07 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-26 11:07 [Caml-list] Camlp4 locations for ocamlc Petter Urkedal
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox