[m-rev.] for review: redundant brackets around types in error messages

Peter Wang novalazy at gmail.com
Wed Apr 15 17:37:31 AEST 2009


Does anyone know if this might cause problems?


Branches: main

compiler/mercury_to_mercury.m:
	Don't write an outer pair of brackets when formatting terms with '.'
	or ':' as the functor, which made module-qualified types in error
	messages unnecessarily ugly.

tests/hard_coded/impl_def_literal.exp:
tests/invalid/actual_expected.err_exp:
tests/invalid/bad_instance.err_exp:
tests/invalid/errors2.err_exp:
tests/invalid/ext_type.err_exp:
tests/invalid/ext_type_bug.err_exp:
tests/invalid/funcs_as_preds.err_exp:
tests/invalid/illtyped_compare.err_exp:
tests/invalid/instance_dup_var.err_exp:
tests/invalid/invalid_instance_declarations.err_exp:
tests/invalid/method_impl.err_exp:
tests/invalid/mixed_up_streams.err_exp:
tests/invalid/mpj4.err_exp:
tests/invalid/nullary_ho_func_error.err_exp:
tests/invalid/overloading.err_exp:
tests/invalid/purity/impure_func_t5.err_exp:
tests/invalid/purity/impure_pred_t1.err_exp:
tests/invalid/purity/impure_pred_t1_fixed.err_exp:
tests/invalid/purity/impure_pred_t2.err_exp:
tests/invalid/record_syntax_errors.err_exp:
tests/invalid/tc_err1.err_exp:
tests/invalid/tc_err2.err_exp:
tests/invalid/try_bad_params.err_exp:
tests/invalid/type_error_ambiguous.err_exp:
tests/misc_tests/pretty_print_test.exp:
tests/warnings/inference_test.exp:
	Update test cases.

