mirror of
https://github.com/Mercury-Language/mercury.git
synced 2025-12-21 00:39:37 +00:00
Estimated hours taken: 8 Branches: main Modify the type and purity check passes to gather up all error messages, and print them all at once after sorting. compiler/typecheck.m: compiler/typeclasses.m: compiler/post_typecheck.m: compiler/purity.m: Gather up all error messages instead of printing them when generated. In some places the gathered list of error specifications allows us to eliminate error counts and error flags. Eliminate the last occurrences of io.write_* in these modules, replacing them with error_specs. Change the error messages generated by purity.m to eliminate the unnecessary module qualification of the name of the predicate or function in which the error occurs. compiler/typecheck_errors.m: Turn the predicates here that used to print error messages into functions that just return the error specification. compiler/mode_errors.m: Make a predicate used by post_typecheck.m return an error spec instead of writing it out. compiler/typecheck_info.m: Record the list of errors instead of simple a count of the errors printed. compiler/mercury_compile.m: Print the error message batches returned by type checking and purity checking. compiler/error_util.m: Modify the way we represent severity to allow passes such as typechecking to count the number of errors *without* printing anything. compiler/add_pred.m: compiler/det_report.m: compiler/make_hlds_warn.m: compiler/module_qual.m: Conform to the change in error_util.m. compiler/Mercury.options: Record the fact that some more compiler modules need the workaround for trace goals. tests/invalid/*err_exp: tests/warnings/*exp: Update the expected output files to conform to the changes above. This mosly involves expecting sorted messages without duplicates.