mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-15 17:33:38 +00:00
compiler/make_hlds_error.m:
As above. When printing an error message about a clause for pred p/N
or func f/N, point out any values of M (M != N) for which p/M or f/M
*is* defined.
Take the information about whether the procedure the original error
is being reported for in the form of a bespoke enum, not a bool.
compiler/prog_data.m:
Define that bespoke enum type.
compiler/add_class.m:
compiler/add_clause.m:
compiler/add_foreign_proc.m:
compiler/add_pragma_tabling.m:
compiler/add_pred.m:
compiler/make_hlds_passes.m:
Conform to the changes above.
tests/invalid/bug197.err_exp:
tests/invalid/errors2.err_exp:
Expect the additional output we now generate.
134 lines
6.2 KiB
Plaintext
134 lines
6.2 KiB
Plaintext
errors2.m:005: Warning: interface for module `errors2' does not export
|
|
errors2.m:005: anything.
|
|
errors2.m:005: To be useful, a module should export something. A file should
|
|
errors2.m:005: contain at least one declaration other than `:- import_module'
|
|
errors2.m:005: in its interface section(s). This would normally be a
|
|
errors2.m:005: `:- pred', `:- func', `:- type', `:- inst' or `:- mode'
|
|
errors2.m:005: declaration.
|
|
errors2.m:009: Error: module `errors2' should start with either an
|
|
errors2.m:009: `:- interface' or an `:- implementation' declaration.
|
|
errors2.m:009: The following assumes that the missing declaration is an
|
|
errors2.m:009: `:- implementation' declaration.
|
|
errors2.m:009: Error: no clauses for predicate `bind_type_param'/2.
|
|
errors2.m:011: Inferred :- pred bind_type_param(int).
|
|
errors2.m:011: Error: clause for predicate `errors2.bind_type_param'/1
|
|
errors2.m:011: without corresponding `:- pred' declaration.
|
|
errors2.m:011: However, a predicate of that name does exist with arity 2.
|
|
errors2.m:025: Error: no clauses for predicate `produce_string'/1.
|
|
errors2.m:027: Error: no clauses for predicate `expect_int'/1.
|
|
errors2.m:033: In clause for predicate `type_error'/0:
|
|
errors2.m:033: in argument 1 of call to predicate `errors2.expect_int'/1:
|
|
errors2.m:033: type error: variable `X' has type `string',
|
|
errors2.m:033: expected type was `int'.
|
|
errors2.m:033: The partial type assignment was:
|
|
errors2.m:033: X_1: string
|
|
errors2.m:039: In clause for predicate `type_error_2'/0:
|
|
errors2.m:039: type error in unification of variable `X'
|
|
errors2.m:039: and variable `Y'.
|
|
errors2.m:039: `X' has type `string',
|
|
errors2.m:039: `Y' has type `int'.
|
|
errors2.m:039: The partial type assignment was:
|
|
errors2.m:039: X_1: string
|
|
errors2.m:039: Y_2: int
|
|
errors2.m:045: In clause for predicate `type_error_3'/0:
|
|
errors2.m:045: in argument 1 of call to predicate `errors2.expect_int'/1:
|
|
errors2.m:045: type error: variable `Y' has type `string',
|
|
errors2.m:045: expected type was `int'.
|
|
errors2.m:045: The partial type assignment was:
|
|
errors2.m:045: X_1: string
|
|
errors2.m:045: Y_2: string
|
|
errors2.m:054: In clause for predicate `type_error_4'/0:
|
|
errors2.m:054: in argument 3 of functor `foo_functor/3':
|
|
errors2.m:054: type error in unification of argument
|
|
errors2.m:054: and constant `1.0'.
|
|
errors2.m:054: argument has type `string',
|
|
errors2.m:054: constant `1.0' has type `float'.
|
|
errors2.m:054: The partial type assignment was:
|
|
errors2.m:054: Y_1: int
|
|
errors2.m:054: X_2: errors2.foo_type
|
|
errors2.m:054: V_3: character
|
|
errors2.m:054: V_4: string
|
|
errors2.m:054: In clause for predicate `errors2.type_error_4'/0:
|
|
errors2.m:054: warning: variable `X' occurs only once in this scope.
|
|
errors2.m:061: In clause for predicate `type_error_5'/0:
|
|
errors2.m:061: in argument 3 of functor `foo_functor/3':
|
|
errors2.m:061: type error in unification of argument
|
|
errors2.m:061: and constant `1.0'.
|
|
errors2.m:061: argument has type `string',
|
|
errors2.m:061: constant `1.0' has type `float'.
|
|
errors2.m:061: The partial type assignment was:
|
|
errors2.m:061: Y_1: character
|
|
errors2.m:061: X_2: errors2.foo_type
|
|
errors2.m:061: V_3: int
|
|
errors2.m:061: V_4: string
|
|
errors2.m:061: In clause for predicate `errors2.type_error_5'/0:
|
|
errors2.m:061: warning: variable `X' occurs only once in this scope.
|
|
errors2.m:067: In clause for predicate `type_error_6'/0:
|
|
errors2.m:067: in argument 3 of functor `bar_functor/3':
|
|
errors2.m:067: type error in unification of argument
|
|
errors2.m:067: and constant `1.0'.
|
|
errors2.m:067: argument has type `string',
|
|
errors2.m:067: constant `1.0' has type `float'.
|
|
errors2.m:067: The partial type assignment was:
|
|
errors2.m:067: Y_1: character
|
|
errors2.m:067: X_2: errors2.bar_1_type
|
|
errors2.m:067: V_3: int
|
|
errors2.m:067: V_4: string
|
|
errors2.m:067: In clause for predicate `errors2.type_error_6'/0:
|
|
errors2.m:067: warning: variable `X' occurs only once in this scope.
|
|
errors2.m:072: In clause for predicate `errors2.type_error_7'/0:
|
|
errors2.m:072: warning: variable `Y' occurs only once in this scope.
|
|
errors2.m:073: In clause for predicate `errors2.type_error_7'/0:
|
|
errors2.m:073: warning: variables `A, B, Z' occur only once in this scope.
|
|
errors2.m:074: In clause for predicate `type_error_7'/0:
|
|
errors2.m:074: in argument 1 of call to predicate `errors2.expect_int'/1:
|
|
errors2.m:074: type error: variable `C' has type `string',
|
|
errors2.m:074: expected type was `int'.
|
|
errors2.m:074: The possible partial type assignments were:
|
|
errors2.m:074: Type assignment 1:
|
|
errors2.m:074: Y_1: errors2.foo
|
|
errors2.m:074: Z_2: errors2.bar_1_type
|
|
errors2.m:074: A_3: int
|
|
errors2.m:074: B_4: character
|
|
errors2.m:074: C_5: string
|
|
errors2.m:074:
|
|
errors2.m:074: Type assignment 2:
|
|
errors2.m:074: Y_1: character
|
|
errors2.m:074: Z_2: errors2.bar_1_type
|
|
errors2.m:074: A_3: int
|
|
errors2.m:074: B_4: character
|
|
errors2.m:074: C_5: string
|
|
errors2.m:074:
|
|
errors2.m:074: Type assignment 3:
|
|
errors2.m:074: Y_1: errors2.foo
|
|
errors2.m:074: Z_2: errors2.bar_2_type
|
|
errors2.m:074: A_3: character
|
|
errors2.m:074: B_4: int
|
|
errors2.m:074: C_5: string
|
|
errors2.m:074:
|
|
errors2.m:074: Type assignment 4:
|
|
errors2.m:074: Y_1: character
|
|
errors2.m:074: Z_2: errors2.bar_2_type
|
|
errors2.m:074: A_3: character
|
|
errors2.m:074: B_4: int
|
|
errors2.m:074: C_5: string
|
|
errors2.m:080: In clause for predicate `type_error_8'/0:
|
|
errors2.m:080: error: undefined predicate `from_char_list'/2.
|
|
errors2.m:080: In clause for predicate `type_error_8'/0:
|
|
errors2.m:080: in argument 1 of call to predicate `from_char_list'/2:
|
|
errors2.m:080: error: undefined symbol `[]'/0.
|
|
errors2.m:087: In clause for predicate `type_error_9'/0:
|
|
errors2.m:087: type error in unification of variable `X'
|
|
errors2.m:087: and variable `Y'.
|
|
errors2.m:087: `X' has type `{int, string, character}',
|
|
errors2.m:087: `Y' has type `{string, character, int}'.
|
|
errors2.m:087: The partial type assignment was:
|
|
errors2.m:087: X_1: {int, string, character}
|
|
errors2.m:087: Y_2: {string, character, int}
|
|
errors2.m:087: V_3: int
|
|
errors2.m:087: V_4: string
|
|
errors2.m:087: V_5: character
|
|
errors2.m:087: V_6: string
|
|
errors2.m:087: V_7: character
|
|
errors2.m:087: V_8: int
|