diff --git a/compiler/mercury_to_mercury.m b/compiler/mercury_to_mercury.m
index 2542d0b..3e971e9 100644
--- a/compiler/mercury_to_mercury.m
+++ b/compiler/mercury_to_mercury.m
@@ -4465,7 +4465,6 @@ mercury_format_term_nq(VarSet, AppendVarnums,
NextToGraphicToken,
         Functor = term.atom(FunctorName),
         mercury_infix_op(FunctorName)
     ->
-        add_string("(", !U),
         (
             ( FunctorName = ":"
             ; FunctorName = "."
@@ -4477,15 +4476,16 @@ mercury_format_term_nq(VarSet, AppendVarnums,
NextToGraphicToken,
             mercury_format_term_nq(VarSet, AppendVarnums,
                 next_to_graphic_token, Arg2, !U)
         ;
+            add_string("(", !U),
             mercury_format_term_nq(VarSet, AppendVarnums,
                 not_next_to_graphic_token, Arg1, !U),
             add_string(" ", !U),
             add_string(FunctorName, !U),
             add_string(" ", !U),
             mercury_format_term_nq(VarSet, AppendVarnums,
-                not_next_to_graphic_token, Arg2, !U)
-        ),
-        add_string(")", !U)
+                not_next_to_graphic_token, Arg2, !U),
+            add_string(")", !U)
+        )
     ;
         (
             Args = [Y | Ys],
diff --git a/tests/hard_coded/impl_def_literal.exp
b/tests/hard_coded/impl_def_literal.exp
index f93df27..f576139 100644
--- a/tests/hard_coded/impl_def_literal.exp
+++ b/tests/hard_coded/impl_def_literal.exp
@@ -11,7 +11,7 @@ impl_def_literal.sub
 predicate `impl_def_literal.sub.in_submodule'/2
 impl_def_literal.m
 10101
-instance method predicate `impl_def_literal.tc_p'/5 for
`impl_def_literal.tc(int, character,
((impl_def_literal.sub).tt(V_1)))'
-instance method function `impl_def_literal.tc_f'/3 for
`impl_def_literal.tc(int, character,
((impl_def_literal.sub).tt(V_1)))'
+instance method predicate `impl_def_literal.tc_p'/5 for
`impl_def_literal.tc(int, character, impl_def_literal.sub.tt(V_1))'
+instance method function `impl_def_literal.tc_f'/3 for
`impl_def_literal.tc(int, character, impl_def_literal.sub.tt(V_1))'
 predicate `impl_def_literal.sub.string_p'/5
 function `impl_def_literal.sub.string_f'/3
diff --git a/tests/invalid/actual_expected.err_exp
b/tests/invalid/actual_expected.err_exp
index 3b7387b..330939d 100644
--- a/tests/invalid/actual_expected.err_exp
+++ b/tests/invalid/actual_expected.err_exp
@@ -2,9 +2,9 @@ actual_expected.m:106: In clause for predicate
`find_compulsory_lvals'/5:
 actual_expected.m:106:   in argument 2 of call to predicate
 actual_expected.m:106:   `find_compulsory_lvals'/5:
 actual_expected.m:106:   type error: variable `LiveMap' has type
-actual_expected.m:106:   `(tree234.tree234((actual_expected.label),
-actual_expected.m:106:   (set.set((actual_expected.lval)))))',
+actual_expected.m:106:   `tree234.tree234(actual_expected.label,
+actual_expected.m:106:   set.set(actual_expected.lval))',
 actual_expected.m:106:   expected type was
-actual_expected.m:106:
`(maybe.maybe((tree234.tree234((actual_expected.label),
-actual_expected.m:106:   (set.set((actual_expected.lval)))))))'.
+actual_expected.m:106:   `maybe.maybe(tree234.tree234(actual_expected.label,
+actual_expected.m:106:   set.set(actual_expected.lval)))'.
 For more information, recompile with `-E'.
diff --git a/tests/invalid/bad_instance.err_exp
b/tests/invalid/bad_instance.err_exp
index b63501d..c96d7dc 100644
--- a/tests/invalid/bad_instance.err_exp
+++ b/tests/invalid/bad_instance.err_exp
@@ -3,9 +3,9 @@ bad_instance.m:005:   `bad_instance.foo'/2 contains the type
 bad_instance.m:005:   `bad_instance.bar'/1 but that type is not visible in the
 bad_instance.m:005:   module interface.
 bad_instance.m:005: In instance declaration for
-bad_instance.m:005:   `bad_instance.foo((bad_instance.bar(T)), U)':
+bad_instance.m:005:   `bad_instance.foo(bad_instance.bar(T), U)':
 bad_instance.m:005:   the second arg is a type variable
 bad_instance.m:011: In instance declaration for
-bad_instance.m:011:   `bad_instance.foo((bad_instance.bar(T)), T)':
+bad_instance.m:011:   `bad_instance.foo(bad_instance.bar(T), T)':
 bad_instance.m:011:   the second arg is a type variable
 For more information, recompile with `-E'.
diff --git a/tests/invalid/errors2.err_exp b/tests/invalid/errors2.err_exp
index fc0c33e..ca180ee 100644
--- a/tests/invalid/errors2.err_exp
+++ b/tests/invalid/errors2.err_exp
@@ -50,7 +50,7 @@ errors2.m:052:   argument has type `string',
 errors2.m:052:   constant `1.0' has type `float'.
 errors2.m:052:   The partial type assignment was:
 errors2.m:052:     Y_1: int
-errors2.m:052:     X_2: (errors2.foo_type)
+errors2.m:052:     X_2: errors2.foo_type
 errors2.m:052:     V_3: character
 errors2.m:052:     V_4: string
 errors2.m:059: In clause for predicate `type_error_5'/0:
@@ -61,7 +61,7 @@ errors2.m:059:   argument has type `string',
 errors2.m:059:   constant `1.0' has type `float'.
 errors2.m:059:   The partial type assignment was:
 errors2.m:059:     Y_1: character
-errors2.m:059:     X_2: (errors2.foo_type)
+errors2.m:059:     X_2: errors2.foo_type
 errors2.m:059:     V_3: int
 errors2.m:059:     V_4: string
 errors2.m:065: In clause for predicate `type_error_6'/0:
@@ -72,7 +72,7 @@ errors2.m:065:   argument has type `string',
 errors2.m:065:   constant `1.0' has type `float'.
 errors2.m:065:   The partial type assignment was:
 errors2.m:065:     Y_1: character
-errors2.m:065:     X_2: (errors2.bar_1_type)
+errors2.m:065:     X_2: errors2.bar_1_type
 errors2.m:065:     V_3: int
 errors2.m:065:     V_4: string
 errors2.m:072: In clause for predicate `type_error_7'/0:
@@ -81,29 +81,29 @@ errors2.m:072:   type error: variable `C' has type `string',
 errors2.m:072:   expected type was `int'.
 errors2.m:072:   The possible partial type assignments were:
 errors2.m:072:     Type assignment 1:
-errors2.m:072:     Y_1: (errors2.foo)
-errors2.m:072:     Z_2: (errors2.bar_1_type)
+errors2.m:072:     Y_1: errors2.foo
+errors2.m:072:     Z_2: errors2.bar_1_type
 errors2.m:072:     A_3: int
 errors2.m:072:     B_4: character
 errors2.m:072:     C_5: string
 errors2.m:072:
 errors2.m:072:     Type assignment 2:
-errors2.m:072:     Y_1: (errors2.foo)
-errors2.m:072:     Z_2: (errors2.bar_2_type)
+errors2.m:072:     Y_1: errors2.foo
+errors2.m:072:     Z_2: errors2.bar_2_type
 errors2.m:072:     A_3: character
 errors2.m:072:     B_4: int
 errors2.m:072:     C_5: string
 errors2.m:072:
 errors2.m:072:     Type assignment 3:
 errors2.m:072:     Y_1: character
-errors2.m:072:     Z_2: (errors2.bar_1_type)
+errors2.m:072:     Z_2: errors2.bar_1_type
 errors2.m:072:     A_3: int
 errors2.m:072:     B_4: character
 errors2.m:072:     C_5: string
 errors2.m:072:
 errors2.m:072:     Type assignment 4:
 errors2.m:072:     Y_1: character
-errors2.m:072:     Z_2: (errors2.bar_2_type)
+errors2.m:072:     Z_2: errors2.bar_2_type
 errors2.m:072:     A_3: character
 errors2.m:072:     B_4: int
 errors2.m:072:     C_5: string
diff --git a/tests/invalid/ext_type.err_exp b/tests/invalid/ext_type.err_exp
index 1d5b032..cc357f4 100644
--- a/tests/invalid/ext_type.err_exp
+++ b/tests/invalid/ext_type.err_exp
@@ -6,7 +6,7 @@ ext_type.m:016:   functor `q/1' has type
 ext_type.m:016:   `q(int): (some [QT] QT)'.
 ext_type.m:016:   The partial type assignment was:
 ext_type.m:016:     some [QT_2]
-ext_type.m:016:     HeadVar__1_1: (bool.bool)
+ext_type.m:016:     HeadVar__1_1: bool.bool
 ext_type.m:016:     HeadVar__2_2: QT
 ext_type.m:016:     Y_3: QT
 ext_type.m:016:     V_4: int
diff --git a/tests/invalid/ext_type_bug.err_exp
b/tests/invalid/ext_type_bug.err_exp
index 8a3e19c..3a2cf95 100644
--- a/tests/invalid/ext_type_bug.err_exp
+++ b/tests/invalid/ext_type_bug.err_exp
@@ -1,8 +1,8 @@
 ext_type_bug.m:011: In clause for predicate `foo'/1:
 ext_type_bug.m:011:   in argument 1 of call to predicate `make_bar'/1:
 ext_type_bug.m:011:   type error: variable `Bar' has type
-ext_type_bug.m:011:   `(ext_type_bug.bar(int))',
-ext_type_bug.m:011:   expected type was `(some [T] (ext_type_bug.bar(T)))'.
+ext_type_bug.m:011:   `ext_type_bug.bar(int)',
+ext_type_bug.m:011:   expected type was `(some [T] ext_type_bug.bar(T))'.
 ext_type_bug.m:011:   The partial type assignment was:
 ext_type_bug.m:011:     some [T_1]
-ext_type_bug.m:011:     Bar_2: (ext_type_bug.bar(int))
+ext_type_bug.m:011:     Bar_2: ext_type_bug.bar(int)
diff --git a/tests/invalid/funcs_as_preds.err_exp
b/tests/invalid/funcs_as_preds.err_exp
index d564b66..9cb8b00 100644
--- a/tests/invalid/funcs_as_preds.err_exp
+++ b/tests/invalid/funcs_as_preds.err_exp
@@ -14,11 +14,10 @@ funcs_as_preds.m:017: In clause for function `null'/1:
 funcs_as_preds.m:017:   in function result term of clause head:
 funcs_as_preds.m:017:   error: the language construct `='/2 should be used as a
 funcs_as_preds.m:017:   goal, not as an expression.
-funcs_as_preds.m:021: Inferred :- func car((list.list((list.list(T))))) =
-funcs_as_preds.m:021:   (list.list(T)).
-funcs_as_preds.m:024: Inferred :- func cdr((list.list(T))) = (list.list(T)).
-funcs_as_preds.m:027: Inferred :- func cons(T, (list.list(T))) =
-funcs_as_preds.m:027:   (list.list(T)).
+funcs_as_preds.m:021: Inferred :- func car(list.list(list.list(T))) =
+funcs_as_preds.m:021:   list.list(T).
+funcs_as_preds.m:024: Inferred :- func cdr(list.list(T)) = list.list(T).
+funcs_as_preds.m:027: Inferred :- func cons(T, list.list(T)) = list.list(T).
 funcs_as_preds.m:030: In clause for function `ap'/2:
 funcs_as_preds.m:030:   error: undefined predicate `null'/1.
 funcs_as_preds.m:030:   (There is a *function* with that name, however.
diff --git a/tests/invalid/illtyped_compare.err_exp
b/tests/invalid/illtyped_compare.err_exp
index 66e8960..2c1803a 100644
--- a/tests/invalid/illtyped_compare.err_exp
+++ b/tests/invalid/illtyped_compare.err_exp
@@ -2,35 +2,35 @@ illtyped_compare.m:017: In clause for comparison
predicate for type `bar_rep':
 illtyped_compare.m:017:   in argument 2 of call to predicate
 illtyped_compare.m:017:   `illtyped_compare.compare_bar'/3:
 illtyped_compare.m:017:   type error: variable `HeadVar__2' has type
-illtyped_compare.m:017:   `(illtyped_compare.bar_rep)',
-illtyped_compare.m:017:   expected type was `(illtyped_compare.bar)'.
+illtyped_compare.m:017:   `illtyped_compare.bar_rep',
+illtyped_compare.m:017:   expected type was `illtyped_compare.bar'.
 illtyped_compare.m:017:   The partial type assignment was:
 illtyped_compare.m:017:     HeadVar__1_1: comparison_result
-illtyped_compare.m:017:     HeadVar__2_2: (illtyped_compare.bar_rep)
-illtyped_compare.m:017:     HeadVar__3_3: (illtyped_compare.bar_rep)
+illtyped_compare.m:017:     HeadVar__2_2: illtyped_compare.bar_rep
+illtyped_compare.m:017:     HeadVar__3_3: illtyped_compare.bar_rep
 illtyped_compare.m:017:     CastX_4: int
 illtyped_compare.m:017:     CastY_5: int
 illtyped_compare.m:017: In clause for comparison predicate for type `bar_rep':
 illtyped_compare.m:017:   in argument 3 of call to predicate
 illtyped_compare.m:017:   `illtyped_compare.compare_bar'/3:
 illtyped_compare.m:017:   type error: variable `HeadVar__3' has type
-illtyped_compare.m:017:   `(illtyped_compare.bar_rep)',
-illtyped_compare.m:017:   expected type was `(illtyped_compare.bar)'.
+illtyped_compare.m:017:   `illtyped_compare.bar_rep',
+illtyped_compare.m:017:   expected type was `illtyped_compare.bar'.
 illtyped_compare.m:017:   The partial type assignment was:
 illtyped_compare.m:017:     HeadVar__1_1: comparison_result
-illtyped_compare.m:017:     HeadVar__2_2: (illtyped_compare.bar_rep)
-illtyped_compare.m:017:     HeadVar__3_3: (illtyped_compare.bar_rep)
+illtyped_compare.m:017:     HeadVar__2_2: illtyped_compare.bar_rep
+illtyped_compare.m:017:     HeadVar__3_3: illtyped_compare.bar_rep
 illtyped_compare.m:017:     CastX_4: int
 illtyped_compare.m:017:     CastY_5: int
 illtyped_compare.m:017: In clause for unification predicate for type `bar_rep':
 illtyped_compare.m:017:   in argument 2 of call to predicate
 illtyped_compare.m:017:   `illtyped_compare.compare_bar'/3:
 illtyped_compare.m:017:   type error: variable `HeadVar__1' has type
-illtyped_compare.m:017:   `(illtyped_compare.bar_rep)',
-illtyped_compare.m:017:   expected type was `(illtyped_compare.bar)'.
+illtyped_compare.m:017:   `illtyped_compare.bar_rep',
+illtyped_compare.m:017:   expected type was `illtyped_compare.bar'.
 illtyped_compare.m:017:   The partial type assignment was:
-illtyped_compare.m:017:     HeadVar__1_1: (illtyped_compare.bar_rep)
-illtyped_compare.m:017:     HeadVar__2_2: (illtyped_compare.bar_rep)
+illtyped_compare.m:017:     HeadVar__1_1: illtyped_compare.bar_rep
+illtyped_compare.m:017:     HeadVar__2_2: illtyped_compare.bar_rep
 illtyped_compare.m:017:     V_3: comparison_result
 illtyped_compare.m:017:     CastX_4: int
 illtyped_compare.m:017:     CastY_5: int
@@ -38,11 +38,11 @@ illtyped_compare.m:017: In clause for unification
predicate for type `bar_rep':
 illtyped_compare.m:017:   in argument 3 of call to predicate
 illtyped_compare.m:017:   `illtyped_compare.compare_bar'/3:
 illtyped_compare.m:017:   type error: variable `HeadVar__2' has type
-illtyped_compare.m:017:   `(illtyped_compare.bar_rep)',
-illtyped_compare.m:017:   expected type was `(illtyped_compare.bar)'.
+illtyped_compare.m:017:   `illtyped_compare.bar_rep',
+illtyped_compare.m:017:   expected type was `illtyped_compare.bar'.
 illtyped_compare.m:017:   The partial type assignment was:
-illtyped_compare.m:017:     HeadVar__1_1: (illtyped_compare.bar_rep)
-illtyped_compare.m:017:     HeadVar__2_2: (illtyped_compare.bar_rep)
+illtyped_compare.m:017:     HeadVar__1_1: illtyped_compare.bar_rep
+illtyped_compare.m:017:     HeadVar__2_2: illtyped_compare.bar_rep
 illtyped_compare.m:017:     V_3: comparison_result
 illtyped_compare.m:017:     CastX_4: int
 illtyped_compare.m:017:     CastY_5: int
diff --git a/tests/invalid/instance_dup_var.err_exp
b/tests/invalid/instance_dup_var.err_exp
index a1716c6..84d9483 100644
--- a/tests/invalid/instance_dup_var.err_exp
+++ b/tests/invalid/instance_dup_var.err_exp
@@ -1,11 +1,11 @@
 instance_dup_var.m:012: In instance declaration for
-instance_dup_var.m:012:   `instance_dup_var.baz((instance_dup_var.foo(T, T)),
-instance_dup_var.m:012:   (instance_dup_var.bar))':
+instance_dup_var.m:012:   `instance_dup_var.baz(instance_dup_var.foo(T, T),
+instance_dup_var.m:012:   instance_dup_var.bar)':
 instance_dup_var.m:012:   the first arg is not a type whose arguments are
 instance_dup_var.m:012:   distinct type variables
 instance_dup_var.m:015: In instance declaration for
-instance_dup_var.m:015:   `instance_dup_var.baz((instance_dup_var.foo(A, B)),
-instance_dup_var.m:015:   (instance_dup_var.foo(C, A)))':
+instance_dup_var.m:015:   `instance_dup_var.baz(instance_dup_var.foo(A, B),
+instance_dup_var.m:015:   instance_dup_var.foo(C, A))':
 instance_dup_var.m:015:   the second arg contains a type variable which is used
 instance_dup_var.m:015:   in another arg
 For more information, recompile with `-E'.
diff --git a/tests/invalid/invalid_instance_declarations.err_exp
b/tests/invalid/invalid_instance_declarations.err_exp
index 5acc819..2268f94 100644
--- a/tests/invalid/invalid_instance_declarations.err_exp
+++ b/tests/invalid/invalid_instance_declarations.err_exp
@@ -1,6 +1,6 @@
 invalid_instance_declarations.m:015: In instance declaration for
-invalid_instance_declarations.m:015:
`invalid_instance_declarations.tc((invalid_instance_declarations.t(T,
-invalid_instance_declarations.m:015:   T)))':
+invalid_instance_declarations.m:015:
`invalid_instance_declarations.tc(invalid_instance_declarations.t(T,
+invalid_instance_declarations.m:015:   T))':
 invalid_instance_declarations.m:015:   the first arg is not a type whose
 invalid_instance_declarations.m:015:   arguments are distinct type variables
 invalid_instance_declarations.m:016: In instance declaration for
@@ -13,7 +13,7 @@ invalid_instance_declarations.m:017:   T})':
 invalid_instance_declarations.m:017:   the first arg is not a type whose
 invalid_instance_declarations.m:017:   arguments are distinct type variables
 invalid_instance_declarations.m:018: In instance declaration for
-invalid_instance_declarations.m:018:
`invalid_instance_declarations.tc((invalid_instance_declarations.t(int)))':
+invalid_instance_declarations.m:018:
`invalid_instance_declarations.tc(invalid_instance_declarations.t(int))':
 invalid_instance_declarations.m:018:   the first arg is a type whose first arg
 invalid_instance_declarations.m:018:   is not a variable
 For more information, recompile with `-E'.
diff --git a/tests/invalid/method_impl.err_exp
b/tests/invalid/method_impl.err_exp
index 6c1a36e..ffce697 100644
--- a/tests/invalid/method_impl.err_exp
+++ b/tests/invalid/method_impl.err_exp
@@ -3,7 +3,7 @@ method_impl.m:022:   in argument 2 of predicate `foo_m1'/2:
 method_impl.m:022:   type error: variable `HeadVar__2' has type `int',
 method_impl.m:022:   expected type was `string'.
 method_impl.m:022:   The partial type assignment was:
-method_impl.m:022:     HeadVar__1_1: (method_impl.foo)
+method_impl.m:022:     HeadVar__1_1: method_impl.foo
 method_impl.m:022:     HeadVar__2_2: int
 method_impl.m:025: In clause for type class method implementation:
 method_impl.m:025:   error: undefined predicate `bar_m1'/2.
diff --git a/tests/invalid/mixed_up_streams.err_exp
b/tests/invalid/mixed_up_streams.err_exp
index 0f3607d..bb987b0 100644
--- a/tests/invalid/mixed_up_streams.err_exp
+++ b/tests/invalid/mixed_up_streams.err_exp
@@ -1,6 +1,6 @@
 mixed_up_streams.m:014: In clause for predicate `main'/2:
 mixed_up_streams.m:014:   in argument 1 of call to predicate `io.write_byte'/4:
 mixed_up_streams.m:014:   type error: variable `BinaryInput' has type
-mixed_up_streams.m:014:   `(io.binary_input_stream)',
-mixed_up_streams.m:014:   expected type was `(io.binary_output_stream)'.
+mixed_up_streams.m:014:   `io.binary_input_stream',
+mixed_up_streams.m:014:   expected type was `io.binary_output_stream'.
 For more information, recompile with `-E'.
diff --git a/tests/invalid/mpj4.err_exp b/tests/invalid/mpj4.err_exp
index 7004b6e..b7c52bb 100644
--- a/tests/invalid/mpj4.err_exp
+++ b/tests/invalid/mpj4.err_exp
@@ -6,7 +6,7 @@ mpj4.m:020:   and constant `"foo"'.
 mpj4.m:020:   argument has type `int',
 mpj4.m:020:   constant `"foo"' has type `string'.
 mpj4.m:020:   The partial type assignment was:
-mpj4.m:020:     HeadVar__2_2: (mpj4.intlist)
-mpj4.m:020:     L_3: (mpj4.intlist)
+mpj4.m:020:     HeadVar__2_2: mpj4.intlist
+mpj4.m:020:     L_3: mpj4.intlist
 mpj4.m:020:     V_4: int
 mpj4.m:020:     V_5: int
diff --git a/tests/invalid/nullary_ho_func_error.err_exp
b/tests/invalid/nullary_ho_func_error.err_exp
index dce42fd..0d3cc3a 100644
--- a/tests/invalid/nullary_ho_func_error.err_exp
+++ b/tests/invalid/nullary_ho_func_error.err_exp
@@ -6,9 +6,9 @@ nullary_ho_func_error.m:022:   and constant `pi'.
 nullary_ho_func_error.m:022:   argument has type `((func) = T)',
 nullary_ho_func_error.m:022:   constant `pi' has type `float'.
 nullary_ho_func_error.m:022:   The partial type assignment was:
-nullary_ho_func_error.m:022:     DCG_0_3: (io.state)
-nullary_ho_func_error.m:022:     DCG_1_4: (io.state)
-nullary_ho_func_error.m:022:     DCG_3_6: (io.state)
+nullary_ho_func_error.m:022:     DCG_0_3: io.state
+nullary_ho_func_error.m:022:     DCG_1_4: io.state
+nullary_ho_func_error.m:022:     DCG_3_6: io.state
 nullary_ho_func_error.m:022:     V_7: string
 nullary_ho_func_error.m:022:     V_8: T
 nullary_ho_func_error.m:022:     V_9: ((func) = T)
diff --git a/tests/invalid/overloading.err_exp
b/tests/invalid/overloading.err_exp
index bb89f3f..73b45f5 100644
--- a/tests/invalid/overloading.err_exp
+++ b/tests/invalid/overloading.err_exp
@@ -3,48 +3,48 @@ overloading.m:050:   in unification of variable `OptInfo'
 overloading.m:050:   and term
 overloading.m:050:   `opt_info(MustHaveOwnSlot, EverOnStack,
CurIntervalId, V_22, Counter1, StartMap0, EndMap0, VarsMap0,
SuccMap0)':
 overloading.m:050:   type error in argument(s) of functor `opt_info/9'.
-overloading.m:050:   variable `OptInfo' has type `(overloading.opt_info)',
+overloading.m:050:   variable `OptInfo' has type `overloading.opt_info',
 overloading.m:050:   functor `opt_info/9' has type
-overloading.m:050:   `opt_info((set.set((term.var((term.generic))))),
-overloading.m:050:   (set.set((term.var((term.generic))))),
-overloading.m:050:   (tree234.tree234((term.var((term.generic))),
-overloading.m:050:   (tree234.tree234((overloading.goal_path), string)))),
-overloading.m:050:   (overloading.interval_id), (counter.counter),
-overloading.m:050:   (tree234.tree234((overloading.interval_id),
-overloading.m:050:   (overloading.anchor))),
-overloading.m:050:   (tree234.tree234((overloading.interval_id),
-overloading.m:050:   (overloading.anchor))),
-overloading.m:050:   (tree234.tree234((overloading.interval_id),
-overloading.m:050:   (set.set((term.var((term.generic))))))),
-overloading.m:050:   (tree234.tree234((overloading.interval_id),
-overloading.m:050:   (list.list((overloading.interval_id)))))):
-overloading.m:050:   (overloading.opt_info)',
+overloading.m:050:   `opt_info(set.set(term.var(term.generic)),
+overloading.m:050:   set.set(term.var(term.generic)),
+overloading.m:050:   tree234.tree234(term.var(term.generic),
+overloading.m:050:   tree234.tree234(overloading.goal_path, string)),
+overloading.m:050:   overloading.interval_id, counter.counter,
+overloading.m:050:   tree234.tree234(overloading.interval_id,
+overloading.m:050:   overloading.anchor),
+overloading.m:050:   tree234.tree234(overloading.interval_id,
+overloading.m:050:   overloading.anchor),
+overloading.m:050:   tree234.tree234(overloading.interval_id,
+overloading.m:050:   set.set(term.var(term.generic))),
+overloading.m:050:   tree234.tree234(overloading.interval_id,
+overloading.m:050:   list.list(overloading.interval_id))):
+overloading.m:050:   overloading.opt_info',
 overloading.m:050:   variable `MustHaveOwnSlot' has type
-overloading.m:050:   `(set.set((term.var((term.generic)))))',
+overloading.m:050:   `set.set(term.var(term.generic))',
 overloading.m:050:   variable `EverOnStack' has type
-overloading.m:050:   `(set.set((term.var((term.generic)))))',
+overloading.m:050:   `set.set(term.var(term.generic))',
 overloading.m:050:   variable `CurIntervalId' has type
-overloading.m:050:   `(overloading.interval_id)',
+overloading.m:050:   `overloading.interval_id',
 overloading.m:050:   argument has type `'<any>'',
-overloading.m:050:   variable `Counter1' has type `(counter.counter)',
+overloading.m:050:   variable `Counter1' has type `counter.counter',
 overloading.m:050:   variable `StartMap0' has overloaded type {
-overloading.m:050:       (pred (tree234.tree234(V_V_1, V_V_2))),
-overloading.m:050:       (tree234.tree234(K, V))
+overloading.m:050:       (pred tree234.tree234(V_V_1, V_V_2)),
+overloading.m:050:       tree234.tree234(K, V)
 overloading.m:050:   },
 overloading.m:050:   variable `EndMap0' has overloaded type {
-overloading.m:050:       (pred (tree234.tree234((overloading.interval_id),
-overloading.m:050:       (overloading.anchor)))),
-overloading.m:050:       (tree234.tree234((overloading.interval_id),
-overloading.m:050:       (overloading.anchor)))
+overloading.m:050:       (pred tree234.tree234(overloading.interval_id,
+overloading.m:050:       overloading.anchor)),
+overloading.m:050:       tree234.tree234(overloading.interval_id,
+overloading.m:050:       overloading.anchor)
 overloading.m:050:   },
 overloading.m:050:   variable `VarsMap0' has overloaded type {
-overloading.m:050:       (pred (tree234.tree234((overloading.interval_id),
-overloading.m:050:       (set.set((term.var((term.generic)))))))),
-overloading.m:050:       (tree234.tree234((overloading.interval_id),
-overloading.m:050:       (set.set((term.var((term.generic)))))))
+overloading.m:050:       (pred tree234.tree234(overloading.interval_id,
+overloading.m:050:       set.set(term.var(term.generic)))),
+overloading.m:050:       tree234.tree234(overloading.interval_id,
+overloading.m:050:       set.set(term.var(term.generic)))
 overloading.m:050:   },
 overloading.m:050:   variable `SuccMap0' has overloaded type {
-overloading.m:050:       (pred (tree234.tree234(V_V_1, V_V_2))),
-overloading.m:050:       (tree234.tree234(K, V))
+overloading.m:050:       (pred tree234.tree234(V_V_1, V_V_2)),
+overloading.m:050:       tree234.tree234(K, V)
 overloading.m:050:   }.
 For more information, recompile with `-E'.
diff --git a/tests/invalid/purity/impure_func_t5.err_exp
b/tests/invalid/purity/impure_func_t5.err_exp
index 496b73c..e073446 100644
--- a/tests/invalid/purity/impure_func_t5.err_exp
+++ b/tests/invalid/purity/impure_func_t5.err_exp
@@ -6,7 +6,7 @@ impure_func_t5.m:018:   argument has type `((func int) = int)',
 impure_func_t5.m:018:   constant `get_counter' has type `(impure ((func int) =
 impure_func_t5.m:018:   int))'.
 impure_func_t5.m:018:   The partial type assignment was:
-impure_func_t5.m:018:     Y_3: (impure_func_t5.foo)
-impure_func_t5.m:018:     DCG_0_5: (io.state)
-impure_func_t5.m:018:     DCG_3_8: (io.state)
+impure_func_t5.m:018:     Y_3: impure_func_t5.foo
+impure_func_t5.m:018:     DCG_0_5: io.state
+impure_func_t5.m:018:     DCG_3_8: io.state
 impure_func_t5.m:018:     V_9: ((func int) = int)
diff --git a/tests/invalid/purity/impure_pred_t1.err_exp
b/tests/invalid/purity/impure_pred_t1.err_exp
index e5133c7..1acd152 100644
--- a/tests/invalid/purity/impure_pred_t1.err_exp
+++ b/tests/invalid/purity/impure_pred_t1.err_exp
@@ -6,7 +6,7 @@ impure_pred_t1.m:020:   argument has type `pred(int, int)',
 impure_pred_t1.m:020:   constant `get_counter' has type `(impure pred(int,
 impure_pred_t1.m:020:   int))'.
 impure_pred_t1.m:020:   The partial type assignment was:
