Files
mercury/tests/invalid/det_errors.err_exp
Zoltan Somogyi 4dd8669a87 Don't include irrelevant arg modes in diagnostics.
compiler/hlds_error_util.m:
    When creating format_pieces identifying one procedure of a predicate
    or function, use just the id of the predicate or function itself
    if it has no other procedures. This avoids cluttering diagnostics
    with irrelevant details.

    Replace two separate functions that used to construct such ids with one.
    The difference was that one got the actual arg modes from a pred_info,
    while the other allowed the caller to supply any modes it wanted, but
    all callers (except one) of the second variant got the arg modes
    the exact same way the first variant did. The one exception got them
    from the *declared* arg modes field of the pred_info, which was a bug,
    because would have generated unusable output if the predicate or function
    had no declared modes, and got all its modes by inference.

    Put all the functions involved in all of the above into a logical order.

compiler/det_analysis.m:
compiler/det_report.m:
compiler/simplify_goal_call.m:
compiler/stratify.m:
    Conform to the changes in hlds_error_util.m.

    In some places, improve diagnostics in other ways as well.

tests/general/Mercury.options:
tests/general/Mmakefile:
tests/warnings/Mmakefile:
tests/warnings/petdr1.{m,err_exp}:
    Move the petdr1 test case from general to warnings. This case
    never generated any output; its intended use was to check for
    the absence of a compiler abort in the generation of some warnings.
    In its new home, it tests that *and* the texts of the warnings.

tests/invalid/bug150.err_exp:
tests/invalid/bug150_partial_color.err_exp:
tests/invalid/bug496.err_exp:
tests/invalid/det_atomic_goal_msgs.err_exp:
tests/invalid/det_errors.err_exp:
tests/invalid/det_errors_and_io.err_exp:
tests/invalid/det_errors_deep.err_exp:
tests/invalid/erroneous_throw_promise.err_exp:
tests/invalid/hawkins_mm_fail_reset.err_exp:
tests/invalid/ho_unique_error.err_exp:
tests/invalid/io_in_ite_cond.err_exp:
tests/invalid/loopcheck.err_exp:
tests/invalid/magicbox.err_exp:
tests/invalid/mostly_uniq_1.err_exp:
tests/invalid/mostly_uniq_2.err_exp:
tests/invalid/multisoln_func.err_exp:
tests/invalid/not_a_switch.err_exp:
tests/invalid/one_member.err_exp:
tests/invalid/pragma_c_code_no_det.err_exp:
tests/invalid/ref_to_implicit_comma.err_exp:
tests/invalid/ref_to_implicit_pred.err_exp:
tests/invalid/require_det_in_lambda.err_exp:
tests/invalid/require_scopes.err_exp:
tests/invalid/try_detism.err_exp:
tests/invalid/user_field_access_decl_override_1.err_exp:
tests/invalid_nodepend/invalid_main.err_exp:
tests/invalid_nodepend/occurs.err_exp:
tests/warnings/det_infer_warning.err_exp:
tests/warnings/non_stratification.err_exp:
tests/warnings/obsolete_proc_pragma.err_exp:
    Expect the updated diagnostics.
2025-01-10 16:45:10 +11:00

6.0 KiB

