[m-rev.] for post-commit review: better diagnostics for bad use of language constructs

Julien Fischer jfischer at opturion.com
Mon Jan 6 02:03:14 AEDT 2025


On Sun, 5 Jan 2025 at 16:32, Zoltan Somogyi <zoltan.somogyi at runbox.com> wrote:

> Better diagnostics for bad use of language constructs.
>
> compiler/typecheck_error_undef.m:
>     Stop generatic diagnostics that a language construct "should be used
>     as a goal, not as an expression", because exactly none of those
>     constructs are complete goals by themselves.
>
>     Instead, generate messages that specify that those constructs
>     should be
>
>     - "part of a goal", for e.g. equal signs,
>     - "a prefix before a goal", for e.g. "impure", or
>     - "a connective between goals", for e.g. ";"".
>
>     Also, address a review comment.
>
> tests/invalid/multimode_syntax.err_exp:
> tests/invalid_nodepend/funcs_as_preds.err_exp:
> tests/invalid_purity/purity_nonsense_1.err_exp:
> tests/invalid_purity/purity_nonsense_2.err_exp:
>     Expect the updated wording.

That's fine.

Julien.


More information about the reviews mailing list