Files
mercury/tests/warnings/inconsistent_pred_order.exp
Zoltan Somogyi 50c3301737 Simplify some code in error_util.m.
compiler/error_util.m:
    Interpret each context just once per error_msg, not once per line.

    Add the fixed indent after the context, creating a prefix string,
    just once per error_msg, not once per line.

    Compute the length of the prefix directly from the prefix string,
    instead of counting the characters that go into its components.

    Don't print out the line-specific indent on blank lines.

    Replace a quadratic algorithm with a linear one.

    For each line we output, record the total length of its words,
    and the total length available for those words. This prepares
    for a future change that will try to replace several lines, even if
    they ended with "nl" pieces, with one,

    - if the result fits in the available space, and
    - if the text of the lines indicates this is desirable.

compiler/hlds_out_util.m:
compiler/prog_out.m:
    Move the code for writing out indents from hlds_out_util.m to prog_out.m.
    We now want to call it from error_util.m, and it does not depend on the
    HLDS at all.

tests/invalid/anys_in_negated_contexts.err_exp:
tests/invalid/ho_default_func_1.err_exp:
tests/invalid/ho_default_func_3.err_exp:
tests/invalid/ho_type_mode_bug.err_exp:
tests/invalid/modes_erroneous.err_exp:
tests/invalid_nodepend/errors2.err_exp:
tests/warnings/inconsistent_pred_order.exp:
tests/warnings/subtype_order.exp:
    Don't expect the line-specific indent on blank lines.
2022-10-12 15:34:49 +11:00

18 lines
976 B
Plaintext

inconsistent_pred_order.m:010: Warning: the order of the declarations and
inconsistent_pred_order.m:010: definitions of the nonexported predicates is
inconsistent_pred_order.m:010: inconsistent, as shown by this diff:
inconsistent_pred_order.m:010:
inconsistent_pred_order.m:010: --- declaration order
inconsistent_pred_order.m:010: +++ definition order
inconsistent_pred_order.m:010: @@ -1,8 +1,8 @@
inconsistent_pred_order.m:010: predicate `data'/1
inconsistent_pred_order.m:010: predicate `queen'/2
inconsistent_pred_order.m:010: predicate `qperm'/2
inconsistent_pred_order.m:010: -predicate `safe'/1
inconsistent_pred_order.m:010: predicate `qdelete'/3
inconsistent_pred_order.m:010: -predicate `print_list'/3
inconsistent_pred_order.m:010: +predicate `safe'/1
inconsistent_pred_order.m:010: predicate `nodiag'/3
inconsistent_pred_order.m:010: +predicate `print_list'/3
inconsistent_pred_order.m:010: predicate `print_list_elements'/4