det_errors.m:009: Error: the determinism declaration for predicate `p1'/1 is
det_errors.m:009: not satisfied.
det_errors.m:009: Declared `det', inferred `semidet'.
det_errors.m:009: The reason for the difference is the following.
det_errors.m:042:
det_errors.m:042: In argument 1 of clause head:
det_errors.m:042: unification of `HeadVar__1' and `42' can fail.
det_errors.m:010: Error: the determinism declaration for predicate `p2'/1 is
det_errors.m:010: not satisfied.
det_errors.m:010: Declared `det', inferred `semidet'.
det_errors.m:010: The reason for the difference is the following.
det_errors.m:043:
det_errors.m:043: Unification of `X' and `42' can fail.
det_errors.m:011: Error: the determinism declaration for predicate `p3'/1 is
det_errors.m:011: not satisfied.
det_errors.m:011: Declared `det', inferred `semidet'.
det_errors.m:011: The reason for the difference is the following.
det_errors.m:044:
det_errors.m:044: Unification of `X' and `42' can fail.
det_errors.m:012: Error: the determinism declaration for predicate `p4'/1 is
det_errors.m:012: not satisfied.
det_errors.m:012: Declared `det', inferred `semidet'.
det_errors.m:012: The reason for the difference is the following.
det_errors.m:045:
det_errors.m:045: In argument 2 of functor `+/2':
det_errors.m:045: unification with `21' can fail.
det_errors.m:026: Error: the determinism declaration for predicate `q'/2 is not
det_errors.m:026: satisfied.
det_errors.m:026: Declared `det', inferred `semidet'.
det_errors.m:026: The reason for the difference is the following.
det_errors.m:048:
det_errors.m:048: The switch on `HeadVar__1' does not cover
det_errors.m:048: `d'/0,
det_errors.m:048: `e'/0,
det_errors.m:048: `f'/0,
det_errors.m:048: `g'/0,
det_errors.m:048: `h'/1,
det_errors.m:048: `i'/1.
det_errors.m:034: Error: the determinism declaration for predicate `r'/2 is not
det_errors.m:034: satisfied.
det_errors.m:034: Declared `det', inferred `nondet'.
det_errors.m:034: The reasons for the difference are the following.
det_errors.m:054:
det_errors.m:054: The switch on `U' does not cover
det_errors.m:054: `u2'/0.
det_errors.m:057:
det_errors.m:057: Inside the case u3(V_16) of the switch on U:
det_errors.m:057: the switch on `V_16' does not cover
det_errors.m:057: `d'/0,
det_errors.m:057: `e'/0,
det_errors.m:057: `f'/0,
det_errors.m:057: `g'/0,
det_errors.m:057: `h'/1,
det_errors.m:057: `i'/1.
det_errors.m:066:
det_errors.m:066: Inside the case u4(V_17) of the switch on U:
det_errors.m:066: the switch on `V_17' does not cover
det_errors.m:066: `h'/1,
det_errors.m:066: `i'/1.
det_errors.m:075:
det_errors.m:075: Inside the case u4(V_17) of the switch on U:
det_errors.m:075: inside the case d/0 of the switch on V_17:
det_errors.m:075: disjunction has more than one disjunct with solutions.
det_errors.m:078:
det_errors.m:078: This later disjunct may have a solution.
det_errors.m:035: Error: the determinism declaration for predicate `s'/2 is not
det_errors.m:035: satisfied.
det_errors.m:035: Declared `det', inferred `nondet'.
det_errors.m:035: The reasons for the difference are the following.
det_errors.m:093:
det_errors.m:093: The switch on `U' does not cover
det_errors.m:093: `u2'/0.
det_errors.m:096:
det_errors.m:096: Inside the case u3(V_11) of the switch on U:
det_errors.m:096: the switch on `V_11' does not cover
det_errors.m:096: `d'/0,
det_errors.m:096: `e'/0,
det_errors.m:096: `f'/0,
det_errors.m:096: `g'/0,
det_errors.m:096: `h'/1,
det_errors.m:096: `i'/1.
det_errors.m:116:
det_errors.m:116: Inside the case u4(V) of the switch on U:
det_errors.m:116: inside the case d/0 of the switch on V:
det_errors.m:116: disjunction has more than one disjunct with solutions.
det_errors.m:119:
det_errors.m:119: This later disjunct may have a solution.
det_errors.m:125:
det_errors.m:125: Inside the case u4(V) of the switch on U:
det_errors.m:125: inside the case e/0, f/0 of the switch on V:
det_errors.m:125: disjunction has more than one disjunct with solutions.
det_errors.m:126:
det_errors.m:126: This later disjunct may have a solution.
det_errors.m:135:
det_errors.m:135: Inside the case u4(V) of the switch on U:
det_errors.m:135: inside the case h/1, i/1 of the switch on V:
det_errors.m:135: disjunction has more than one disjunct with solutions.
det_errors.m:136:
det_errors.m:136: This later disjunct may have a solution.