mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-23 13:23:47 +00:00
compiler/write_module_interface_files.m:
If the code that computes the contents of an interface file also
generates messages to the user, don't take the mere existence of
these messages as grounds for not writing out the interface file;
instead, require them to report errors, or (if --halt-at-warn is enabled)
warnings.
compiler/error_util.m:
Provide a predicate for checking the above condition.
compiler/check_raw_comp_unit.m:
Fix, in two different ways, the warning that indicated the need for
the change to write_module_interface_files. First, if the module
exports nothing, then generate a warning only if warn_nothing_exported
is set, instead of always generating a warning that is conditional
on warn_nothing_exported being set. The latter doesn't just tickle
the problem mentioned above, it also uses more complex code. Second,
fix the wording of the warning.
tests/invalid/bigtest.err_exp:
tests/invalid/duplicate_modes.err_exp:
tests/invalid/empty_interface.err_exp:
tests/invalid/errors.err_exp:
tests/invalid/errors1.err_exp:
tests/invalid/errors2.err_exp:
tests/invalid/funcs_as_preds.err_exp:
tests/invalid/inst_list_dup.err_exp:
tests/invalid/no_exports.err_exp:
tests/invalid/occurs.err_exp:
tests/invalid/prog_io_erroneous.err_exp:
tests/invalid/type_inf_loop.err_exp:
tests/invalid/typeclass_missing_det_3.err_exp:
tests/invalid/typeclass_no_param.err_exp:
tests/invalid/typeclass_test_11.err_exp:
tests/invalid/types.err_exp:
tests/invalid/undef_inst.err_exp:
tests/invalid/undef_mode.err_exp:
tests/invalid/undef_type.err_exp:
tests/invalid/unicode1.err_exp:
tests/invalid/unicode2.err_exp:
tests/invalid/vars_in_wrong_places.err_exp:
Expect the improved wording of the warning.
10 lines
540 B
Plaintext
10 lines
540 B
Plaintext
undef_mode.m:005: Warning: the interface of module `undef_mode' does not export
|
|
undef_mode.m:005: anything.
|
|
undef_mode.m:007: Error: module `undef_mode' should start with either an
|
|
undef_mode.m:007: `:- interface' or an `:- implementation' declaration.
|
|
undef_mode.m:007: The following assumes that the missing declaration is an
|
|
undef_mode.m:007: `:- implementation' declaration.
|
|
undef_mode.m:008: In mode declaration for predicate `x'/1:
|
|
undef_mode.m:008: error: undefined mode `foo'/0.
|
|
For more information, recompile with `-E'.
|