[m-rev.] for post-commit review: improve type- and mode errors

Julien Fischer jfischer at opturion.com
Sat Feb 19 02:50:59 AEDT 2022


On Sat, 19 Feb 2022, Zoltan Somogyi wrote:

> Improve diagnostics for type- and mode-errors.
> 
> compiler/mode_errors.m:
>     When generating an error message for a bad higher order inst,
>     print the specific cause of the mismatch, instead of just
>     "actual inst is X, expected inst was Y".
> 
> compiler/modecheck_call.m:
>     Change the code that generates that error to record the specific cause
>     in the mode_error structure of the error.
> 
> tests/invalid/higher_order_mode_mismatch.{m,err_exp}:
>     Add a new test case for the specific causes that other test cases
>     don't already cover. (As it happens, most of those causes can't be
>     caught by mode analysis because typechecking reports them first,
>     but it did so in ways that could be improved. Hence the change to
>     typecheck_errors.m and most of the .err_exp files below.)

...

That's fine.

Julien.


More information about the reviews mailing list