Files
mercury/tests/invalid/qualified_cons_id2.err_exp
Zoltan Somogyi f4ad6de055 Generate more readable mode errors.
compiler/mode_errors.m:
    When printing insts in error messages, use predicates specifically
    designed for that purpose.

    The insts output by these predicates improve on the existing output
    in the following ways.

    - We now show the structure of complex insts through indentation.

    - We now show both the name of named insts, and their expansion.
      Sometimes, you need the expanded inst to understand the error message,
      in the case of recursive insts, you cannot expand them forever.
      Since the expansion *has* to refer to the inst name, showing that name
      at the *start* of the expansion is necessary to allow readers to
      understand the inst.

    - We now eliminate the module qualification from the names of function
      symbols. The module qualifiers on function symbols are specified
      by the type, not the inst, of the relevant term, and if we get to
      the point of mode analysis having been run, then the predicate
      we are generating errors for must be *type* correct, though obviously
      it is not *mode* correct.

    - We now eliminate the module qualification from names of named insts
      if the module qualifier is the name of the module being compiled.
      This is a common case, and in these cases, the module qualifier
      in the error message acts as clutter, making it *harder* to read.

    - We now avoid printing parentheses that humans never need, but which
      the parser sometimes does, and which the existing inst output predicates
      therefore had to print.

    - Higher order insts contain the modes of the function or predicate.
      We now print the builtin modes as e.g. "in" instead of the old
      "free >> ground".

compiler/error_util.m:
    Add some utility predicates now needed by mode_errors.m.

tests/invalid/any_passed_as_ground.err_exp2:
tests/invalid/anys_in_negated_contexts.err_exp:
tests/invalid/bind_in_negated.err_exp:
tests/invalid/bug117.err_exp:
tests/invalid/bug191.err_exp:
tests/invalid/constrained_poly_insts.err_exp:
tests/invalid/constrained_poly_insts2.err_exp:
tests/invalid/ho_any_inst.err_exp:
tests/invalid/ho_default_func_1.err_exp:
tests/invalid/ho_default_func_2.sub.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/merge_ground_any.err_exp:
tests/invalid/merge_inst_error.err_exp:
tests/invalid/multimode_dcg.err_exp:
tests/invalid/occurs.err_exp:
tests/invalid/partial_implied_mode.err_exp:
tests/invalid/polymorphic_unification.err_exp:
tests/invalid/qualified_cons_id2.err_exp:
tests/invalid/state_vars_test4.err_exp:
tests/invalid/try_detism.err_exp2:
tests/warnings/unify_f_g.exp:
    Update expected outputs.
2015-11-29 04:33:41 +11:00

18 lines
990 B
Plaintext

qualified_cons_id2.m:020: In `test'(in(bound(qualified_cons_id2.yes(ground))),
qualified_cons_id2.m:020: out):
qualified_cons_id2.m:020: error: determinism declaration not satisfied.
qualified_cons_id2.m:020: Declared `det', inferred `failure'.
qualified_cons_id2.m:020: In mode declarations for predicate
qualified_cons_id2.m:020: `qualified_cons_id2.test'/2:
qualified_cons_id2.m:020: error: duplicate mode declaration.
qualified_cons_id2.m:021: Here is the conflicting mode declaration.
qualified_cons_id2.m:025: In clause for
qualified_cons_id2.m:025: `test(in(bound(qualified_cons_id2.yes(ground))),
qualified_cons_id2.m:025: out)':
qualified_cons_id2.m:025: in argument 1 of clause head:
qualified_cons_id2.m:025: warning: unification of `HeadVar__1' and maybe.yes
qualified_cons_id2.m:025: cannot succeed.
qualified_cons_id2.m:025: `HeadVar__1' has instantiatedness
qualified_cons_id2.m:025: `bound(yes(ground))'.
For more information, recompile with `-E'.