Files
mercury/tests/invalid/foreign_purity_mismatch.err_exp
Zoltan Somogyi 7b82c59c40 Remove unneeded module qualifications from error messages.
This should make error messages easier to read by removing clutter.

compiler/error_util.m:
    Split each of the sym_name and sym_name_and_arity error pieces into two;
    one which prints any module qualification present in the given sym_name,
    and one which does not. This forces people who use these pieces
    to think about whether they want the sym_name module qualified
    in the error message or not.

compiler/add_class.m:
compiler/add_clause.m:
compiler/add_foreign_enum.m:
compiler/add_foreign_proc.m:
compiler/add_mode.m:
compiler/add_mutable_aux_preds.m:
compiler/add_pragma.m:
compiler/add_pragma_tabling.m:
compiler/add_pred.m:
compiler/add_type.m:
compiler/check_for_missing_type_defns.m:
compiler/check_promise.m:
compiler/check_raw_comp_unit.m:
compiler/check_typeclass.m:
compiler/det_report.m:
compiler/equiv_type.m:
compiler/format_call.m:
compiler/hlds_error_util.m:
compiler/inst_check.m:
compiler/introduce_parallelism.m:
compiler/make_hlds_error.m:
compiler/make_hlds_passes.m:
compiler/make_tags.m:
compiler/mercury_compile_main.m:
compiler/mode_errors.m:
compiler/modes.m:
compiler/module_qual.qual_errors.m:
compiler/modules.m:
compiler/oisu_check.m:
compiler/parse_inst_mode_defn.m:
compiler/parse_item.m:
compiler/parse_module.m:
compiler/parse_pragma.m:
compiler/parse_type_defn.m:
compiler/polymorphism.m:
compiler/post_term_analysis.m:
compiler/prog_out.m:
compiler/recompilation.check.m:
compiler/resolve_unify_functor.m:
compiler/split_parse_tree_src.m:
compiler/type_constraints.m:
compiler/typecheck_errors.m:
compiler/unused_args.m:
compiler/unused_imports.m:
    Conform to the change above. For sym_name references for which
    the module qualifier is obvious (usually because it *has* to be
    the module being compiled), change the reference to the variant
    that omits that qualifier; otherwise, keep the qualifier.

    In a few places, improve the wording of an error message.

tests/invalid/bad_instance.err_exp:
tests/invalid/bug17.err_exp:
tests/invalid/builtin_int.err_exp:
tests/invalid/foreign_purity_mismatch.err_exp:
tests/invalid/foreign_type_visibility.err_exp:
tests/invalid/fp_dup_bug.err_exp:
tests/invalid/fundeps_vars.err_exp:
tests/invalid/impl_def_literal_syntax.err_exp:
tests/invalid/inline_conflict.err_exp:
tests/invalid/inst_list_dup.err_exp:
tests/invalid/instance_no_type.err_exp:
tests/invalid/invalid_typeclass.err_exp:
tests/invalid/missing_interface_import.err_exp:
tests/invalid/missing_interface_import2.err_exp:
tests/invalid/oisu_check_semantic_errors.err_exp:
tests/invalid/tc_err1.err_exp:
tests/invalid/tc_err2.err_exp:
tests/invalid/transitive_import.err_exp:
tests/invalid/type_with_no_defn.err_exp:
tests/invalid/typeclass_bogus_method.err_exp:
tests/invalid/typeclass_missing_mode_2.err_exp:
tests/invalid/typeclass_test_10.err_exp:
tests/invalid/typeclass_test_3.err_exp:
tests/invalid/typeclass_test_4.err_exp:
tests/invalid/typeclass_test_5.err_exp:
tests/invalid/typeclass_test_9.err_exp:
tests/invalid/types2.err_exp:
tests/invalid/undef_inst.err_exp:
tests/invalid/undef_mode.err_exp:
tests/invalid/undef_mode_and_no_clauses.err_exp:
tests/invalid/undef_type.err_exp:
tests/invalid/undef_type_mod_qual.err_exp:
tests/invalid/uu_type.err_exp:
tests/invalid/where_direct_arg.err_exp:
tests/invalid/where_direct_arg2.err_exp:
tests/invalid/wrong_type_arity.err_exp:
tests/recompilation/add_type_re.err_exp.2:
tests/recompilation/field_r.err_exp.2:
tests/recompilation/remove_type_re.err_exp.2:
tests/warnings/inst_with_no_type.exp:
    Expect the updated versions of error messages.
2017-04-01 20:20:57 +11:00

30 lines
2.0 KiB
Plaintext

foreign_purity_mismatch.m:008: In predicate `pure_with_impure'/1:
foreign_purity_mismatch.m:008: purity error: predicate is impure.
foreign_purity_mismatch.m:008: It must be declared `impure' or promised pure.
foreign_purity_mismatch.m:009: In predicate `pure_with_semipure'/1:
foreign_purity_mismatch.m:009: purity error: predicate is semipure.
foreign_purity_mismatch.m:009: It must be declared `semipure' or promised
foreign_purity_mismatch.m:009: pure.
foreign_purity_mismatch.m:011: In predicate `semipure_with_impure'/1:
foreign_purity_mismatch.m:011: purity error: predicate is impure.
foreign_purity_mismatch.m:011: It must be declared `impure' or promised
foreign_purity_mismatch.m:011: semipure.
foreign_purity_mismatch.m:022: Error: foreign clause for predicate
foreign_purity_mismatch.m:022: `pure_with_impure'/1 has purity impure but
foreign_purity_mismatch.m:022: that predicate has been declared pure.
foreign_purity_mismatch.m:029: Error: foreign clause for predicate
foreign_purity_mismatch.m:029: `pure_with_semipure'/1 has purity semipure but
foreign_purity_mismatch.m:029: that predicate has been declared pure.
foreign_purity_mismatch.m:036: Error: foreign clause for predicate
foreign_purity_mismatch.m:036: `semipure_with_impure'/1 has purity impure but
foreign_purity_mismatch.m:036: that predicate has been declared semipure.
foreign_purity_mismatch.m:043: Error: foreign clause for predicate
foreign_purity_mismatch.m:043: `semipure_with_pure'/1 has purity pure but
foreign_purity_mismatch.m:043: that predicate has been declared semipure.
foreign_purity_mismatch.m:050: Error: foreign clause for predicate
foreign_purity_mismatch.m:050: `impure_with_pure'/1 has purity pure but that
foreign_purity_mismatch.m:050: predicate has been declared impure.
foreign_purity_mismatch.m:057: Error: foreign clause for predicate
foreign_purity_mismatch.m:057: `impure_with_semipure'/1 has purity semipure
foreign_purity_mismatch.m:057: but that predicate has been declared impure.