-impure_pred_t1.m:020:     Y_3: (impure_pred_t1.foo)
-impure_pred_t1.m:020:     DCG_0_6: (io.state)
-impure_pred_t1.m:020:     DCG_3_9: (io.state)
+impure_pred_t1.m:020:     Y_3: impure_pred_t1.foo
+impure_pred_t1.m:020:     DCG_0_6: io.state
+impure_pred_t1.m:020:     DCG_3_9: io.state
 impure_pred_t1.m:020:     V_10: pred(int, int)
diff --git a/tests/invalid/purity/impure_pred_t1_fixed.err_exp
b/tests/invalid/purity/impure_pred_t1_fixed.err_exp
index 8fa4d89..b119f48 100644
--- a/tests/invalid/purity/impure_pred_t1_fixed.err_exp
+++ b/tests/invalid/purity/impure_pred_t1_fixed.err_exp
@@ -5,9 +5,9 @@ impure_pred_t1_fixed.m:022:   type error: variable `X'
has type `(impure
 impure_pred_t1_fixed.m:022:   pred(int, int))',
 impure_pred_t1_fixed.m:022:   expected type was `pred(V_2, V_1)'.
 impure_pred_t1_fixed.m:022:   The partial type assignment was:
-impure_pred_t1_fixed.m:022:     Y_3: (impure_pred_t1_fixed.foo)
+impure_pred_t1_fixed.m:022:     Y_3: impure_pred_t1_fixed.foo
 impure_pred_t1_fixed.m:022:     X_4: (impure pred(int, int))
-impure_pred_t1_fixed.m:022:     DCG_0_6: (io.state)
-impure_pred_t1_fixed.m:022:     DCG_3_9: (io.state)
+impure_pred_t1_fixed.m:022:     DCG_0_6: io.state
+impure_pred_t1_fixed.m:022:     DCG_3_9: io.state
 impure_pred_t1_fixed.m:022:     V_10: (impure pred(int, int))
 impure_pred_t1_fixed.m:022:     V_11: int
diff --git a/tests/invalid/purity/impure_pred_t2.err_exp
b/tests/invalid/purity/impure_pred_t2.err_exp
index 3626823..a7338c4 100644
--- a/tests/invalid/purity/impure_pred_t2.err_exp
+++ b/tests/invalid/purity/impure_pred_t2.err_exp
@@ -6,6 +6,6 @@ impure_pred_t2.m:019:   int))',
 impure_pred_t2.m:019:   expected type was `pred(V_2, V_1)'.
 impure_pred_t2.m:019:   The partial type assignment was:
 impure_pred_t2.m:019:     Y_3: (impure pred(int, int))
