mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-21 20:33:55 +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.
31 lines
1.9 KiB
Plaintext
31 lines
1.9 KiB
Plaintext
duplicate_modes.m:005: Warning: the interface of module `duplicate_modes' does
|
|
duplicate_modes.m:005: not export anything.
|
|
duplicate_modes.m:005: To be useful, a module should export something. A file
|
|
duplicate_modes.m:005: should contain at least one declaration other than
|
|
duplicate_modes.m:005: `:- import_module' in its interface section(s). This
|
|
duplicate_modes.m:005: would normally be a `:- pred', `:- func', `:- type',
|
|
duplicate_modes.m:005: `:- inst' or `:- mode' declaration.
|
|
duplicate_modes.m:007: Error: module `duplicate_modes' should start with either
|
|
duplicate_modes.m:007: an `:- interface' or an `:- implementation'
|
|
duplicate_modes.m:007: declaration.
|
|
duplicate_modes.m:007: The following assumes that the missing declaration is
|
|
duplicate_modes.m:007: an `:- implementation' declaration.
|
|
duplicate_modes.m:012: In mode declarations for predicate
|
|
duplicate_modes.m:012: `duplicate_modes.q'/2:
|
|
duplicate_modes.m:012: error: duplicate mode declaration.
|
|
duplicate_modes.m:012: Modes `q(in, out) is det' and `q((ground >> ground),
|
|
duplicate_modes.m:012: (free >> ground)) is det' are indistinguishable.
|
|
duplicate_modes.m:013: Here is the conflicting mode declaration.
|
|
duplicate_modes.m:012: In mode declarations for predicate
|
|
duplicate_modes.m:012: `duplicate_modes.q'/2:
|
|
duplicate_modes.m:012: error: duplicate mode declaration.
|
|
duplicate_modes.m:012: Modes `q(in, out) is det' and `q((ground >> ground),
|
|
duplicate_modes.m:012: (free >> ground)) is det' are indistinguishable.
|
|
duplicate_modes.m:014: Here is the conflicting mode declaration.
|
|
duplicate_modes.m:018: In mode declarations for predicate
|
|
duplicate_modes.m:018: `duplicate_modes.r'/2:
|
|
duplicate_modes.m:018: error: duplicate mode declaration.
|
|
duplicate_modes.m:018: Modes `r(in, in) is semidet' and `r(in, in) is det'
|
|
duplicate_modes.m:018: are indistinguishable.
|
|
duplicate_modes.m:019: Here is the conflicting mode declaration.
|