[m-rev.] for post-commit review: improve diagnostics for mode merge errors

Julien Fischer jfischer at opturion.com
Wed Jul 1 22:11:16 AEST 2020


On Wed, 1 Jul 2020, Zoltan Somogyi wrote:

> Improve messages for merge mode errors.
> 
> compiler/mode_errors.m:
>     When some branches of a disjunction, switch or if-then-else ground
>     a variable but other branches don't, print just this fact about each
>     branch. We used to print the insts themselves, but this is just clutter
>     that does not help programmers locate the source of the error.
>
>     Be consistent about the use of indentation in error messages.
>
>     Use bespoke types instead of booleans in the code affected by this change.
> 
> tests/invalid/default_ho_inst_2.err_exp:
> tests/invalid/merge_inst_error.err_exp:
> tests/invalid/multimode_dcg.err_exp:
>     Expect the updated error messages.

That looks fine.

Julien.


More information about the reviews mailing list