-impure_pred_t2.m:019:     DCG_0_5: (io.state)
-impure_pred_t2.m:019:     DCG_3_8: (io.state)
+impure_pred_t2.m:019:     DCG_0_5: io.state
+impure_pred_t2.m:019:     DCG_3_8: io.state
 impure_pred_t2.m:019:     V_9: int
diff --git a/tests/invalid/record_syntax_errors.err_exp
b/tests/invalid/record_syntax_errors.err_exp
index 7ac6e91..e401503 100644
--- a/tests/invalid/record_syntax_errors.err_exp
+++ b/tests/invalid/record_syntax_errors.err_exp
@@ -23,8 +23,8 @@ record_syntax_errors.m:057:   field update, give the
field of the constructor a
 record_syntax_errors.m:057:   different name.
 record_syntax_errors.m:014: Error: no clauses for predicate `dcg_syntax'/2.
 record_syntax_errors.m:016: Error: no clauses for predicate `dcg_syntax_2'/2.
-record_syntax_errors.m:023: Inferred :- func
-record_syntax_errors.m:023:   field8((record_syntax_errors.cons2)) = int.
+record_syntax_errors.m:023: Inferred :- func field8(record_syntax_errors.cons2)
+record_syntax_errors.m:023:   = int.
 record_syntax_errors.m:042: In clause for predicate `construct_exist_cons'/1:
 record_syntax_errors.m:042:   error: undefined symbol `field2 :=/2'.
 record_syntax_errors.m:006:   Field `field2' cannot be updated because the
@@ -46,6 +46,5 @@ record_syntax_errors.m:050:   in unification of argument
 record_syntax_errors.m:050:   and term `'field4 :='(V_10, V_9)':
 record_syntax_errors.m:050:   type error in argument(s) of functor
 record_syntax_errors.m:050:   `field4 :=/2'.
-record_syntax_errors.m:050:   Argument 1 has type
-record_syntax_errors.m:050:   `(record_syntax_errors.cons2)',
-record_syntax_errors.m:050:   expected type was `(record_syntax_errors.cons)'.
+record_syntax_errors.m:050:   Argument 1 has type `record_syntax_errors.cons2',
+record_syntax_errors.m:050:   expected type was `record_syntax_errors.cons'.
diff --git a/tests/invalid/tc_err1.err_exp b/tests/invalid/tc_err1.err_exp
index 0642387..5999fa4 100644
--- a/tests/invalid/tc_err1.err_exp
+++ b/tests/invalid/tc_err1.err_exp
@@ -1,6 +1,6 @@
 tc_err1.m:025: Error: no determinism declaration for type class method
 tc_err1.m:025:   predicate `tc_err1.handle_typedefs'/3.
