Files
mercury/tests/invalid/multisoln_func.err_exp
Zoltan Somogyi 4e3af446ef Give some verbose error explanations only once.
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.
2015-02-19 12:38:07 +11:00

22 lines
1.4 KiB
Plaintext

multisoln_func.m:020: Error: invalid determinism for `f'(in) = out:
multisoln_func.m:020: the primary mode of a function cannot be `cc_multi'.
multisoln_func.m:020: In Mercury, a function is supposed to be a true
multisoln_func.m:020: mathematical function of its arguments; that is, the
multisoln_func.m:020: value of the function's result should be determined
multisoln_func.m:020: only by the values of its arguments. (Allowing
multisoln_func.m:020: functions to have more than one result for the same
multisoln_func.m:020: arguments would break referential transparency.) Most
multisoln_func.m:020: likely, this procedure should be a predicate, not a
multisoln_func.m:020: function.
multisoln_func.m:026: Error: invalid determinism for `test' = out:
multisoln_func.m:026: the primary mode of a function cannot be `cc_multi'.
multisoln_func.m:033: Error: invalid determinism for `test2' = out:
multisoln_func.m:033: the primary mode of a function cannot be `multi'.
multisoln_func.m:033: Inferred :- func test2 = int.
multisoln_func.m:037: Error: invalid determinism for `test3'(in) = out:
multisoln_func.m:037: the primary mode of a function cannot be `nondet'.
multisoln_func.m:037: Inferred :- func test3(int) = int.
multisoln_func.m:041: Error: invalid determinism for `test3b'(in) = out:
multisoln_func.m:041: the primary mode of a function cannot be `cc_nondet'.
multisoln_func.m:041: Inferred :- func test3b(int) = int.