mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-24 05:43:53 +00:00
compiler/error_util.m:
Some of the messages we print if --verbose-errors are enabled just explain
what an always-printed error message means. If a compiler invocation
reports several instances of an error, the explanation is useful
only the first time. This diff provides a mechanism for printing
such verbose messages only once per invocation of write_error_specs.
compiler/*.m:
Specify verbose_once for verbose error message components which are
(a) not specific to the specific instance of the error they are generated
for, and (b) whose usefulness/size ratio is not high enough. Part (b)
means that it is ok to repeatedly print a single-line reminder,
but not a 20-line missive that reads like an extract from the
reference manual.
In one case, make an error message clearer.
tests/invalid/*.err_exp:
tests/warnings/*.exp:
Expect the new, slimmed-down output.
31 lines
2.0 KiB
Plaintext
31 lines
2.0 KiB
Plaintext
complex_constraint_err.m:016: In declaration for predicate
|
|
complex_constraint_err.m:016: `complex_constraint_err.t'/1:
|
|
complex_constraint_err.m:016: error in type class constraints: type variable
|
|
complex_constraint_err.m:016: `C' occurs in the constraints, but is not
|
|
complex_constraint_err.m:016: determined by the predicate's argument types.
|
|
complex_constraint_err.m:016: All types occurring in typeclass constraints
|
|
complex_constraint_err.m:016: must be fully determined. A type is fully
|
|
complex_constraint_err.m:016: determined if one of the following holds:
|
|
complex_constraint_err.m:016: 1) All type variables occurring in the type are
|
|
complex_constraint_err.m:016: determined.
|
|
complex_constraint_err.m:016: 2) The type occurs in a constraint argument,
|
|
complex_constraint_err.m:016: that argument is in the range of some
|
|
complex_constraint_err.m:016: functional dependency for that class, and the
|
|
complex_constraint_err.m:016: types in all of the domain arguments for that
|
|
complex_constraint_err.m:016: functional dependency are fully determined.
|
|
complex_constraint_err.m:016: A type variable is determined if one of the
|
|
complex_constraint_err.m:016: following holds:
|
|
complex_constraint_err.m:016: 1) The type variable occurs in the argument
|
|
complex_constraint_err.m:016: types of the predicate, function, or
|
|
complex_constraint_err.m:016: constructor which is constrained.
|
|
complex_constraint_err.m:016: 2) The type variable occurs in a type which is
|
|
complex_constraint_err.m:016: fully determined.
|
|
complex_constraint_err.m:016: See the "Functional dependencies" section of
|
|
complex_constraint_err.m:016: the reference manual for details.
|
|
complex_constraint_err.m:020: In declaration for predicate
|
|
complex_constraint_err.m:020: `complex_constraint_err.u'/1:
|
|
complex_constraint_err.m:020: error in type class constraints: type variables
|
|
complex_constraint_err.m:020: `Z' and `X' occur in the constraints, but are
|
|
complex_constraint_err.m:020: not determined by the predicate's argument
|
|
complex_constraint_err.m:020: types.
|