-tc_err1.m:032: In instance declaration for `tc_err1.actions((tc_err1.pstate))':
+tc_err1.m:032: In instance declaration for `tc_err1.actions(tc_err1.pstate)':
 tc_err1.m:032:   no implementation for type class predicate method
 tc_err1.m:032:   `tc_err1.handle_typedefs'/3.
 tc_err1.m:032: In instance declaration for `tc_err1.actions'/1: incorrect
diff --git a/tests/invalid/tc_err2.err_exp b/tests/invalid/tc_err2.err_exp
index 72da714..1dfff3b 100644
--- a/tests/invalid/tc_err2.err_exp
+++ b/tests/invalid/tc_err2.err_exp
@@ -1,4 +1,4 @@
-tc_err2.m:044: In instance declaration for `tc_err2.actions((tc_err2.pstate))':
+tc_err2.m:044: In instance declaration for `tc_err2.actions(tc_err2.pstate)':
 tc_err2.m:044:   no implementation for type class predicate method
 tc_err2.m:044:   `tc_err2.handle_typedefs'/3.
 tc_err2.m:044: In instance declaration for `tc_err2.actions'/1: incorrect
diff --git a/tests/invalid/try_bad_params.err_exp
b/tests/invalid/try_bad_params.err_exp
index 452205c..f8b9384 100644
--- a/tests/invalid/try_bad_params.err_exp
+++ b/tests/invalid/try_bad_params.err_exp
@@ -10,13 +10,13 @@ try_bad_params.m:040:   in argument 2 of call to predicate
 try_bad_params.m:040:   `exception.rethrow'/1:
 try_bad_params.m:040:   type error: variable `STATE_VARIABLE_Int_0' has type
 try_bad_params.m:040:   `int',
-try_bad_params.m:040:   expected type was `(io.state)'.
+try_bad_params.m:040:   expected type was `io.state'.
 try_bad_params.m:040: In clause for predicate `main_3'/2:
 try_bad_params.m:040:   in argument 2 of call to predicate
 try_bad_params.m:040:   `exception.rethrow'/1:
 try_bad_params.m:040:   type error: variable `STATE_VARIABLE_Int_1' has type
 try_bad_params.m:040:   `int',
-try_bad_params.m:040:   expected type was `(io.state)'.
+try_bad_params.m:040:   expected type was `io.state'.
 try_bad_params.m:044: Error: no clauses for predicate `main_4'/1.
 try_bad_params.m:053: Error: no clauses for predicate `main_5'/2.
 For more information, recompile with `-E'.
