mirror of
https://github.com/Mercury-Language/mercury.git
synced 2025-12-19 15:54:18 +00:00
Estimated hours taken: 6 Branches: main Detect when a predicate has a pair of I/O states but isn't det or cc_multi. Improve the generation of determinism error messages. compiler/det_analysis.m: Detect when a predicate has a pair of I/O states but isn't det or cc_multi. Factor out some common code. compiler/det_report.m: Add the new error type for predicates with I/O states. Use error_util much more extensively to generate error messages. compiler/hlds_out.m: For several existing predicates that write out various HLDS constructs, provide versions that return representations of those constructs as strings or as error_util pieces, for use by det_report.m. Redefine the old predicates as simply printing the output of the new predicates where relevant, to avoid code duplication. compiler/error_util.m: When describing a predicate name, specify whether we want to module qualify the name or not. The intention is that when generating a kind of error message which can only be generated for predicates defined in the current module, the module prefix should be omitted in the interest of clarity. compiler/accumulator.m: compiler/dead_proc_elim.m: compiler/magic_util.m: compiler/table_gen.m: compiler/term_errors.m: compiler/termination.m: compiler/typecheck.m: Conform to the changes in error_util.m. compiler/globals.m: Reorder arguments to allow the use of state variable notation. compiler/handle_globals.m: compiler/mercury_compile.m: compiler/source_file_map.m: Conform to the changed argument order in globals.m. tests/invalid/aditi_update_errors.err_exp: tests/invalid/errors2.err_exp2: tests/invalid/external.err_exp: tests/invalid/ho_unique_error.err_exp: tests/invalid/magicbox.err_exp: tests/invalid/missing_det_decls.err_exp: tests/invalid/mostly_uniq1.err_exp: tests/invalid/mostly_uniq2.err_exp: tests/invalid/multimode_syntax.err_exp: tests/invalid/multisoln_func.err_exp: tests/invalid/pragma_c_code_dup_var.err_exp: tests/invalid/pragma_c_code_no_det.err_exp: tests/invalid/prog_io_erroneous.err_exp2: tests/invalid/qualified_cons_id2.err_exp: tests/invalid/record_syntax_errors.err_exp: tests/invalid/state_vars_test1.err_exp: tests/invalid/state_vars_test2.err_exp: tests/invalid/state_vars_test3.err_exp: tests/invalid/typeclass_mode.err_exp: tests/invalid/types.err_exp2: tests/invalid/undef_mode_and_no_clauses.err_exp: tests/recompilation/typeclass_method_pragma_r.err_exp.2: tests/warnings/ambiguous_overloading.exp: tests/warnings/duplicate_call.exp: tests/warnings/duplicate_const.exp: tests/warnings/infinite_recursion.exp: tests/warnings/simple_code.exp: tests/warnings/warn_dead_procs.exp: tests/warnings/warn_stubs.exp: Update these files to expect the better error messages we now generate.
7 lines
333 B
Plaintext
7 lines
333 B
Plaintext
infinite_recursion.m:013: Warning: recursive call will lead to infinite
|
|
infinite_recursion.m:013: recursion.
|
|
infinite_recursion.m:022: Warning: recursive call will lead to infinite
|
|
infinite_recursion.m:022: recursion.
|
|
infinite_recursion.m:034: Warning: recursive call will lead to infinite
|
|
infinite_recursion.m:034: recursion.
|