[m-rev.] for review: better error messages for bad inst and mode names

Julien Fischer jfischer at opturion.com
Tue Apr 26 13:19:37 AEST 2016


On Tue, 26 Apr 2016, Zoltan Somogyi wrote:

> On Tue, 26 Apr 2016 09:18:37 +1000 (AEST), Julien Fischer <jfischer at opturion.com> wrote:
>>> +            LHSTerm = term.functor(_, _, LHSContext),
>>> +            LHSTermStr = describe_error_term(VarSet, LHSTerm),
>>> +            LHSPieces = [words("Error: a non-variable inst such as"),
>>
>> Add some commas there.
>>
>>      Error: a non-variable inst, such as `foo', may not be the
>
> I think that would be the right thing to do IF `foo' was an example.
> In this case, it is NOT a merely example: it is the term that the
> error message is complaining about. I think putting commas around it
> would make that a bit harder to see.
>
> Do you think wording these messages like this:
>
>   `foo' is a non-variable inst, and as much may not ...
>
> would be an improvement?

No, I find that more wordy.  I'm happy for you to leave it as-is.

Julien.


More information about the reviews mailing list