diff --git a/tests/invalid/type_error_ambiguous.err_exp
b/tests/invalid/type_error_ambiguous.err_exp
index c1ed263..21054e2 100644
--- a/tests/invalid/type_error_ambiguous.err_exp
+++ b/tests/invalid/type_error_ambiguous.err_exp
@@ -6,9 +6,9 @@ type_error_ambiguous.m:035:   its expected type;
 type_error_ambiguous.m:035:   variable `X' has overloaded actual/expected types
 type_error_ambiguous.m:035:   {
 type_error_ambiguous.m:035:     (expected) int,
-type_error_ambiguous.m:035:     (inferred) (type_error_ambiguous.t1),
-type_error_ambiguous.m:035:     (inferred) (type_error_ambiguous.t2),
 type_error_ambiguous.m:035:     (inferred) character,
-type_error_ambiguous.m:035:     (inferred) pred(int, string)
+type_error_ambiguous.m:035:     (inferred) pred(int, string),
+type_error_ambiguous.m:035:     (inferred) type_error_ambiguous.t1,
+type_error_ambiguous.m:035:     (inferred) type_error_ambiguous.t2
 type_error_ambiguous.m:035:   }.
 For more information, recompile with `-E'.
diff --git a/tests/misc_tests/pretty_print_test.exp
b/tests/misc_tests/pretty_print_test.exp
index b3302fc..8a7f76b 100644
--- a/tests/misc_tests/pretty_print_test.exp
+++ b/tests/misc_tests/pretty_print_test.exp
@@ -1,7 +1,7 @@
 :- module pretty_print_test.
 :- interface.
 :- import_module io.
