mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-16 01:43:35 +00:00
compiler/mode_errors.m:
Use color to emphasize the subject variables and terms of mode errors.
Use color to emphasize disagreements as possible causes
in a few more places.
Require reporters of the "no matching mode" error to specify
what the match was against. This is to allow us to generate
better diagnostics. Note the things that should still be improved.
Use the names of numbers (as in two, three etc) instead of their numeral
versions.
Improve the wording and/or the punctuation of some error messages.
compiler/inst_mode_type_prop.m:
Use the names of numbers (as in two, three etc) instead of their numeral
versions.
compiler/error_spec.m:
compiler/write_error_spec.m:
Move two formerly private utility functions of write_error_spec.m
to error_spec.m, and export them. One of them is now used in
the modules above.
compiler/modecheck_call.m:
compiler/modecheck_goal.m:
compiler/modecheck_unify.m:
compiler/modecheck_util.m:
compiler/unique_modes.m:
Pass around info about "what the match was against" for the change
in mode_errors.m descrived above.
compiler/hlds_out_util.m:
Improve variable name.
compiler/hlds_module.m:
Add an XXX.
tests/invalid/any_mode.err_exp:
tests/invalid/any_passed_as_ground.err_exp:
tests/invalid/any_should_not_match_bound.err_exp:
tests/invalid/any_to_ground_in_ite_cond.err_exp:
tests/invalid/any_to_ground_in_ite_cond_nomax.err_exp:
tests/invalid/anys_in_negated_contexts.err_exp:
tests/invalid/bad_sv_unify_msg.err_exp:
tests/invalid/bind_in_negated.err_exp:
tests/invalid/bind_var_errors.err_exp:
tests/invalid/bug117.err_exp:
tests/invalid/bug191.err_exp:
tests/invalid/bug278.err_exp:
tests/invalid/bug415.err_exp:
tests/invalid/bug487.err_exp:
tests/invalid/char_inst.err_exp:
tests/invalid/coerce_clobbered.err_exp:
tests/invalid/coerce_disambig.err_exp:
tests/invalid/coerce_implied_mode.err_exp:
tests/invalid/coerce_instvar.err_exp:
tests/invalid/coerce_int.err_exp:
tests/invalid/coerce_mode_error.err_exp:
tests/invalid/coerce_mode_error2.err_exp:
tests/invalid/coerce_recursive_inst.err_exp:
tests/invalid/coerce_recursive_type.err_exp:
tests/invalid/coerce_uniq.err_exp:
tests/invalid/constrained_poly_insts2.err_exp:
tests/invalid/currying_multimode_func.err_exp:
tests/invalid/dcg_context.err_exp:
tests/invalid/default_ho_inst.err_exp:
tests/invalid/default_ho_inst_2.err_exp:
tests/invalid/freefree.err_exp:
tests/invalid/functor_ho_inst_bad.err_exp:
tests/invalid/functor_ho_inst_bad_2.err_exp:
tests/invalid/functor_ho_inst_bad_3.err_exp:
tests/invalid/ho_any_inst.err_exp:
tests/invalid/ho_default_func_1.err_exp:
tests/invalid/ho_default_func_2.err_exp:
tests/invalid/ho_default_func_3.err_exp:
tests/invalid/ho_default_func_4.err_exp:
tests/invalid/ho_type_mode_bug.err_exp:
tests/invalid/ho_unique_error.err_exp:
tests/invalid/html.err_exp:
tests/invalid/inst_matches_final_bug.err_exp:
tests/invalid/invalid_integral_call_inst.err_exp:
tests/invalid/io_in_ite_cond.err_exp:
tests/invalid/merge_ground_any.err_exp:
tests/invalid/merge_inst_error.err_exp:
tests/invalid/mode_error_arg_number.err_exp:
tests/invalid/mode_inf.err_exp:
tests/invalid/modes_erroneous.err_exp:
tests/invalid/mostly_uniq1.err_exp:
tests/invalid/mostly_uniq2.err_exp:
tests/invalid/multimode_dcg.err_exp:
tests/invalid/no_ho_inst.err_exp:
tests/invalid/partial_implied_mode.err_exp:
tests/invalid/polymorphic_unification.err_exp:
tests/invalid/state_vars_test1.err_exp:
tests/invalid/state_vars_test5.err_exp:
tests/invalid/try_detism.err_exp:
tests/invalid/unify_mode_error.err_exp:
tests/invalid/uniq_modes.err_exp:
tests/invalid/uniq_neg.err_exp:
tests/invalid_nodepend/constrained_poly_insts.err_exp:
tests/invalid_nodepend/occurs.err_exp:
tests/invalid_purity/impure_func_t5_fixed.err_exp:
tests/invalid_purity/purity.err_exp:
tests/warnings/simple_code.err_exp:
tests/warnings/unify_f_g.err_exp:
Expect the updated versions of diagnostics.
590 B
590 B
bug117.m:028: In clause for `extract(in) = out(list.non_empty_list)':
bug117.m:028: mode error: the function result did not get sufficiently
bug117.m:028: instantiated.
bug117.m:028: Final instantiatedness of `X' was `ground',
bug117.m:028: expected final instantiatedness was
bug117.m:028: named inst list.non_empty_list
bug117.m:028: which expands to
bug117.m:028: bound(
bug117.m:028: '[|]'(ground, ground)
bug117.m:028: ).
bug117.m:028: mode error: the function result did not get sufficiently
bug117.m:028: instantiated.
bug117.m:028: Final instantiatedness of `X' was `ground',
bug117.m:028: expected final instantiatedness was
bug117.m:028: named inst list.non_empty_list
bug117.m:028: which expands to
bug117.m:028: bound(
bug117.m:028: '[|]'(ground, ground)
bug117.m:028: ).