Files
mercury/tests/invalid/errors.err_exp
Zoltan Somogyi 8e8281ce7b Represent ":- module" and ":- end_module" items using purpose-specific kinds of
Estimated hours taken: 8
Branches: main

Represent ":- module" and ":- end_module" items using purpose-specific kinds of
items, instead of as part of the generic "module_defn" item kind. This is in
preparation for a diff that would return submodules as separate entities in
their own right, instead of as an embedded sequence of items that happen
to start with a :- module item and end with an optional :- end_module item.

Also as preparation, make missing a ":- module" declaration at the start of a
source file an error instead of a warning.

compiler/prog_item.m:
	Change the type representing items.

compiler/prog_io.m:
	Conform to the change above, make missing module declarations into an
	error, and simplify some code.

compiler/equiv_type.m:
compiler/make_hlds_passes.m:
compiler/mercury_to_mercury.m:
compiler/module_qual.m:
compiler/modules.m:
compiler/recompilation.check.m:
compiler/recompilation.version.m:
	Conform to the change above. Where relevant, turn chains of
	if-then-elses on item types into switches.

compiler/inst.m:
	Make the module name in the module declaration match the module name.

tests/invalid/big_test.err_exp:
tests/invalid/errors.err_exp:
tests/invalid/typeclass_test_1.err_exp:
	Update the expected error messages.

tests/valid/inhibit_warn_test.m:
	To keep this test case valid, don't omit the ":- module" declaration.
2009-11-05 06:34:49 +00:00

39 lines
2.2 KiB
Plaintext

errors.m:001: Warning: interface for module `errors' does not export anything.
errors.m:001: Warning: module `int' is imported using both `:- import_module'
errors.m:001: `:- use_module' declarations.
errors.m:010: Error: module must start with a `:- module' declaration.
errors.m:028: Error: mode declaration for predicate
errors.m:028: `errors.mode_declaration_without_pred_declaration'/0
errors.m:028: without preceding `pred' declaration.
errors.m:032: Error: mode declaration for predicate
errors.m:032: `errors.missing_pred_declaration'/0
errors.m:032: without preceding `pred' declaration.
errors.m:038: Error: clause for predicate
errors.m:038: `errors.clause_without_pred_or_mode_declaration'/0
errors.m:038: without preceding `pred' declaration.
errors.m:049: Error: constructor `errors.a/0' for type
errors.m:049: `errors.type_with_multiply_defined_ctors/0' multiply defined.
errors.m:049: Error: constructor `errors.f/1' for type
errors.m:049: `errors.type_with_multiply_defined_ctors/0' multiply defined.
errors.m:051: In definition of type
errors.m:051: `errors.du_type_which_references_undefined_type'/0:
errors.m:051: error: undefined type `undefined_type'/0.
errors.m:053: In definition of type
errors.m:053: `errors.eqv_type_which_references_undefined_type'/0:
errors.m:053: error: undefined type `undefined_type'/0.
errors.m:055: Error: circular equivalence type `errors.circular_eqv_type'/0.
errors.m:057: Error: circular equivalence type
errors.m:057: `errors.indirectly_circular_eqv_type_1'/0.
errors.m:058: Error: circular equivalence type
errors.m:058: `errors.indirectly_circular_eqv_type_2'/0.
errors.m:060: Error: free type parameter T in RHS of type definition.
errors.m:061: Error: free type parameter in RHS of type definition: f(T).
errors.m:075: In clause for predicate
errors.m:075: `errors.pred_with_unresolved_polymorphism'/0:
errors.m:075: warning: variable `Arg' occurs only once in this scope.
errors.m:091: In clause for predicate `errors.pred_with_singleton_vars'/1:
errors.m:091: warning: variable `X' occurs only once in this scope.
errors.m:100: In definition of type `errors.needs_qualification'/0:
errors.m:100: error: undefined type `state'/0.
For more information, recompile with `-E'.