Files
mercury/tests/invalid/missing_closure_arg.err_exp
Zoltan Somogyi c4ef3a35ef Better diagnostics for var/functor type mismatches.
compiler/typecheck_error_unify.m:
    As above.

compiler/hlds_error_util.m:
compiler/typecheck_error_util.m:
    Export operations that are now needed by typecheck_error_unify.m.
    To make this possible, carve some of those operations out of
    other operations.

tests/invalid/ho_type_arity_bug.err_exp:
tests/invalid/missing_closure_arg.err_exp:
tests/invalid/nullary_ho_func_error.err_exp:
tests/invalid_nodepend/errors_2.err_exp:
tests/invalid_purity/impure_func_t5.err_exp:
tests/invalid_purity/impure_pred_t1.err_exp:
    Expect the updated diagnostics.
2025-10-14 23:21:37 +11:00

126 lines
8.1 KiB
Plaintext
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

missing_closure_arg.m:027: In clause for predicate `main'/2:
missing_closure_arg.m:027: in argument 1 of call to predicate `list.foldl'/4:
missing_closure_arg.m:027: type error: argument has type
missing_closure_arg.m:027: pred(character, string, io.state, io.state);
missing_closure_arg.m:027: expected type was
missing_closure_arg.m:027: pred(L, A, A).
missing_closure_arg.m:027: Arity mismatch for the predicate: expected three
missing_closure_arg.m:027: arguments, got four.
missing_closure_arg.m:027: In clause for predicate `main'/2:
missing_closure_arg.m:027: in argument 1 of call to predicate `list.foldl'/4:
missing_closure_arg.m:027: type error in unification of argument 2 of functor
missing_closure_arg.m:027: `foo/4'
missing_closure_arg.m:027: and constant `43.2'.
missing_closure_arg.m:027: Argument 2 of functor `foo/4' has type
missing_closure_arg.m:027: list.list(bool.bool),
missing_closure_arg.m:027: constant `43.2' has type
missing_closure_arg.m:027: float.
missing_closure_arg.m:027: In clause for predicate `main'/2:
missing_closure_arg.m:027: in argument 1 of call to predicate `list.foldl'/4:
missing_closure_arg.m:027: type error in unification of argument 3 of functor
missing_closure_arg.m:027: `foo/4'
missing_closure_arg.m:027: and constant `a'.
missing_closure_arg.m:027: Argument 3 of functor `foo/4' has type
missing_closure_arg.m:027: int,
missing_closure_arg.m:027: constant `a' has type
missing_closure_arg.m:027: character.
missing_closure_arg.m:027: In clause for predicate `main'/2:
missing_closure_arg.m:027: in argument 1 of call to predicate `list.foldl'/4:
missing_closure_arg.m:027: type error in unification of argument 4 of functor
missing_closure_arg.m:027: `foo/4'
missing_closure_arg.m:027: and constant `"x"'.
missing_closure_arg.m:027: Argument 4 of functor `foo/4' has type
missing_closure_arg.m:027: float,
missing_closure_arg.m:027: constant `"x"' has type
missing_closure_arg.m:027: string.
missing_closure_arg.m:028: In clause for predicate `main'/2:
missing_closure_arg.m:028: in argument 1 of call to predicate `list.foldl'/4:
missing_closure_arg.m:028: type error in unification of argument 1 of functor
missing_closure_arg.m:028: `foo/5'
missing_closure_arg.m:028: and functor `[|]'/2.
missing_closure_arg.m:028: Argument 1 of functor `foo/5' has type
missing_closure_arg.m:028: bool.bool,
missing_closure_arg.m:028: functor `[|]'/2 has type
missing_closure_arg.m:028: [|](T, list.list(T)): list.list(T).
missing_closure_arg.m:028: In clause for predicate `main'/2:
missing_closure_arg.m:028: in argument 1 of call to predicate `list.foldl'/4:
missing_closure_arg.m:028: type error in unification of argument 2 of functor
missing_closure_arg.m:028: `foo/5'
missing_closure_arg.m:028: and constant `42'.
missing_closure_arg.m:028: Argument 2 of functor `foo/5' has type
missing_closure_arg.m:028: list.list(bool.bool),
missing_closure_arg.m:028: constant `42' has type
missing_closure_arg.m:028: int.
missing_closure_arg.m:028: In clause for predicate `main'/2:
missing_closure_arg.m:028: in argument 1 of call to predicate `list.foldl'/4:
missing_closure_arg.m:028: type error in unification of argument 3 of functor
missing_closure_arg.m:028: `foo/5'
missing_closure_arg.m:028: and constant `43.2'.
missing_closure_arg.m:028: Argument 3 of functor `foo/5' has type
missing_closure_arg.m:028: int,
missing_closure_arg.m:028: constant `43.2' has type
missing_closure_arg.m:028: float.
missing_closure_arg.m:028: In clause for predicate `main'/2:
missing_closure_arg.m:028: in argument 1 of call to predicate `list.foldl'/4:
missing_closure_arg.m:028: type error in unification of argument 4 of functor
missing_closure_arg.m:028: `foo/5'
missing_closure_arg.m:028: and constant `a'.
missing_closure_arg.m:028: Argument 4 of functor `foo/5' has type
missing_closure_arg.m:028: float,
missing_closure_arg.m:028: constant `a' has type
missing_closure_arg.m:028: character.
missing_closure_arg.m:028: In clause for predicate `main'/2:
missing_closure_arg.m:028: in argument 1 of call to predicate `list.foldl'/4:
missing_closure_arg.m:028: type error in unification of argument 5 of functor
missing_closure_arg.m:028: `foo/5'
missing_closure_arg.m:028: and constant `"x"'.
missing_closure_arg.m:028: Argument 5 of functor `foo/5' has type
missing_closure_arg.m:028: character,
missing_closure_arg.m:028: constant `"x"' has type
missing_closure_arg.m:028: string.
missing_closure_arg.m:029: In clause for predicate `main'/2:
missing_closure_arg.m:029: in argument 1 of call to predicate `list.foldl'/4:
missing_closure_arg.m:029: type error: argument has type
missing_closure_arg.m:029: pred(character, string, io.state, io.state);
missing_closure_arg.m:029: expected type was
missing_closure_arg.m:029: pred(L, A, A).
missing_closure_arg.m:029: Arity mismatch for the predicate: expected three
missing_closure_arg.m:029: arguments, got four.
missing_closure_arg.m:029: In clause for predicate `main'/2:
missing_closure_arg.m:029: in argument 1 of call to predicate `list.foldl'/4:
missing_closure_arg.m:029: type error in unification of argument 1 of functor
missing_closure_arg.m:029: `foo/4'
missing_closure_arg.m:029: and constant `42'.
missing_closure_arg.m:029: Argument 1 of functor `foo/4' has type
missing_closure_arg.m:029: bool.bool,
missing_closure_arg.m:029: constant `42' has type
missing_closure_arg.m:029: int.
missing_closure_arg.m:029: In clause for predicate `main'/2:
missing_closure_arg.m:029: in argument 1 of call to predicate `list.foldl'/4:
missing_closure_arg.m:029: type error in unification of argument 2 of functor
missing_closure_arg.m:029: `foo/4'
missing_closure_arg.m:029: and constant `43.2'.
missing_closure_arg.m:029: Argument 2 of functor `foo/4' has type
missing_closure_arg.m:029: list.list(bool.bool),
missing_closure_arg.m:029: constant `43.2' has type
missing_closure_arg.m:029: float.
missing_closure_arg.m:029: In clause for predicate `main'/2:
missing_closure_arg.m:029: in argument 1 of call to predicate `list.foldl'/4:
missing_closure_arg.m:029: type error in unification of argument 3 of functor
missing_closure_arg.m:029: `foo/4'
missing_closure_arg.m:029: and constant `a'.
missing_closure_arg.m:029: Argument 3 of functor `foo/4' has type
missing_closure_arg.m:029: int,
missing_closure_arg.m:029: constant `a' has type
missing_closure_arg.m:029: character.
missing_closure_arg.m:029: In clause for predicate `main'/2:
missing_closure_arg.m:029: in argument 1 of call to predicate `list.foldl'/4:
missing_closure_arg.m:029: type error in unification of argument 4 of functor
missing_closure_arg.m:029: `foo/4'
missing_closure_arg.m:029: and constant `"x"'.
missing_closure_arg.m:029: Argument 4 of functor `foo/4' has type
missing_closure_arg.m:029: float,
missing_closure_arg.m:029: constant `"x"' has type
missing_closure_arg.m:029: string.
For more information, recompile with `-E'.