Files
mercury/tests/invalid/any_passed_as_ground.err_exp
Zoltan Somogyi e9ad852183 Improve mode error messages a bit more.
compiler/mode_errors.m:
    Simplify the wording of the new error message component added yesterday.

    Mention a possible reason for inst mismatches when the inst contains
    a higher order component. Put this in the parentheses, because it is
    *not* guaranteed to be the actual reason.

compiler/inst_util.m:
    Add a utility predicate for the new code in mode_errors.m.

tests/invalid/any_passed_as_ground.err_exp:
tests/invalid/constrained_poly_insts2.err_exp:
tests/invalid/ho_type_mode_bug.err_exp:
tests/invalid/try_detism.err_exp:
    Expect the updated error messages.
2020-01-24 16:26:24 +11:00

12 lines
633 B
Plaintext

any_passed_as_ground.m:029: In clause for `main(di, uo)':
any_passed_as_ground.m:029: in call to predicate `list.member'/2:
any_passed_as_ground.m:029: mode error: arguments `V_10, Xs' have the
any_passed_as_ground.m:029: following insts:
any_passed_as_ground.m:029: free,
any_passed_as_ground.m:029: any
any_passed_as_ground.m:029: which does not match any of the modes for
any_passed_as_ground.m:029: predicate `list.member'/2.
any_passed_as_ground.m:029: The second argument `Xs' has inst `any', which
any_passed_as_ground.m:029: does not match any of those modes.
For more information, recompile with `-E'.