Files
mercury/tests/invalid/multimode_dcg.err_exp
Zoltan Somogyi 3f9d2ca5a0 Improve error messages for inst mismatches among branches.
compiler/mode_errors.m:
    When more than half of the branches in a disjunction ground a variable,
    but some branches leave it non-ground, the error is almost certainly
    in the branches that leave the variable non-ground. Therefore users
    are very likely to find the ground insts we print for the branches
    that ground the variable to be just clutter.

    Change things so that by default, we print the inst of the variable
    only for the branches that leave it non-ground. (We still print its inst
    in all branches with verbose errors.)

    To make the messages processable by the error utility, in the message
    about the inst of the variable in a branch, print the context of the
    branch in the usual context position, not in the body of the message.

compiler/error_util.m:
    Allow for the fact that we can now generate an empty list of messages
    for a branch in the non-verbose-errors case.

tests/invalid/default_ho_inst_2.err_exp:
tests/invalid/merge_inst_error.err_exp:
tests/invalid/multimode_dcg.err_exp:
    Expect the updated error messages.
2017-04-19 20:53:40 +10:00

79 lines
4.2 KiB
Plaintext

multimode_dcg.m:031: In the head of a clause for
multimode_dcg.m:031: predicate `multimode_dcg.test1'/3:
multimode_dcg.m:031: syntax error: some but not all arguments have mode
multimode_dcg.m:031: annotations.
multimode_dcg.m:033: In the head of a clause for
multimode_dcg.m:033: predicate `multimode_dcg.test1'/3:
multimode_dcg.m:033: syntax error: some but not all arguments have mode
multimode_dcg.m:033: annotations.
multimode_dcg.m:033: In clause for `test1(out, di, uo)':
multimode_dcg.m:033: mode mismatch in disjunction.
multimode_dcg.m:033: The variable `HeadVar__1' has the following
multimode_dcg.m:033: instantiation states.
multimode_dcg.m:031: In this branch, `HeadVar__1' has instantiatedness
multimode_dcg.m:031: free.
multimode_dcg.m:033: In this branch, `HeadVar__1' has instantiatedness
multimode_dcg.m:033: unique(0).
multimode_dcg.m:041: In the head of a clause for
multimode_dcg.m:041: predicate `multimode_dcg.test2'/4:
multimode_dcg.m:041: syntax error: some but not all arguments have mode
multimode_dcg.m:041: annotations.
multimode_dcg.m:043: In the head of a clause for
multimode_dcg.m:043: predicate `multimode_dcg.test2'/4:
multimode_dcg.m:043: syntax error: some but not all arguments have mode
multimode_dcg.m:043: annotations.
multimode_dcg.m:045: In the head of a clause for
multimode_dcg.m:045: predicate `multimode_dcg.test2'/4:
multimode_dcg.m:045: syntax error: some but not all arguments have mode
multimode_dcg.m:045: annotations.
multimode_dcg.m:047: In the head of a clause for
multimode_dcg.m:047: predicate `multimode_dcg.test2'/4:
multimode_dcg.m:047: syntax error: some but not all arguments have mode
multimode_dcg.m:047: annotations.
multimode_dcg.m:047: In clause for `test2(in, out, di, uo)':
multimode_dcg.m:047: mode mismatch in disjunction.
multimode_dcg.m:047: The variable `HeadVar__2' has the following
multimode_dcg.m:047: instantiation states.
multimode_dcg.m:041: In this branch, `HeadVar__2' has instantiatedness
multimode_dcg.m:041: free.
multimode_dcg.m:043: In this branch, `HeadVar__2' has instantiatedness
multimode_dcg.m:043: unique(0).
multimode_dcg.m:045: In this branch, `HeadVar__2' has instantiatedness
multimode_dcg.m:045: free.
multimode_dcg.m:047: In this branch, `HeadVar__2' has instantiatedness
multimode_dcg.m:047: unique(0).
multimode_dcg.m:047: In clause for `test2(out, in, di, uo)':
multimode_dcg.m:047: mode mismatch in disjunction.
multimode_dcg.m:047: The variable `HeadVar__1' has the following
multimode_dcg.m:047: instantiation states.
multimode_dcg.m:041: In this branch, `HeadVar__1' has instantiatedness
multimode_dcg.m:041: free.
multimode_dcg.m:043: In this branch, `HeadVar__1' has instantiatedness
multimode_dcg.m:043: free.
multimode_dcg.m:045: In this branch, `HeadVar__1' has instantiatedness
multimode_dcg.m:045: unique(0).
multimode_dcg.m:047: In this branch, `HeadVar__1' has instantiatedness
multimode_dcg.m:047: unique(0).
multimode_dcg.m:047: In clause for `test2(out, out, di, uo)':
multimode_dcg.m:047: mode mismatch in disjunction.
multimode_dcg.m:047: The variable `HeadVar__1' has the following
multimode_dcg.m:047: instantiation states.
multimode_dcg.m:041: In this branch, `HeadVar__1' has instantiatedness
multimode_dcg.m:041: free.
multimode_dcg.m:043: In this branch, `HeadVar__1' has instantiatedness
multimode_dcg.m:043: free.
multimode_dcg.m:045: In this branch, `HeadVar__1' has instantiatedness
multimode_dcg.m:045: unique(0).
multimode_dcg.m:047: In this branch, `HeadVar__1' has instantiatedness
multimode_dcg.m:047: unique(0).
multimode_dcg.m:047: The variable `HeadVar__2' has the following
multimode_dcg.m:047: instantiation states.
multimode_dcg.m:041: In this branch, `HeadVar__2' has instantiatedness
multimode_dcg.m:041: free.
multimode_dcg.m:043: In this branch, `HeadVar__2' has instantiatedness
multimode_dcg.m:043: unique(0).
multimode_dcg.m:045: In this branch, `HeadVar__2' has instantiatedness
multimode_dcg.m:045: free.
multimode_dcg.m:047: In this branch, `HeadVar__2' has instantiatedness
multimode_dcg.m:047: unique(0).