diff --git a/compiler/parse_tree_out_misc.m b/compiler/parse_tree_out_misc.m index 5c66d9f2f..64afcf2df 100644 --- a/compiler/parse_tree_out_misc.m +++ b/compiler/parse_tree_out_misc.m @@ -2,7 +2,7 @@ % vim: ft=mercury ts=4 sw=4 et %---------------------------------------------------------------------------% % Copyright (C) 1994-2012 The University of Melbourne. -% Copyright (C) 2014-2018, 2023-2024 The Mercury team. +% Copyright (C) 2014-2018, 2023-2025 The Mercury team. % This file may only be copied under the terms of the GNU General % Public License - see the file COPYING in the Mercury distribution. %---------------------------------------------------------------------------% @@ -115,6 +115,7 @@ % (at the moment, just the line number) in a form suitable for the % beginning of an error message. % +:- func no_space_context_to_string(prog_context) = string. :- func context_to_string(prog_context) = string. :- pred write_context(io.text_output_stream::in, prog_context::in, io::di, io::uo) is det. @@ -345,9 +346,16 @@ mercury_format_foreign_language_string(Lang, S, !U) :- %---------------------------------------------------------------------------% +no_space_context_to_string(Context) = ContextStr :- + Context = context(FileName, LineNumber), + ( if FileName = "" then + ContextStr = "" + else + string.format("%s:%03d:", [s(FileName), i(LineNumber)], ContextStr) + ). + context_to_string(Context) = ContextStr :- - FileName = term_context.context_file(Context), - LineNumber = term_context.context_line(Context), + Context = context(FileName, LineNumber), ( if FileName = "" then ContextStr = "" else diff --git a/compiler/write_error_spec.m b/compiler/write_error_spec.m index 576bfa4ff..bf892b8b7 100644 --- a/compiler/write_error_spec.m +++ b/compiler/write_error_spec.m @@ -637,15 +637,17 @@ write_msg_pieces(Stream, ColorDb, MaybeMaxWidth, MsgPieces, !IO) :- ( MaybeContext = yes(Context), % ContextStr will include a space after the context itself. - ContextStr = context_to_string(Context) + ContextStr = context_to_string(Context), + NoSpaceContextStr = no_space_context_to_string(Context) ; MaybeContext = no, - ContextStr = "" + ContextStr = "", + NoSpaceContextStr = "" ), Pieces = one_or_more_to_list(OoMPieces), - convert_pieces_to_lines(ColorDb, MaybeMaxWidth, ContextStr, - TreatAsFirst, Indent, Pieces, PrefixStr, Lines), - write_msg_lines(Stream, PrefixStr, Lines, !IO). + convert_pieces_to_lines(ColorDb, MaybeMaxWidth, ContextStr, TreatAsFirst, + Indent, Pieces, PrefixStr, Lines), + write_msg_lines(Stream, PrefixStr, NoSpaceContextStr, Lines, !IO). %---------------------------------------------------------------------------% % @@ -2254,22 +2256,24 @@ error_line_len(Line) = LineLen :- %---------------------% -:- pred write_msg_lines(io.text_output_stream::in, string::in, +:- pred write_msg_lines(io.text_output_stream::in, string::in, string::in, list(error_line)::in, io::di, io::uo) is det. -write_msg_lines(_Stream, _, [], !IO). -write_msg_lines(Stream, PrefixStr, [Line | Lines], !IO) :- - write_msg_line(Stream, PrefixStr, Line, !IO), - write_msg_lines(Stream, PrefixStr, Lines, !IO). +write_msg_lines(_Stream, _, _, [], !IO). +write_msg_lines(Stream, PrefixStr, NoSpaceContextStr, [Line | Lines], !IO) :- + write_msg_line(Stream, PrefixStr, NoSpaceContextStr, Line, !IO), + write_msg_lines(Stream, PrefixStr, NoSpaceContextStr, Lines, !IO). -:- pred write_msg_line(io.text_output_stream::in, string::in, error_line::in, - io::di, io::uo) is det. +:- pred write_msg_line(io.text_output_stream::in, string::in, string::in, + error_line::in, io::di, io::uo) is det. -write_msg_line(Stream, PrefixStr, Line, !IO) :- +write_msg_line(Stream, PrefixStr, NoSpaceContextStr, Line, !IO) :- LineWordsStr = convert_line_words_to_string(Line), ( if LineWordsStr = "" then % Don't bother to print out indents that are followed by nothing. - io.format(Stream, "%s\n", [s(PrefixStr)], !IO) + % This includes the single space indent that is always included + % at the end of any PrefixStr that is not the empty string. + io.format(Stream, "%s\n", [s(NoSpaceContextStr)], !IO) else LineIndent = Line ^ line_indent_level, IndentStr = indent2_string(LineIndent), diff --git a/tests/invalid/actual_more_expected.err_exp b/tests/invalid/actual_more_expected.err_exp index db883caa5..fd165c3ec 100644 --- a/tests/invalid/actual_more_expected.err_exp +++ b/tests/invalid/actual_more_expected.err_exp @@ -14,7 +14,7 @@ actual_more_expected.m:029: D_4: list.list(actual_more_expected.dir) actual_more_expected.m:029: S_5: int actual_more_expected.m:029: F_6: int actual_more_expected.m:029: V_7: pred(int, actual_more_expected.dir, int) -actual_more_expected.m:029: +actual_more_expected.m:029: actual_more_expected.m:029: Type assignment 2, derived from predicate actual_more_expected.m:029: `list.foldl'/4: actual_more_expected.m:029: D_4: list.list(actual_more_expected.dir) diff --git a/tests/invalid/ambiguous_overloading_error.err_exp b/tests/invalid/ambiguous_overloading_error.err_exp index 9ee37dc59..30bcc09ea 100644 --- a/tests/invalid/ambiguous_overloading_error.err_exp +++ b/tests/invalid/ambiguous_overloading_error.err_exp @@ -7,7 +7,7 @@ ambiguous_overloading_error.m:059: In clause for predicate `ambig_overload1'/1: ambiguous_overloading_error.m:059: error: excessively ambiguous overloading. ambiguous_overloading_error.m:059: The following symbol was overloaded in the ambiguous_overloading_error.m:059: following contexts. -ambiguous_overloading_error.m:057: +ambiguous_overloading_error.m:057: ambiguous_overloading_error.m:057: The function symbol `f'/0. ambiguous_overloading_error.m:057: The possible matches are: ambiguous_overloading_error.m:057: the builtin type constructor @@ -23,14 +23,14 @@ ambiguous_overloading_error.m:062: In clause for predicate `ambig_overload2'/1: ambiguous_overloading_error.m:062: warning: highly ambiguous overloading. ambiguous_overloading_error.m:062: The following symbols were overloaded in ambiguous_overloading_error.m:062: the following contexts. -ambiguous_overloading_error.m:062: +ambiguous_overloading_error.m:062: ambiguous_overloading_error.m:062: The function symbol `a1'/0. ambiguous_overloading_error.m:062: The possible matches are: ambiguous_overloading_error.m:062: the type constructor ambiguous_overloading_error.m:062: `ambiguous_overloading_error.baz'/0, ambiguous_overloading_error.m:062: the type constructor ambiguous_overloading_error.m:062: `ambiguous_overloading_error.qux'/0. -ambiguous_overloading_error.m:062: +ambiguous_overloading_error.m:062: ambiguous_overloading_error.m:062: The function symbol `a2'/0. ambiguous_overloading_error.m:062: The possible matches are: ambiguous_overloading_error.m:062: the type constructor @@ -41,7 +41,7 @@ ambiguous_overloading_error.m:116: In clause for predicate `test_lt'/1: ambiguous_overloading_error.m:116: error: excessively ambiguous overloading. ambiguous_overloading_error.m:116: The following symbol was overloaded in the ambiguous_overloading_error.m:116: following contexts. -ambiguous_overloading_error.m:067: +ambiguous_overloading_error.m:067: ambiguous_overloading_error.m:067: The predicate symbol `<'/2. ambiguous_overloading_error.m:067: The possible matches are: ambiguous_overloading_error.m:067: predicate `float.<'/2, @@ -62,7 +62,7 @@ ambiguous_overloading_error.m:126: `set_browser_param_from_option_table'/3: ambiguous_overloading_error.m:126: warning: highly ambiguous overloading. ambiguous_overloading_error.m:126: The following symbol was overloaded in the ambiguous_overloading_error.m:126: following contexts. -ambiguous_overloading_error.m:121: +ambiguous_overloading_error.m:121: ambiguous_overloading_error.m:121: The function symbol ambiguous_overloading_error.m:121: `lookup_bool_option'/2. ambiguous_overloading_error.m:121: The possible matches are: diff --git a/tests/invalid/any_passed_as_ground.err_exp b/tests/invalid/any_passed_as_ground.err_exp index a0d04c818..4183c44ea 100644 --- a/tests/invalid/any_passed_as_ground.err_exp +++ b/tests/invalid/any_passed_as_ground.err_exp @@ -3,7 +3,7 @@ any_passed_as_ground.m:029: in call to predicate `list.member'/2: any_passed_as_ground.m:029: mode error: the insts of arguments `V_10' and any_passed_as_ground.m:029: `Xs' do not match either of the two modes of any_passed_as_ground.m:029: predicate `list.member'/2. -any_passed_as_ground.m:029: +any_passed_as_ground.m:029: any_passed_as_ground.m:029: The inst of the second argument, `Xs', which is any_passed_as_ground.m:029: `any', does not match any of the required any_passed_as_ground.m:029: insts. diff --git a/tests/invalid/anys_in_negated_contexts.err_exp b/tests/invalid/anys_in_negated_contexts.err_exp index b2d4351ad..0b8bc85fc 100644 --- a/tests/invalid/anys_in_negated_contexts.err_exp +++ b/tests/invalid/anys_in_negated_contexts.err_exp @@ -12,7 +12,7 @@ anys_in_negated_contexts.m:083: In clause for `bad_lambda(in)': anys_in_negated_contexts.m:083: mode error in conjunction. The next two error anys_in_negated_contexts.m:083: messages indicate possible causes of this anys_in_negated_contexts.m:083: error. -anys_in_negated_contexts.m:083: +anys_in_negated_contexts.m:083: anys_in_negated_contexts.m:082: In clause for `bad_lambda(in)': anys_in_negated_contexts.m:082: purity error: lambda is `ground' but contains anys_in_negated_contexts.m:082: the following non-local variable whose inst @@ -22,7 +22,7 @@ anys_in_negated_contexts.m:082: written `any_pred(Args) is det :- ...'. anys_in_negated_contexts.m:082: Function expressions with inst `any' can be anys_in_negated_contexts.m:082: written anys_in_negated_contexts.m:082: `any_func(Args) = Result is det :- ...'. -anys_in_negated_contexts.m:083: +anys_in_negated_contexts.m:083: anys_in_negated_contexts.m:083: In clause for `bad_lambda(in)': anys_in_negated_contexts.m:083: in the predicate term of the higher order anys_in_negated_contexts.m:083: call to the predicate variable `P': diff --git a/tests/invalid/bad_ambiguity_msg.err_exp b/tests/invalid/bad_ambiguity_msg.err_exp index f86c036ad..460dd2d2e 100644 --- a/tests/invalid/bad_ambiguity_msg.err_exp +++ b/tests/invalid/bad_ambiguity_msg.err_exp @@ -2,7 +2,7 @@ bad_ambiguity_msg.m:035: In clause for predicate `main'/2: bad_ambiguity_msg.m:035: warning: highly ambiguous overloading. bad_ambiguity_msg.m:035: The following symbol was overloaded in the following bad_ambiguity_msg.m:035: context. -bad_ambiguity_msg.m:038: +bad_ambiguity_msg.m:038: bad_ambiguity_msg.m:038: The predicate symbol `append'/3. bad_ambiguity_msg.m:038: The possible matches are: bad_ambiguity_msg.m:038: predicate `bad_ambiguity_msg.append'/3, diff --git a/tests/invalid/bug150.err_exp b/tests/invalid/bug150.err_exp index b0bd23467..0d182c5d8 100644 --- a/tests/invalid/bug150.err_exp +++ b/tests/invalid/bug150.err_exp @@ -2,6 +2,6 @@ bug150.m:014: Error: the implicit determinism declaration for function [38;5;87 bug150.m:014: is not satisfied. bug150.m:014: Declared `det', inferred `semidet'. bug150.m:014: The reason for the difference is the following. -bug150.m:018: +bug150.m:018: bug150.m:018: In argument 1 of clause head: bug150.m:018: unification of `HeadVar__1' and `list.[H | _T]' can fail. diff --git a/tests/invalid/bug150_partial_color.err_exp b/tests/invalid/bug150_partial_color.err_exp index 6c2f165ba..1260882f8 100644 --- a/tests/invalid/bug150_partial_color.err_exp +++ b/tests/invalid/bug150_partial_color.err_exp @@ -2,7 +2,7 @@ bug150_partial_color.m:014: Error: the implicit determinism declaration for bug150_partial_color.m:014: function `car'/1 is not satisfied. bug150_partial_color.m:014: Declared `det', inferred `semidet'. bug150_partial_color.m:014: The reason for the difference is the following. -bug150_partial_color.m:018: +bug150_partial_color.m:018: bug150_partial_color.m:018: In argument 1 of clause head: bug150_partial_color.m:018: unification of `HeadVar__1' and `list.[H | _T]' bug150_partial_color.m:018: can fail. diff --git a/tests/invalid/bug496.err_exp b/tests/invalid/bug496.err_exp index 28767620f..3335d4ecc 100644 --- a/tests/invalid/bug496.err_exp +++ b/tests/invalid/bug496.err_exp @@ -2,18 +2,18 @@ bug496.m:022: Error: the determinism declaration for predicate bug496.m:022: `options_to_action'/3 is not satisfied. bug496.m:022: Declared `det', inferred `nondet'. bug496.m:022: The reasons for the difference are the following. -bug496.m:050: +bug496.m:050: bug496.m:050: Inside the case [|]/2 of the switch on AllActions: bug496.m:050: disjunction has more than one disjunct with solutions. -bug496.m:053: +bug496.m:053: bug496.m:053: This later disjunct may have a solution. -bug496.m:050: +bug496.m:050: bug496.m:050: In argument 2 of functor `[|]/2': bug496.m:050: unification with `list.[]' can fail. -bug496.m:053: +bug496.m:053: bug496.m:053: In argument 2 of functor `[|]/2': bug496.m:053: unification with `list.[V_11 | V_12]' can fail. -bug496.m:050: +bug496.m:050: bug496.m:050: It is possible that the cause of the declared determinism not bug496.m:050: being satisfied is the inability of determinism analysis to bug496.m:050: recognize that a disjunction (usually created by the compiler diff --git a/tests/invalid/det_atomic_goal_msgs.err_exp b/tests/invalid/det_atomic_goal_msgs.err_exp index f0b374eab..f5ae12941 100644 --- a/tests/invalid/det_atomic_goal_msgs.err_exp +++ b/tests/invalid/det_atomic_goal_msgs.err_exp @@ -2,21 +2,21 @@ det_atomic_goal_msgs.m:011: Error: the determinism declaration for predicate det_atomic_goal_msgs.m:011: `det_calls_failure'/2 is not satisfied. det_atomic_goal_msgs.m:011: Declared `det', inferred `failure'. det_atomic_goal_msgs.m:011: The reason for the difference is the following. -det_atomic_goal_msgs.m:018: +det_atomic_goal_msgs.m:018: det_atomic_goal_msgs.m:018: This call to predicate det_atomic_goal_msgs.m:018: `det_atomic_goal_msgs.failure_pred'/1 can fail. det_atomic_goal_msgs.m:012: Error: the determinism declaration for predicate det_atomic_goal_msgs.m:012: `det_calls_semidet'/2 is not satisfied. det_atomic_goal_msgs.m:012: Declared `det', inferred `semidet'. det_atomic_goal_msgs.m:012: The reason for the difference is the following. -det_atomic_goal_msgs.m:019: +det_atomic_goal_msgs.m:019: det_atomic_goal_msgs.m:019: This call to predicate det_atomic_goal_msgs.m:019: `det_atomic_goal_msgs.semidet_pred'/1 can fail. det_atomic_goal_msgs.m:013: Error: the determinism declaration for predicate det_atomic_goal_msgs.m:013: `det_calls_multi'/1 is not satisfied. det_atomic_goal_msgs.m:013: Declared `det', inferred `multi'. det_atomic_goal_msgs.m:013: The reason for the difference is the following. -det_atomic_goal_msgs.m:020: +det_atomic_goal_msgs.m:020: det_atomic_goal_msgs.m:020: This call to predicate det_atomic_goal_msgs.m:020: `det_atomic_goal_msgs.multi_pred'/1 can succeed det_atomic_goal_msgs.m:020: more than once. @@ -24,7 +24,7 @@ det_atomic_goal_msgs.m:014: Error: the determinism declaration for predicate det_atomic_goal_msgs.m:014: `det_calls_nondet'/2 is not satisfied. det_atomic_goal_msgs.m:014: Declared `det', inferred `nondet'. det_atomic_goal_msgs.m:014: The reason for the difference is the following. -det_atomic_goal_msgs.m:021: +det_atomic_goal_msgs.m:021: det_atomic_goal_msgs.m:021: This call to predicate det_atomic_goal_msgs.m:021: `det_atomic_goal_msgs.nondet_pred'/2 can fail and det_atomic_goal_msgs.m:021: can succeed more than once. diff --git a/tests/invalid/det_errors.err_exp b/tests/invalid/det_errors.err_exp index b750015e0..acdf89c91 100644 --- a/tests/invalid/det_errors.err_exp +++ b/tests/invalid/det_errors.err_exp @@ -2,33 +2,33 @@ det_errors.m:009: Error: the determinism declaration for predicate `p1 det_errors.m:009: not satisfied. det_errors.m:009: Declared `det', inferred `semidet'. det_errors.m:009: The reason for the difference is the following. -det_errors.m:042: +det_errors.m:042: det_errors.m:042: In argument 1 of clause head: det_errors.m:042: unification of `HeadVar__1' and `42' can fail. det_errors.m:010: Error: the determinism declaration for predicate `p2'/1 is det_errors.m:010: not satisfied. det_errors.m:010: Declared `det', inferred `semidet'. det_errors.m:010: The reason for the difference is the following. -det_errors.m:043: +det_errors.m:043: det_errors.m:043: Unification of `X' and `42' can fail. det_errors.m:011: Error: the determinism declaration for predicate `p3'/1 is det_errors.m:011: not satisfied. det_errors.m:011: Declared `det', inferred `semidet'. det_errors.m:011: The reason for the difference is the following. -det_errors.m:044: +det_errors.m:044: det_errors.m:044: Unification of `X' and `42' can fail. det_errors.m:012: Error: the determinism declaration for predicate `p4'/1 is det_errors.m:012: not satisfied. det_errors.m:012: Declared `det', inferred `semidet'. det_errors.m:012: The reason for the difference is the following. -det_errors.m:045: +det_errors.m:045: det_errors.m:045: In argument 2 of functor `+/2': det_errors.m:045: unification with `21' can fail. det_errors.m:026: Error: the determinism declaration for predicate `q'/2 is not det_errors.m:026: satisfied. det_errors.m:026: Declared `det', inferred `semidet'. det_errors.m:026: The reason for the difference is the following. -det_errors.m:048: +det_errors.m:048: det_errors.m:048: The switch on `HeadVar__1' does not cover det_errors.m:048: `d'/0, det_errors.m:048: `e'/0, @@ -40,10 +40,10 @@ det_errors.m:034: Error: the determinism declaration for predicate `r' det_errors.m:034: satisfied. det_errors.m:034: Declared `det', inferred `nondet'. det_errors.m:034: The reasons for the difference are the following. -det_errors.m:054: +det_errors.m:054: det_errors.m:054: The switch on `U' does not cover det_errors.m:054: `u2'/0. -det_errors.m:057: +det_errors.m:057: det_errors.m:057: Inside the case u3(V_16) of the switch on U: det_errors.m:057: the switch on `V_16' does not cover det_errors.m:057: `d'/0, @@ -52,25 +52,25 @@ det_errors.m:057: `f'/0, det_errors.m:057: `g'/0, det_errors.m:057: `h'/1, det_errors.m:057: `i'/1. -det_errors.m:066: +det_errors.m:066: det_errors.m:066: Inside the case u4(V_17) of the switch on U: det_errors.m:066: the switch on `V_17' does not cover det_errors.m:066: `h'/1, det_errors.m:066: `i'/1. -det_errors.m:075: +det_errors.m:075: det_errors.m:075: Inside the case u4(V_17) of the switch on U: det_errors.m:075: inside the case d/0 of the switch on V_17: det_errors.m:075: disjunction has more than one disjunct with solutions. -det_errors.m:078: +det_errors.m:078: det_errors.m:078: This later disjunct may have a solution. det_errors.m:035: Error: the determinism declaration for predicate `s'/2 is not det_errors.m:035: satisfied. det_errors.m:035: Declared `det', inferred `nondet'. det_errors.m:035: The reasons for the difference are the following. -det_errors.m:093: +det_errors.m:093: det_errors.m:093: The switch on `U' does not cover det_errors.m:093: `u2'/0. -det_errors.m:096: +det_errors.m:096: det_errors.m:096: Inside the case u3(V_11) of the switch on U: det_errors.m:096: the switch on `V_11' does not cover det_errors.m:096: `d'/0, @@ -79,21 +79,21 @@ det_errors.m:096: `f'/0, det_errors.m:096: `g'/0, det_errors.m:096: `h'/1, det_errors.m:096: `i'/1. -det_errors.m:116: +det_errors.m:116: det_errors.m:116: Inside the case u4(V) of the switch on U: det_errors.m:116: inside the case d/0 of the switch on V: det_errors.m:116: disjunction has more than one disjunct with solutions. -det_errors.m:119: +det_errors.m:119: det_errors.m:119: This later disjunct may have a solution. -det_errors.m:125: +det_errors.m:125: det_errors.m:125: Inside the case u4(V) of the switch on U: det_errors.m:125: inside the case e/0, f/0 of the switch on V: det_errors.m:125: disjunction has more than one disjunct with solutions. -det_errors.m:126: +det_errors.m:126: det_errors.m:126: This later disjunct may have a solution. -det_errors.m:135: +det_errors.m:135: det_errors.m:135: Inside the case u4(V) of the switch on U: det_errors.m:135: inside the case h/1, i/1 of the switch on V: det_errors.m:135: disjunction has more than one disjunct with solutions. -det_errors.m:136: +det_errors.m:136: det_errors.m:136: This later disjunct may have a solution. diff --git a/tests/invalid/det_errors_and_io.err_exp b/tests/invalid/det_errors_and_io.err_exp index 3b2566ae6..5dfab3d0a 100644 --- a/tests/invalid/det_errors_and_io.err_exp +++ b/tests/invalid/det_errors_and_io.err_exp @@ -2,6 +2,6 @@ det_errors_and_io.m:038: Error: the determinism declaration for predicate det_errors_and_io.m:038: `bad_pred'/3 is not satisfied. det_errors_and_io.m:038: Declared `det', inferred `semidet'. det_errors_and_io.m:038: The reason for the difference is the following. -det_errors_and_io.m:042: +det_errors_and_io.m:042: det_errors_and_io.m:042: The switch on `T' does not cover det_errors_and_io.m:042: `d'/0. diff --git a/tests/invalid/det_errors_deep.err_exp b/tests/invalid/det_errors_deep.err_exp index d66bab9f7..936be4782 100644 --- a/tests/invalid/det_errors_deep.err_exp +++ b/tests/invalid/det_errors_deep.err_exp @@ -2,14 +2,14 @@ det_errors_deep.m:021: Error: the determinism declaration for predicate [38;5;8 det_errors_deep.m:021: is not satisfied. det_errors_deep.m:021: Declared `det', inferred `semidet'. det_errors_deep.m:021: The reason for the difference is the following. -det_errors_deep.m:030: +det_errors_deep.m:030: det_errors_deep.m:030: In argument 2 of clause head: det_errors_deep.m:030: unification of `HeadVar__2' and `X' can fail. det_errors_deep.m:022: Error: the determinism declaration for predicate `p2'/3 det_errors_deep.m:022: is not satisfied. det_errors_deep.m:022: Declared `det', inferred `semidet'. det_errors_deep.m:022: The reason for the difference is the following. -det_errors_deep.m:033: +det_errors_deep.m:033: det_errors_deep.m:033: In argument 2 of clause head: det_errors_deep.m:033: in argument 2 of functor `node/3': det_errors_deep.m:033: unification with `X' can fail. @@ -17,11 +17,11 @@ det_errors_deep.m:023: Error: the determinism declaration for predicate [38;5;8 det_errors_deep.m:023: is not satisfied. det_errors_deep.m:023: Declared `det', inferred `semidet'. det_errors_deep.m:023: The reasons for the difference are the following. -det_errors_deep.m:035: +det_errors_deep.m:035: det_errors_deep.m:035: In argument 2 of clause head: det_errors_deep.m:035: unification of `HeadVar__2' and det_errors_deep.m:035: `det_errors_deep.node(_L, V_8, _R)' can fail. -det_errors_deep.m:035: +det_errors_deep.m:035: det_errors_deep.m:035: In argument 2 of clause head: det_errors_deep.m:035: in argument 2 of functor `node/3': det_errors_deep.m:035: unification with `X' can fail. @@ -29,14 +29,14 @@ det_errors_deep.m:024: Error: the determinism declaration for predicate [38;5;8 det_errors_deep.m:024: is not satisfied. det_errors_deep.m:024: Declared `det', inferred `semidet'. det_errors_deep.m:024: The reasons for the difference are the following. -det_errors_deep.m:038: +det_errors_deep.m:038: det_errors_deep.m:038: In argument 2 of clause head: det_errors_deep.m:038: unification of `HeadVar__2' and `X' can fail. -det_errors_deep.m:039: +det_errors_deep.m:039: det_errors_deep.m:039: In argument 1 of clause head: det_errors_deep.m:039: in argument 3 of functor `node/3': det_errors_deep.m:039: in argument 2 of functor `node/3': det_errors_deep.m:039: unification with `X' can fail. -det_errors_deep.m:039: +det_errors_deep.m:039: det_errors_deep.m:039: In argument 2 of clause head: det_errors_deep.m:039: unification of `HeadVar__2' and `X' can fail. diff --git a/tests/invalid/ho_default_func_1.err_exp b/tests/invalid/ho_default_func_1.err_exp index 01c655bad..d4a6656f2 100644 --- a/tests/invalid/ho_default_func_1.err_exp +++ b/tests/invalid/ho_default_func_1.err_exp @@ -1,13 +1,13 @@ ho_default_func_1.m:037: In clause for `baz(in, out)': ho_default_func_1.m:037: mode error in conjunction. The next two error ho_default_func_1.m:037: messages indicate possible causes of this error. -ho_default_func_1.m:037: +ho_default_func_1.m:037: ho_default_func_1.m:037: In clause for `baz(in, out)': ho_default_func_1.m:037: in call to function `univ.univ'/1: ho_default_func_1.m:037: mode error: the insts of argument `V_7' and the ho_default_func_1.m:037: return value `V_6' do not match any of the three ho_default_func_1.m:037: modes for function `univ.univ'/1. -ho_default_func_1.m:037: +ho_default_func_1.m:037: ho_default_func_1.m:037: The inst of the first argument, `V_7', which is ho_default_func_1.m:037: `/* unique */ (func(out) = in is det)', does not ho_default_func_1.m:037: match the inst required by some of the modes of @@ -16,21 +16,21 @@ ho_default_func_1.m:037: (For higher order insts like this, the mismatch is ho_default_func_1.m:037: sometimes caused by the arity of the predicate or ho_default_func_1.m:037: function being different in the inst than in the ho_default_func_1.m:037: type.) -ho_default_func_1.m:037: +ho_default_func_1.m:037: ho_default_func_1.m:037: The inst of the return value `V_6', which is ho_default_func_1.m:037: `free', does not match the inst required by some ho_default_func_1.m:037: of the modes of the callee, namely the third mode. -ho_default_func_1.m:037: +ho_default_func_1.m:037: ho_default_func_1.m:037: In clause for `baz(in, out)': ho_default_func_1.m:037: in call to predicate `univ.univ_to_type'/2: ho_default_func_1.m:037: mode error: the insts of arguments `V_6' and `Y0' do ho_default_func_1.m:037: not match any of the three modes for predicate ho_default_func_1.m:037: `univ.univ_to_type'/2. -ho_default_func_1.m:037: +ho_default_func_1.m:037: ho_default_func_1.m:037: The inst of the first argument, `V_6', which is ho_default_func_1.m:037: `free', does not match the inst required by some ho_default_func_1.m:037: of the modes of the callee, namely the first mode. -ho_default_func_1.m:037: +ho_default_func_1.m:037: ho_default_func_1.m:037: The inst of the second argument, `Y0', which is ho_default_func_1.m:037: `free', does not match the inst required by some ho_default_func_1.m:037: of the modes of the callee, namely the second and diff --git a/tests/invalid/ho_default_func_3.err_exp b/tests/invalid/ho_default_func_3.err_exp index 91b43aac7..4cc00b624 100644 --- a/tests/invalid/ho_default_func_3.err_exp +++ b/tests/invalid/ho_default_func_3.err_exp @@ -1,13 +1,13 @@ ho_default_func_3.m:037: In clause for `baz(in, out)': ho_default_func_3.m:037: mode error in conjunction. The next two error ho_default_func_3.m:037: messages indicate possible causes of this error. -ho_default_func_3.m:037: +ho_default_func_3.m:037: ho_default_func_3.m:037: In clause for `baz(in, out)': ho_default_func_3.m:037: in call to function `univ.univ'/1: ho_default_func_3.m:037: mode error: the insts of argument `V_7' and the ho_default_func_3.m:037: return value `V_6' do not match any of the three ho_default_func_3.m:037: modes for function `univ.univ'/1. -ho_default_func_3.m:037: +ho_default_func_3.m:037: ho_default_func_3.m:037: The inst of the first argument, `V_7', which is ho_default_func_3.m:037: `/* unique */ (func(di) = uo is det)', does not ho_default_func_3.m:037: match the inst required by some of the modes of @@ -16,21 +16,21 @@ ho_default_func_3.m:037: (For higher order insts like this, the mismatch is ho_default_func_3.m:037: sometimes caused by the arity of the predicate or ho_default_func_3.m:037: function being different in the inst than in the ho_default_func_3.m:037: type.) -ho_default_func_3.m:037: +ho_default_func_3.m:037: ho_default_func_3.m:037: The inst of the return value `V_6', which is ho_default_func_3.m:037: `free', does not match the inst required by some ho_default_func_3.m:037: of the modes of the callee, namely the third mode. -ho_default_func_3.m:037: +ho_default_func_3.m:037: ho_default_func_3.m:037: In clause for `baz(in, out)': ho_default_func_3.m:037: in call to predicate `univ.univ_to_type'/2: ho_default_func_3.m:037: mode error: the insts of arguments `V_6' and `Y0' do ho_default_func_3.m:037: not match any of the three modes for predicate ho_default_func_3.m:037: `univ.univ_to_type'/2. -ho_default_func_3.m:037: +ho_default_func_3.m:037: ho_default_func_3.m:037: The inst of the first argument, `V_6', which is ho_default_func_3.m:037: `free', does not match the inst required by some ho_default_func_3.m:037: of the modes of the callee, namely the first mode. -ho_default_func_3.m:037: +ho_default_func_3.m:037: ho_default_func_3.m:037: The inst of the second argument, `Y0', which is ho_default_func_3.m:037: `free', does not match the inst required by some ho_default_func_3.m:037: of the modes of the callee, namely the second and diff --git a/tests/invalid/ho_default_func_4.err_exp b/tests/invalid/ho_default_func_4.err_exp index 6c1f38b2b..5c13194c1 100644 --- a/tests/invalid/ho_default_func_4.err_exp +++ b/tests/invalid/ho_default_func_4.err_exp @@ -3,7 +3,7 @@ ho_default_func_4.m:039: in call to function `univ.univ'/1: ho_default_func_4.m:039: mode error: the insts of argument `V_7' and the ho_default_func_4.m:039: return value `V_6' do not match any of the three ho_default_func_4.m:039: modes for function `univ.univ'/1. -ho_default_func_4.m:039: +ho_default_func_4.m:039: ho_default_func_4.m:039: The inst of the first argument, `V_7', which is ho_default_func_4.m:039: /* unique */ (func( ho_default_func_4.m:039: in(named inst one @@ -20,7 +20,7 @@ ho_default_func_4.m:039: (For higher order insts like this, the mismatch is ho_default_func_4.m:039: sometimes caused by the arity of the predicate or ho_default_func_4.m:039: function being different in the inst than in the ho_default_func_4.m:039: type.) -ho_default_func_4.m:039: +ho_default_func_4.m:039: ho_default_func_4.m:039: The inst of the return value `V_6', which is ho_default_func_4.m:039: `free', does not match the inst required by some ho_default_func_4.m:039: of the modes of the callee, namely the third mode. diff --git a/tests/invalid/ho_type_mode_bug.err_exp b/tests/invalid/ho_type_mode_bug.err_exp index a45e4944e..fe1a82364 100644 --- a/tests/invalid/ho_type_mode_bug.err_exp +++ b/tests/invalid/ho_type_mode_bug.err_exp @@ -11,14 +11,14 @@ ho_type_mode_bug.m:029: In clause for `my_foldl2((pred(in, in, out) is det), ho_type_mode_bug.m:029: in, in, out, di, uo)': ho_type_mode_bug.m:029: mode error in conjunction. The next four error ho_type_mode_bug.m:029: messages indicate possible causes of this error. -ho_type_mode_bug.m:029: +ho_type_mode_bug.m:029: ho_type_mode_bug.m:028: In clause for `my_foldl2((pred(in, in, out) is det), ho_type_mode_bug.m:028: in, in, out, di, uo)': ho_type_mode_bug.m:028: in argument 1 of the call to the `call' builtin ho_type_mode_bug.m:028: predicate: ho_type_mode_bug.m:028: mode error: context requires a predicate of ho_type_mode_bug.m:028: arity five, but `P' has arity three. -ho_type_mode_bug.m:029: +ho_type_mode_bug.m:029: ho_type_mode_bug.m:029: In clause for `my_foldl2((pred(in, in, out) is det), ho_type_mode_bug.m:029: in, in, out, di, uo)': ho_type_mode_bug.m:029: in call to predicate `ho_type_mode_bug.my_foldl2'/6: @@ -26,7 +26,7 @@ ho_type_mode_bug.m:029: mode error: the insts of arguments `P'[39;4 ho_type_mode_bug.m:029: `FirstAcc1', `FirstAcc', `SecAcc1' and `SecAcc' do ho_type_mode_bug.m:029: not match either of the two modes of predicate ho_type_mode_bug.m:029: `ho_type_mode_bug.my_foldl2'/6. -ho_type_mode_bug.m:029: +ho_type_mode_bug.m:029: ho_type_mode_bug.m:029: The inst of the first argument, `P', which is ho_type_mode_bug.m:029: `(pred(in, in, out) is det)', does not match any of ho_type_mode_bug.m:029: the required insts. @@ -34,14 +34,14 @@ ho_type_mode_bug.m:029: (For higher order insts like this, the mismatch is ho_type_mode_bug.m:029: sometimes caused by the arity of the predicate or ho_type_mode_bug.m:029: function being different in the inst than in the ho_type_mode_bug.m:029: type.) -ho_type_mode_bug.m:029: +ho_type_mode_bug.m:029: ho_type_mode_bug.m:029: The inst of the third argument, `FirstAcc1', which ho_type_mode_bug.m:029: is `free', does not match any of the required ho_type_mode_bug.m:029: insts. -ho_type_mode_bug.m:029: +ho_type_mode_bug.m:029: ho_type_mode_bug.m:029: The inst of the fifth argument, `SecAcc1', which is ho_type_mode_bug.m:029: `free', does not match any of the required insts. -ho_type_mode_bug.m:029: +ho_type_mode_bug.m:029: ho_type_mode_bug.m:027: In clause for `my_foldl2((pred(in, in, out) is det), ho_type_mode_bug.m:027: in, in, out, di, uo)': ho_type_mode_bug.m:027: in argument 4 of clause head: @@ -49,7 +49,7 @@ ho_type_mode_bug.m:027: mode error in unification of `HeadVar__4' and ho_type_mode_bug.m:027: `FirstAcc'. ho_type_mode_bug.m:027: Variable `HeadVar__4' has instantiatedness `free', ho_type_mode_bug.m:027: variable `FirstAcc' has instantiatedness `free'. -ho_type_mode_bug.m:029: +ho_type_mode_bug.m:029: ho_type_mode_bug.m:027: In clause for `my_foldl2((pred(in, in, out) is det), ho_type_mode_bug.m:027: in, in, out, di, uo)': ho_type_mode_bug.m:027: in argument 6 of clause head: @@ -61,14 +61,14 @@ ho_type_mode_bug.m:029: In clause for `my_foldl2((pred(in, in, out) is det), ho_type_mode_bug.m:029: in, in, out, in, out)': ho_type_mode_bug.m:029: mode error in conjunction. The next four error ho_type_mode_bug.m:029: messages indicate possible causes of this error. -ho_type_mode_bug.m:029: +ho_type_mode_bug.m:029: ho_type_mode_bug.m:028: In clause for `my_foldl2((pred(in, in, out) is det), ho_type_mode_bug.m:028: in, in, out, in, out)': ho_type_mode_bug.m:028: in argument 1 of the call to the `call' builtin ho_type_mode_bug.m:028: predicate: ho_type_mode_bug.m:028: mode error: context requires a predicate of ho_type_mode_bug.m:028: arity five, but `P' has arity three. -ho_type_mode_bug.m:029: +ho_type_mode_bug.m:029: ho_type_mode_bug.m:029: In clause for `my_foldl2((pred(in, in, out) is det), ho_type_mode_bug.m:029: in, in, out, in, out)': ho_type_mode_bug.m:029: in call to predicate `ho_type_mode_bug.my_foldl2'/6: @@ -76,7 +76,7 @@ ho_type_mode_bug.m:029: mode error: the insts of arguments `P'[39;4 ho_type_mode_bug.m:029: `FirstAcc1', `FirstAcc', `SecAcc1' and `SecAcc' do ho_type_mode_bug.m:029: not match either of the two modes of predicate ho_type_mode_bug.m:029: `ho_type_mode_bug.my_foldl2'/6. -ho_type_mode_bug.m:029: +ho_type_mode_bug.m:029: ho_type_mode_bug.m:029: The inst of the first argument, `P', which is ho_type_mode_bug.m:029: `(pred(in, in, out) is det)', does not match any of ho_type_mode_bug.m:029: the required insts. @@ -84,14 +84,14 @@ ho_type_mode_bug.m:029: (For higher order insts like this, the mismatch is ho_type_mode_bug.m:029: sometimes caused by the arity of the predicate or ho_type_mode_bug.m:029: function being different in the inst than in the ho_type_mode_bug.m:029: type.) -ho_type_mode_bug.m:029: +ho_type_mode_bug.m:029: ho_type_mode_bug.m:029: The inst of the third argument, `FirstAcc1', which ho_type_mode_bug.m:029: is `free', does not match any of the required ho_type_mode_bug.m:029: insts. -ho_type_mode_bug.m:029: +ho_type_mode_bug.m:029: ho_type_mode_bug.m:029: The inst of the fifth argument, `SecAcc1', which is ho_type_mode_bug.m:029: `free', does not match any of the required insts. -ho_type_mode_bug.m:029: +ho_type_mode_bug.m:029: ho_type_mode_bug.m:027: In clause for `my_foldl2((pred(in, in, out) is det), ho_type_mode_bug.m:027: in, in, out, in, out)': ho_type_mode_bug.m:027: in argument 4 of clause head: @@ -99,7 +99,7 @@ ho_type_mode_bug.m:027: mode error in unification of `HeadVar__4' and ho_type_mode_bug.m:027: `FirstAcc'. ho_type_mode_bug.m:027: Variable `HeadVar__4' has instantiatedness `free', ho_type_mode_bug.m:027: variable `FirstAcc' has instantiatedness `free'. -ho_type_mode_bug.m:029: +ho_type_mode_bug.m:029: ho_type_mode_bug.m:027: In clause for `my_foldl2((pred(in, in, out) is det), ho_type_mode_bug.m:027: in, in, out, in, out)': ho_type_mode_bug.m:027: in argument 6 of clause head: diff --git a/tests/invalid/magicbox.err_exp b/tests/invalid/magicbox.err_exp index cd7c0b690..2740ab9fc 100644 --- a/tests/invalid/magicbox.err_exp +++ b/tests/invalid/magicbox.err_exp @@ -2,7 +2,7 @@ magicbox.m:038: Error: the determinism declaration for predicate magicbox.m:038: `arguments_handler'/3 is not satisfied. magicbox.m:038: Declared `cc_multi', inferred `cc_nondet'. magicbox.m:038: The reasons for the difference are the following. -magicbox.m:055: +magicbox.m:055: magicbox.m:055: This call to predicate `string.to_int'/2 can fail. -magicbox.m:061: +magicbox.m:061: magicbox.m:061: This call to predicate `string.to_int'/2 can fail. diff --git a/tests/invalid/max_error_line_width.err_exp b/tests/invalid/max_error_line_width.err_exp index cb7930643..0119ba27d 100644 --- a/tests/invalid/max_error_line_width.err_exp +++ b/tests/invalid/max_error_line_width.err_exp @@ -3,7 +3,7 @@ max_error_line_width.m:056: error: excessively ambiguous overloading. max_error_line_width.m:056: This caused the type checker to exceed its limits. It may also make your code difficult to max_error_line_width.m:056: understand. max_error_line_width.m:056: The following symbol was overloaded in the following contexts. -max_error_line_width.m:054: +max_error_line_width.m:054: max_error_line_width.m:054: The function symbol `f'/0. max_error_line_width.m:054: The possible matches are: max_error_line_width.m:054: the builtin type constructor `character', @@ -16,12 +16,12 @@ max_error_line_width.m:059: warning: highly ambiguous overloading. max_error_line_width.m:059: This may cause type-checking to be very slow. It may also make your code difficult to max_error_line_width.m:059: understand. max_error_line_width.m:059: The following symbols were overloaded in the following contexts. -max_error_line_width.m:059: +max_error_line_width.m:059: max_error_line_width.m:059: The function symbol `a1'/0. max_error_line_width.m:059: The possible matches are: max_error_line_width.m:059: the type constructor `max_error_line_width.baz'/0, max_error_line_width.m:059: the type constructor `max_error_line_width.qux'/0. -max_error_line_width.m:059: +max_error_line_width.m:059: max_error_line_width.m:059: The function symbol `a2'/0. max_error_line_width.m:059: The possible matches are: max_error_line_width.m:059: the type constructor `max_error_line_width.baz'/0, @@ -31,7 +31,7 @@ max_error_line_width.m:113: error: excessively ambiguous overloading. max_error_line_width.m:113: This caused the type checker to exceed its limits. It may also make your code difficult to max_error_line_width.m:113: understand. max_error_line_width.m:113: The following symbol was overloaded in the following contexts. -max_error_line_width.m:064: +max_error_line_width.m:064: max_error_line_width.m:064: The function symbol `unchecked_left_shift'/2. max_error_line_width.m:064: The possible matches are: max_error_line_width.m:064: function `int.unchecked_left_shift'/2, @@ -52,7 +52,7 @@ max_error_line_width.m:123: warning: highly ambiguous overloading. max_error_line_width.m:123: This may cause type-checking to be very slow. It may also make your code difficult to max_error_line_width.m:123: understand. max_error_line_width.m:123: The following symbol was overloaded in the following contexts. -max_error_line_width.m:118: +max_error_line_width.m:118: max_error_line_width.m:118: The function symbol `lookup_bool_option'/2. max_error_line_width.m:118: The possible matches are: max_error_line_width.m:118: predicate `getopt.lookup_bool_option'/3, diff --git a/tests/invalid/mode_inf.err_exp b/tests/invalid/mode_inf.err_exp index 348a81889..74e26095c 100644 --- a/tests/invalid/mode_inf.err_exp +++ b/tests/invalid/mode_inf.err_exp @@ -6,7 +6,7 @@ mode_inf.m:014: free mode_inf.m:014: which does not match any of the valid modes for the callee mode_inf.m:014: (predicate `mode_inf.q'/2) mode_inf.m:014: because of the following error. -mode_inf.m:016: +mode_inf.m:016: mode_inf.m:016: In clause for `q(out(not_reached), out(not_reached))': mode_inf.m:016: in argument 2 of clause head: mode_inf.m:016: mode error in unification of `Z' and `Z'. diff --git a/tests/invalid/modes_erroneous.err_exp b/tests/invalid/modes_erroneous.err_exp index 9f9b052b4..0108c84a9 100644 --- a/tests/invalid/modes_erroneous.err_exp +++ b/tests/invalid/modes_erroneous.err_exp @@ -1,14 +1,14 @@ modes_erroneous.m:020: In clause for `p(in, out)': modes_erroneous.m:020: mode error in conjunction. The next two error messages modes_erroneous.m:020: indicate possible causes of this error. -modes_erroneous.m:020: +modes_erroneous.m:020: modes_erroneous.m:020: In clause for `p(in, out)': modes_erroneous.m:020: in argument 1 of call to predicate modes_erroneous.m:020: `modes_erroneous.p'/2: modes_erroneous.m:020: mode error: variable `V_5' has instantiatedness modes_erroneous.m:020: `free', modes_erroneous.m:020: expected instantiatedness was `ground'. -modes_erroneous.m:020: +modes_erroneous.m:020: modes_erroneous.m:019: In clause for `p(in, out)': modes_erroneous.m:019: in argument 2 of clause head: modes_erroneous.m:019: mode error in unification of `HeadVar__2' and `X'. diff --git a/tests/invalid/no_ho_inst.err_exp b/tests/invalid/no_ho_inst.err_exp index c14880ee5..f785cc15a 100644 --- a/tests/invalid/no_ho_inst.err_exp +++ b/tests/invalid/no_ho_inst.err_exp @@ -9,7 +9,7 @@ no_ho_inst.m:044: determinism of the predicate that `AppHandler' represents. no_ho_inst.m:044: The insts of higher order values should contain this no_ho_inst.m:044: information, but `ground', which is the inst of no_ho_inst.m:044: `AppHandler' at this point, does not. -no_ho_inst.m:044: +no_ho_inst.m:044: no_ho_inst.m:044: The fix for this error is to add this information. For no_ho_inst.m:044: example, given a higher order type such as no_ho_inst.m:044: :- type callback_t == (pred(world, world, io, io)). @@ -21,7 +21,7 @@ no_ho_inst.m:044: determinism of a predicate. Search for `higher order inst' no_ho_inst.m:044: in the Mercury language reference manual's chapter for no_ho_inst.m:044: higher order programming for a corresponding example for no_ho_inst.m:044: functions. -no_ho_inst.m:044: +no_ho_inst.m:044: no_ho_inst.m:044: You can then tell the compiler that a value of type no_ho_inst.m:044: callback_t has inst callback_i by specifying either the no_ho_inst.m:044: mode `in(callback_i)' (when taking a value of type diff --git a/tests/invalid/not_a_switch.err_exp b/tests/invalid/not_a_switch.err_exp index 52b5a755c..01e9bdc73 100644 --- a/tests/invalid/not_a_switch.err_exp +++ b/tests/invalid/not_a_switch.err_exp @@ -2,12 +2,12 @@ not_a_switch.m:014: Error: the determinism declaration for predicate not_a_switch.m:014: `not_a_switch'/2 is not satisfied. not_a_switch.m:014: Declared `det', inferred `nondet'. not_a_switch.m:014: The reasons for the difference are the following. -not_a_switch.m:019: +not_a_switch.m:019: not_a_switch.m:019: Disjunction has more than one disjunct with solutions. -not_a_switch.m:022: +not_a_switch.m:022: not_a_switch.m:022: This later disjunct may have a solution. -not_a_switch.m:021: +not_a_switch.m:021: not_a_switch.m:021: Unification of `A' and `maybe.yes(Int2)' can fail. -not_a_switch.m:022: +not_a_switch.m:022: not_a_switch.m:022: In argument 1 of clause head: not_a_switch.m:022: unification of `HeadVar__1' and `maybe.no' can fail. diff --git a/tests/invalid/state_vars_test_1.err_exp b/tests/invalid/state_vars_test_1.err_exp index 5a48b0067..df60ff1f8 100644 --- a/tests/invalid/state_vars_test_1.err_exp +++ b/tests/invalid/state_vars_test_1.err_exp @@ -4,12 +4,12 @@ state_vars_test_1.m:018: mode error: the insts of arguments state_vars_test_1.m:018: `STATE_VARIABLE_X_0', `V_7' and the return value state_vars_test_1.m:018: `STATE_VARIABLE_X' do not match any of the three state_vars_test_1.m:018: modes for function `int.+'/2. -state_vars_test_1.m:018: +state_vars_test_1.m:018: state_vars_test_1.m:018: The inst of the second argument, `V_7', which is state_vars_test_1.m:018: `free', does not match the inst required by some state_vars_test_1.m:018: of the modes of the callee, namely the first and state_vars_test_1.m:018: second modes. -state_vars_test_1.m:018: +state_vars_test_1.m:018: state_vars_test_1.m:018: The inst of the return value `STATE_VARIABLE_X', state_vars_test_1.m:018: which is `free', does not match the inst required state_vars_test_1.m:018: by some of the modes of the callee, namely the diff --git a/tests/invalid/try_detism.err_exp b/tests/invalid/try_detism.err_exp index 03271ebe1..6fa286b5f 100644 --- a/tests/invalid/try_detism.err_exp +++ b/tests/invalid/try_detism.err_exp @@ -2,7 +2,7 @@ try_detism.m:016: Error: the determinism declaration for predicate `p' try_detism.m:016: satisfied. try_detism.m:016: Declared `cc_multi', inferred `cc_nondet'. try_detism.m:016: The reason for the difference is the following. -try_detism.m:023: +try_detism.m:023: try_detism.m:023: In argument 1 of call to predicate `try_detism.q'/3: try_detism.m:023: unification with `X' can fail. try_detism.m:022: Error: call to predicate `exception.magic_exception_result'/1 @@ -15,7 +15,7 @@ try_detism.m:022: mode error: the insts of arguments `TryLambda'[39 try_detism.m:022: `TryResult', `STATE_VARIABLE_IO_1' and `TryIOOutput' do not try_detism.m:022: match either of the two modes of predicate try_detism.m:022: `exception.try_io'/4. -try_detism.m:022: +try_detism.m:022: try_detism.m:022: The inst of the first argument, `TryLambda', which is try_detism.m:022: /* unique */ (pred(out, di, uo) is semidet), try_detism.m:022: does not match any of the required insts. diff --git a/tests/invalid/user_field_access_decl_override_1.err_exp b/tests/invalid/user_field_access_decl_override_1.err_exp index f425e9590..57d1b8340 100644 --- a/tests/invalid/user_field_access_decl_override_1.err_exp +++ b/tests/invalid/user_field_access_decl_override_1.err_exp @@ -12,7 +12,7 @@ user_field_access_decl_override_1.m:025: satisfied. user_field_access_decl_override_1.m:025: Declared `det', inferred `semidet'. user_field_access_decl_override_1.m:025: The reason for the difference is the user_field_access_decl_override_1.m:025: following. -user_field_access_decl_override_1.m:030: +user_field_access_decl_override_1.m:030: user_field_access_decl_override_1.m:030: In unification of `X' and `f1(Foo)': user_field_access_decl_override_1.m:030: this call to function user_field_access_decl_override_1.m:030: `user_field_access_decl_override_1.f1'/1 @@ -23,7 +23,7 @@ user_field_access_decl_override_1.m:032: satisfied. user_field_access_decl_override_1.m:032: Declared `det', inferred `semidet'. user_field_access_decl_override_1.m:032: The reason for the difference is the user_field_access_decl_override_1.m:032: following. -user_field_access_decl_override_1.m:037: +user_field_access_decl_override_1.m:037: user_field_access_decl_override_1.m:037: In unification of user_field_access_decl_override_1.m:037: `STATE_VARIABLE_Foo' and `'f1 user_field_access_decl_override_1.m:037: :='(STATE_VARIABLE_Foo_0, X)': diff --git a/tests/invalid_nodepend/errors_2.err_exp b/tests/invalid_nodepend/errors_2.err_exp index 2e4deab8b..21c1f8a00 100644 --- a/tests/invalid_nodepend/errors_2.err_exp +++ b/tests/invalid_nodepend/errors_2.err_exp @@ -113,21 +113,21 @@ errors_2.m:085: Z_2: errors_2.bar_1_type errors_2.m:085: A_3: int errors_2.m:085: B_4: character errors_2.m:085: C_5: string -errors_2.m:085: +errors_2.m:085: errors_2.m:085: Type assignment 2: errors_2.m:085: Y_1: character errors_2.m:085: Z_2: errors_2.bar_1_type errors_2.m:085: A_3: int errors_2.m:085: B_4: character errors_2.m:085: C_5: string -errors_2.m:085: +errors_2.m:085: errors_2.m:085: Type assignment 3: errors_2.m:085: Y_1: errors_2.foo errors_2.m:085: Z_2: errors_2.bar_2_type errors_2.m:085: A_3: character errors_2.m:085: B_4: int errors_2.m:085: C_5: string -errors_2.m:085: +errors_2.m:085: errors_2.m:085: Type assignment 4: errors_2.m:085: Y_1: character errors_2.m:085: Z_2: errors_2.bar_2_type diff --git a/tests/warnings/ambiguous_overloading.err_exp b/tests/warnings/ambiguous_overloading.err_exp index 45ece08f2..f26ecc0ef 100644 --- a/tests/warnings/ambiguous_overloading.err_exp +++ b/tests/warnings/ambiguous_overloading.err_exp @@ -6,7 +6,7 @@ ambiguous_overloading.m:048: In clause for predicate `ambig_overload1'/1: ambiguous_overloading.m:048: warning: highly ambiguous overloading. ambiguous_overloading.m:048: The following symbol was overloaded in the ambiguous_overloading.m:048: following context. -ambiguous_overloading.m:048: +ambiguous_overloading.m:048: ambiguous_overloading.m:048: The function symbol `f'/0. ambiguous_overloading.m:048: The possible matches are: ambiguous_overloading.m:048: the builtin type constructor `character', @@ -18,14 +18,14 @@ ambiguous_overloading.m:052: In clause for predicate `ambig_overload2'/1: ambiguous_overloading.m:052: warning: highly ambiguous overloading. ambiguous_overloading.m:052: The following symbols were overloaded in the ambiguous_overloading.m:052: following contexts. -ambiguous_overloading.m:052: +ambiguous_overloading.m:052: ambiguous_overloading.m:052: The function symbol `a1'/0. ambiguous_overloading.m:052: The possible matches are: ambiguous_overloading.m:052: the type constructor ambiguous_overloading.m:052: `ambiguous_overloading.baz'/0, ambiguous_overloading.m:052: the type constructor ambiguous_overloading.m:052: `ambiguous_overloading.qux'/0. -ambiguous_overloading.m:052: +ambiguous_overloading.m:052: ambiguous_overloading.m:052: The function symbol `a2'/0. ambiguous_overloading.m:052: The possible matches are: ambiguous_overloading.m:052: the type constructor @@ -36,7 +36,7 @@ ambiguous_overloading.m:063: In clause for predicate `test_lt'/1: ambiguous_overloading.m:063: warning: highly ambiguous overloading. ambiguous_overloading.m:063: The following symbol was overloaded in the ambiguous_overloading.m:063: following contexts. -ambiguous_overloading.m:057: +ambiguous_overloading.m:057: ambiguous_overloading.m:057: The predicate symbol `<'/2. ambiguous_overloading.m:057: The possible matches are: ambiguous_overloading.m:057: predicate `float.<'/2, @@ -51,7 +51,7 @@ ambiguous_overloading.m:084: `set_browser_param_from_option_table'/3: ambiguous_overloading.m:084: warning: highly ambiguous overloading. ambiguous_overloading.m:084: The following symbol was overloaded in the ambiguous_overloading.m:084: following contexts. -ambiguous_overloading.m:079: +ambiguous_overloading.m:079: ambiguous_overloading.m:079: The function symbol `lookup_bool_option'/2. ambiguous_overloading.m:079: The possible matches are: ambiguous_overloading.m:079: predicate `getopt.lookup_bool_option'/3, diff --git a/tests/warnings/inconsistent_pred_order.err_exp b/tests/warnings/inconsistent_pred_order.err_exp index 8978a4d1b..978411a92 100644 --- a/tests/warnings/inconsistent_pred_order.err_exp +++ b/tests/warnings/inconsistent_pred_order.err_exp @@ -1,7 +1,7 @@ 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: inconsistent_pred_order.m:010: --- declaration order inconsistent_pred_order.m:010: +++ definition order inconsistent_pred_order.m:010: @@ -1,8 +1,8 @@ diff --git a/tests/warnings/subtype_order.err_exp b/tests/warnings/subtype_order.err_exp index c2d6d3c3d..9d0808faa 100644 --- a/tests/warnings/subtype_order.err_exp +++ b/tests/warnings/subtype_order.err_exp @@ -3,7 +3,7 @@ subtype_order.m:030: different order to its supertype [38; subtype_order.m:030: differences between the order of function symbols in the subtype_order.m:030: subtype, and the order of the same function symbols in subtype_order.m:030: the supertype, are as follows. -subtype_order.m:030: +subtype_order.m:030: subtype_order.m:030: @@ -1,5 +1,5 @@ subtype_order.m:030: -lemon/0 subtype_order.m:030: +pomelo/0 diff --git a/tests/warnings/test_tscp.err_exp b/tests/warnings/test_tscp.err_exp index 99d0dbe44..70e113df7 100644 --- a/tests/warnings/test_tscp.err_exp +++ b/tests/warnings/test_tscp.err_exp @@ -1,28 +1,28 @@ test_tscp.m:054: For this type_spec_constrained_preds pragma, the compiler test_tscp.m:054: generated these type_spec pragmas: -test_tscp.m:054: +test_tscp.m:054: test_tscp.m:054: :- pragma type_spec(pred(test_tscp.p1/5), (C = int, D = test_tscp.m:054: term.var(V_3))). -test_tscp.m:054: +test_tscp.m:054: test_tscp.m:054: :- pragma type_spec(pred(test_tscp.p1/5), (B = character, C test_tscp.m:054: = bool.bool)). test_tscp.m:066: For this type_spec_constrained_preds pragma, the compiler test_tscp.m:066: generated this type_spec pragma: -test_tscp.m:066: +test_tscp.m:066: test_tscp.m:066: :- pragma type_spec(pred(test_tscp.p2/3), (Stream = test_tscp.m:066: io.text_input_stream, State = io.state, Error = io.error)). test_tscp.m:074: For this type_spec_constrained_preds pragma, the compiler test_tscp.m:074: generated this type_spec pragma: -test_tscp.m:074: +test_tscp.m:074: test_tscp.m:074: :- pragma type_spec(pred(test_tscp.p2/3), (Stream = test_tscp.m:074: io.text_input_stream, State = io.state, Error = io.error)). test_tscp.m:100: For this type_spec_constrained_preds pragma, the compiler test_tscp.m:100: generated these type_spec pragmas: -test_tscp.m:100: +test_tscp.m:100: test_tscp.m:100: :- pragma type_spec(pred(test_tscp.p3/2), A = int). -test_tscp.m:100: +test_tscp.m:100: test_tscp.m:100: :- pragma type_spec(pred(test_tscp.p3/2), B = int). -test_tscp.m:100: +test_tscp.m:100: test_tscp.m:100: :- pragma type_spec(pred(test_tscp.p3/2), A = float). -test_tscp.m:100: +test_tscp.m:100: test_tscp.m:100: :- pragma type_spec(pred(test_tscp.p3/2), B = float).