feature request for MLton.

Norman Ramsey nr@eecs.harvard.edu
Sun, 19 Aug 2001 18:48:45 -0400

I have a large pile of SML code (between 40K and 50K lines) that I have
been compiling with the New Jersey implementation.  I use a
preprocessor to generate this code from `literate programming' source.
I have been hoping to port my code to MLton, but I've been balked in
part because MLton cannot report error messages in their original
source locations.  The ML source that the compiler sees looks
something like this:

(*#line 1134 "pattern.nw"*)functor PatternInternalFun (Seq : SEQUENT_BASICS) = struct
  open Seq.PatternTypes
  structure TW = TargetWord

And so for example if I had misspelled the word `open' the compiler
would report a but on line 1134 of file pattern.nw.

What are the chances of getting support for this #line directive (a
formal comment) into MLton.  (The exact syntax of the directive
doesn't matter, although it would be convenient if the two compilers
accepted the same syntax.)

If it helps, I can provide the code from SML/NJ that helps track the
mapping of character position to source-code location.

One more thing---I noticed on your web page that you're interested in
a debugger.  How much effort might you have to devote to this project?
I ask because I have just hired a postdoc to work with me on
multi-language debugging, and we are interested in finding partners.