mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-15 09:23:44 +00:00
compiler/options.m:
doc/user_guide.texi:
NEWS.md:
Add, document and announce the new option. It is off by default,
but of course I tested its behavior when turned on. Most of this
diff deals with the consequences.
compiler/item_util.m:
Add code to generate the new warnings if requested.
compiler/convert_parse_tree.m:
Request the new warning if the new option is set when processing
source files..
compiler/handle_options.m:
Disable all style warnings, including the new one, when generating
.int* files or .*opt files.
compiler/mercury_compile_main.m:
Fix an unrelated bug I noticed while working on this diff:
report the "unfindability" of a given file at most once.
browser/dl.m:
browser/io_action.m:
compiler/mercury_compile_augment.m:
compiler/mercury_compile_llds_back_end.m:
compiler/unused_args.m:
deep_profiler/autopar_find_best_par.m:
deep_profiler/dump.m:
deep_profiler/html_format.m:
deep_profiler/mdprof_create_feedback.m:
deep_profiler/profile.m:
deep_profiler/read_profile.m:
deep_profiler/recursion_patterns.m:
deep_profiler/var_use_analysis.m:
library/array2d.m:
library/bit_buffer.read.m:
library/construct.m:
library/edit_distance.m:
library/library.m:
library/mercury_term_lexer.m:
library/one_or_more_map.m:
library/private_builtin.m:
library/set_bbbtree.m:
library/string.parse_runtime.m:
library/thread.future.m:
library/univ.m:
library/version_array.m:
library/version_bitmap.m:
mdbcomp/program_representation.m:
profiler/call_graph.m:
profiler/demangle.m:
profiler/output.m:
profiler/process_file.m:
profiler/propagate.m:
slice/mdice.m:
slice/mslice.m:
Fix unsorted import blocks pointed out by the new option.
tests/invalid/ambiguous_overloading_error.err_exp:
tests/invalid/bad_tscp.err_exp:
tests/invalid/bug10.err_exp:
tests/invalid/gh72_errors.err_exp:
tests/invalid/ho_default_func_2.err_exp:
tests/invalid/require_scopes.err_exp:
tests/invalid/type_error_use_module.err_exp:
tests/invalid/types.err_exp:
tests/invalid_nodepend/errors_2.err_exp:
tests/invalid_nodepend/funcs_as_preds.err_exp:
tests/warnings/ambiguous_overloading.err_exp:
tests/warnings/save.err_exp:
tests/warnings/singleton_test.err_exp:
tests/warnings/unused_interface_import.err_exp:
Update the expected outputs of these test cases to expect the new warning
for unsorted import blocks in their source files.
tests/invalid/Mercury.options:
tests/invalid_nodepend/Mercury.options:
tests/warnings/Mercury.options:
Execute those test cases with the warning enabled.
tests/invalid_nodepend/require_tailrec_invalid.m:
tests/invalid_nodepend/specified.m:
tests/recompilation/pragma_type_spec_r.m.1:
tests/recompilation/type_qual_re.m.1:
tests/recompilation/type_qual_re_2.m.1:
tests/recompilation/type_spec_unname_var_r.m.1:
tests/recompilation/type_spec_unname_var_r_2.m.1:
tests/recompilation/type_spec_unname_var_r_2.m.2:
tests/recompilation/unchanged_pred_nr.m.1:
tests/recompilation/with_type_re.m.1:
Sort the import blocks in these test cases, and where relevant,
import only one module per line.
tests/recompilation/with_type_re.err_exp.2:
Expect updated line numbers after splitting a line that imported
two modules.
tests/warnings/unsorted_import_blocks.{m,err_exp}:
New test case to exercise one nontrivial part of the sortedness check,
numerical non-sortedness. (The other affected test cases already exercise
all the other parts.)
tests/warnings/Mmakefile:
Enable the new test case.
559 B
559 B
x:012: In module `bug10':
x:012: warning: module `list' is imported in the interface, but it is not
x:012: used in the interface.
x:013: Warning: this `:- import_module' declaration for module `io' is out of
x:013: order with respect to the preceding `:- import_module' declaration for
x:013: module `list'.
x:020: In clause for predicate `main'/2:
x:020: error: call to undefined predicate `foo'/2.
x:012: warning: module `list' is imported in the interface, but it is not
x:012: used in the interface.
x:013: Warning: this `:- import_module' declaration for module `io' is out of
x:013: order with respect to the preceding `:- import_module' declaration for
x:013: module `list'.
x:020: In clause for predicate `main'/2:
x:020: error: call to undefined predicate `foo'/2.