[m-dev.] cvs diff: better doc for higher-order stuff

Christopher Rodd SPEIRS crs at students.cs.mu.oz.au
Tue Apr 22 14:28:28 AEST 1997


> Ever considered writing some code that will write out a list of 
> strings, putting a context at the start of each one? If we are starting
> to provide reasonably verbose error message, this might be worth it.
> 
> Even as it is, line for line, it would probably shorten the code here.

It would be lovely if we could write a predicate
output_string_with_context(Context, String, IO, IO).
which would take a string, and print it out as a properly formatted
compiler warning.   Right now, the verbose warnings can wrap over lines
if predicate names are long.  It would be nice if it was handled
automatically.

eg 
output_string_with_context(Context, "a really quite verbose error
message that is not going to fit on a single line as it is describing
the error in detail")

would output

myfile:300: a really quite verbose error message that is not going to fit 
myfile:300:   on a single line as it is describing the error in detail


perhaps it should take a list of strings, where each element in the list
is indivisible, but if successive elements will fit on the one line,
then it will be printed on the same line.  

eg
output_string_with_context(Context, ["a really quite verbose error", "a
predicate definition that doesnt want to be split up", "the rest of the
message"]).

myfile:300: a really quite verbose error 
myfile:300:   a pred def that shouldnt be split up the rest of the message




More information about the developers mailing list