-:- pred main((io.state), (io.state)).
+:- pred main(io.state, io.state).
 :- mode main(di, uo) is det.
 :- implementation.
 :- type foobar
diff --git a/tests/warnings/inference_test.exp
b/tests/warnings/inference_test.exp
index a39475b..0d8742e 100644
--- a/tests/warnings/inference_test.exp
+++ b/tests/warnings/inference_test.exp
@@ -1,6 +1,6 @@
-inference_test.m:016: Inferred :- func len_func((list.list(T))) = int.
-inference_test.m:019: Inferred :- pred len((list.list(T)), int).
+inference_test.m:016: Inferred :- func len_func(list.list(T)) = int.
+inference_test.m:019: Inferred :- pred len(list.list(T), int).
 inference_test.m:030: Inferred :- func int_zero = int.
-inference_test.m:032: Inferred :- pred unused_pred((list.list(T)),
-inference_test.m:032:   (list.list(T))) <= (inference_test.null(T)).
+inference_test.m:032: Inferred :- pred unused_pred(list.list(T), list.list(T))
+inference_test.m:032:   <= (inference_test.null(T)).
 inference_test.m:019: Inferred :- mode len(in, out) is det.
--------------------------------------------------------------------------
mercury-reviews mailing list
Post messages to:       mercury-reviews at csse.unimelb.edu.au
Administrative Queries: owner-mercury-reviews at csse.unimelb.edu.au
Subscriptions:          mercury-reviews-request at csse.unimelb.edu.au
--------------------------------------------------------------------------



More information about the reviews mailing list