mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-16 01:43:35 +00:00
compiler/make_hlds_error.m:
When printing an error message about a predicate or function with
a given name and arity not being found, print the arities for which
there *is* a predicate or function with that name.
compiler/hlds_error_util.m:
Provide utility predicates to find the arities with which a name exists.
compiler/typecheck_errors.m:
Delete the code that is now one of the utility predicates in
hlds_error_util.m.
compiler/add_foreign_proc.m:
compiler/add_pragma.m:
compiler/add_pragma_type_spec.m:
When reporting that a foreign_proc or pragma specifies a nonexistent
predicate or function, tell make_hlds_error.m about the arities
that the programmer may have meant to put next to the pred or func name.
When generating error messages about something defined in the current
module, don't module qualify its name, since the message is unambiguous
without, and its presence is just clutter for readers.
In add_pragma.m, when printing an error message about the pragma being
added being incompatible with previous pragmas, specify their kinds.
compiler/hlds_pred.m:
Export the fact that the pred_markers type is implemented as a set.
In more than 20 years, we have never exploited the fact that this type
was abstract, and I don't think we would in the next 20 :-) The export
simplifies new code in add_pragma.m.
compiler/hlds_out_pred.m:
Add a comment reminding future updaters of some code of a requirement
placed on it by new code in add_pragma.m.
tests/invalid/bad_consider_used.err_exp:
tests/invalid/inline_conflict.err_exp:
tests/invalid/require_tailrec_invalid.err_exp:
tests/invalid/type_spec.err_exp:
tests/invalid_purity/purity_nonsense2.err_exp:
Expect error messages with the changes listed above.