Evaluating typed source without diagnostics on standard error, and trimming error messages.
Summary
Functions
An exception's message trimmed to one line: file, line, caret art and snippet removed, cut
to 90 characters. An empty result is "that will not read".
Run fun and return its result, dropping any compiler diagnostics it would write to
standard error.
Functions
An exception's message trimmed to one line: file, line, caret art and snippet removed, cut
to 90 characters. An empty result is "that will not read".
iex> TuningFork.Source.one_line("error: missing terminator: )")
"missing terminator: )"
iex> TuningFork.Source.one_line("")
"that will not read"
@spec run((-> result)) :: result when result: term()
Run fun and return its result, dropping any compiler diagnostics it would write to
standard error.