mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-23 13:23:47 +00:00
compiler/mode_errors.m:
When generating diagnostics about code that is mode-incorrect
because it can be backtracked over, explicitly mention the possibility
that the culprit is a comma accidentally replaced by a period elsewhere.
compiler/options.m:
Turn --warn-non-contiguous-clauses on by default. This should provide
the context of any such typos.
NEWS.md:
Mention the change in options.m.
Fix existing typos.
tests/invalid/ho_unique_error.err_exp:
tests/invalid/io_in_ite_cond.err_exp:
tests/invalid/mostly_uniq_1.err_exp:
tests/invalid/mostly_uniq_2.err_exp:
tests/invalid/uniq_modes.err_exp:
tests/invalid/uniq_neg.err_exp:
Conform to the change in mode_errors.m.
tests/warnings/help_text.err_exp:
Conform to the change in options.m.
1.7 KiB
1.7 KiB
ho_unique_error.m:011: In predicate `call_ho'/2:
ho_unique_error.m:011: error: `multi' is not a valid determinism for a
ho_unique_error.m:011: predicate that has I/O state arguments. The valid
ho_unique_error.m:011: determinisms for such predicates are `det', `cc_multi'
ho_unique_error.m:011: and `erroneous', since the I/O state can be neither
ho_unique_error.m:011: duplicated nor destroyed.
ho_unique_error.m:016: In clause for `call_ho(di, uo)':
ho_unique_error.m:016: in argument 3 of the call to the `call' builtin
ho_unique_error.m:016: predicate:
ho_unique_error.m:016: mode error: variable `STATE_VARIABLE_IO_0' has
ho_unique_error.m:016: instantiatedness `mostly_unique',
ho_unique_error.m:016: expected instantiatedness was `unique'.
ho_unique_error.m:016: This kind of uniqueness mismatch is usually caused by
ho_unique_error.m:016: doing input/output or some other kind of destructive
ho_unique_error.m:016: update in a context where it can be backtracked over,
ho_unique_error.m:016: such as the condition of an if-then-else.
ho_unique_error.m:016: Note that it is possible that the cause is code that
ho_unique_error.m:016: is intended to be a call to the current predicate or
ho_unique_error.m:016: function, but has been accidentally turned into a
ho_unique_error.m:016: clause for it by a typo at the end of the previous
ho_unique_error.m:016: line that replaces a comma by a period.
ho_unique_error.m:011: error: `multi' is not a valid determinism for a
ho_unique_error.m:011: predicate that has I/O state arguments. The valid
ho_unique_error.m:011: determinisms for such predicates are `det', `cc_multi'
ho_unique_error.m:011: and `erroneous', since the I/O state can be neither
ho_unique_error.m:011: duplicated nor destroyed.
ho_unique_error.m:016: In clause for `call_ho(di, uo)':
ho_unique_error.m:016: in argument 3 of the call to the `call' builtin
ho_unique_error.m:016: predicate:
ho_unique_error.m:016: mode error: variable `STATE_VARIABLE_IO_0' has
ho_unique_error.m:016: instantiatedness `mostly_unique',
ho_unique_error.m:016: expected instantiatedness was `unique'.
ho_unique_error.m:016: This kind of uniqueness mismatch is usually caused by
ho_unique_error.m:016: doing input/output or some other kind of destructive
ho_unique_error.m:016: update in a context where it can be backtracked over,
ho_unique_error.m:016: such as the condition of an if-then-else.
ho_unique_error.m:016: Note that it is possible that the cause is code that
ho_unique_error.m:016: is intended to be a call to the current predicate or
ho_unique_error.m:016: function, but has been accidentally turned into a
ho_unique_error.m:016: clause for it by a typo at the end of the previous
ho_unique_error.m:016: line that replaces a comma by a period.