Files
mercury/tests/invalid/multimode_dcg.err_exp
Zoltan Somogyi d1c08a30f1 Improve messages for merge mode errors.
compiler/mode_errors.m:
    When some branches of a disjunction, switch or if-then-else ground
    a variable but other branches don't, print just this fact about each
    branch. We used to print the insts themselves, but this is just clutter
    that does not help programmers locate the source of the error.

    Be consistent about the use of indentation in error messages.

    Use bespoke types instead of booleans in the code affected by this change.

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.
2020-07-01 17:08:31 +10:00

61 lines
3.4 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 clause for `test1(out, di, uo)':
multimode_dcg.m:033: mode mismatch in disjunction.
multimode_dcg.m:033: The variable `HeadVar__1' is ground in some branches but
multimode_dcg.m:033: not others.
multimode_dcg.m:031: In this branch, `HeadVar__1' is free.
multimode_dcg.m:033: In this branch, `HeadVar__1' is ground.
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: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 clause for `test2(in, out, di, uo)':
multimode_dcg.m:047: mode mismatch in disjunction.
multimode_dcg.m:047: The variable `HeadVar__2' is ground in some branches but
multimode_dcg.m:047: not others.
multimode_dcg.m:041: In this branch, `HeadVar__2' is free.
multimode_dcg.m:043: In this branch, `HeadVar__2' is ground.
multimode_dcg.m:045: In this branch, `HeadVar__2' is free.
multimode_dcg.m:047: In this branch, `HeadVar__2' is ground.
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' is ground in some branches but
multimode_dcg.m:047: not others.
multimode_dcg.m:041: In this branch, `HeadVar__1' is free.
multimode_dcg.m:043: In this branch, `HeadVar__1' is free.
multimode_dcg.m:045: In this branch, `HeadVar__1' is ground.
multimode_dcg.m:047: In this branch, `HeadVar__1' is ground.
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' is ground in some branches but
multimode_dcg.m:047: not others.
multimode_dcg.m:041: In this branch, `HeadVar__1' is free.
multimode_dcg.m:043: In this branch, `HeadVar__1' is free.
multimode_dcg.m:045: In this branch, `HeadVar__1' is ground.
multimode_dcg.m:047: In this branch, `HeadVar__1' is ground.
multimode_dcg.m:047: The variable `HeadVar__2' is ground in some branches but
multimode_dcg.m:047: not others.
multimode_dcg.m:041: In this branch, `HeadVar__2' is free.
multimode_dcg.m:043: In this branch, `HeadVar__2' is ground.
multimode_dcg.m:045: In this branch, `HeadVar__2' is free.
multimode_dcg.m:047: In this branch, `HeadVar__2' is ground.
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.