[m-rev.] Change compiler output from "Var :: Type" to "Var: Type"

Ralph Becket rafe at cs.mu.OZ.AU
Fri Mar 28 14:53:49 AEDT 2003


Estimated hours taken: 2
Branches: main

Change the compiler output to use "Var: Type" rather than "Var :: Type".
Eventually we want to use `:' for type annotation and `::' for mode/inst
annotation.

compiler/hlds_out.m:
compiler/post_typecheck.m:
compiler/typecheck.m:
	Change message output to use ": " rather than " :: " when
	associating terms with types.

tests/invalid/ext_type.err_exp:
tests/invalid/overloading.err_exp:
tests/invalid/typeclass_test_8.err_exp:
tests/warnings/singleton_test.exp:
	Change expected compiler output accordingly.

Index: compiler/hlds_out.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/hlds_out.m,v
retrieving revision 1.303
diff -u -r1.303 hlds_out.m
--- compiler/hlds_out.m	21 Mar 2003 05:52:05 -0000	1.303
+++ compiler/hlds_out.m	25 Mar 2003 05:55:45 -0000
@@ -2739,7 +2739,7 @@
 	{ term__var_to_int(Var, VarNum) },
 	io__write_int(VarNum),
 	io__write_string(")"),
-	io__write_string(" :: "),
+	io__write_string(": "),
 	mercury_output_term(Type, TypeVarSet, AppendVarnums),
 	io__write_string("\n"),
 	hlds_out__write_var_types_2(Vars, Indent, VarSet, AppendVarnums,
Index: compiler/post_typecheck.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/post_typecheck.m,v
retrieving revision 1.49
diff -u -r1.49 post_typecheck.m
--- compiler/post_typecheck.m	21 Mar 2003 05:52:07 -0000	1.49
+++ compiler/post_typecheck.m	25 Mar 2003 05:56:32 -0000
@@ -448,7 +448,7 @@
 	prog_out__write_context(Context),
 	io__write_string("      "),
 	mercury_output_var(Var, VarSet, no),
-	io__write_string(" :: "),
+	io__write_string(": "),
 	mercury_output_term(Type, TVarSet, no),
 	io__write_string("\n"),
 	write_type_var_list(Rest, Context, VarSet, TVarSet).
Index: compiler/typecheck.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/typecheck.m,v
retrieving revision 1.335
diff -u -r1.335 typecheck.m
--- compiler/typecheck.m	21 Mar 2003 05:52:08 -0000	1.335
+++ compiler/typecheck.m	25 Mar 2003 05:57:06 -0000
@@ -5566,7 +5566,7 @@
 		;
 			{ error("typecheck:write_cons_type - invalid cons_id") }
 		),	
-		io__write_string(" :: ")
+		io__write_string(": ")
 	;
 		[]
 	),
@@ -5702,7 +5702,7 @@
 			[]
 		),
 		mercury_output_var(Var, VarSet, no),
-		io__write_string(" :: "),
+		io__write_string(": "),
 		write_type_b(Type, TypeVarSet, TypeBindings),
 		write_type_assign_types(Vars, VarSet, VarTypes, TypeBindings,
 			TypeVarSet, yes)
@@ -6599,7 +6599,7 @@
 		{ Found1 = yes },
 		prog_out__write_context(Context),
 		mercury_output_var(V, VarSet, no),
-		io__write_string(" :: "),
+		io__write_string(": "),
 		{ type_assign_get_typevarset(TypeAssign1, TVarSet1) },
 		output_type(T1, TVarSet1, HeadTypeParams1),
 		io__write_string(" or "),
Index: tests/invalid/ext_type.err_exp
===================================================================
RCS file: /home/mercury1/repository/tests/invalid/ext_type.err_exp,v
retrieving revision 1.2
diff -u -r1.2 ext_type.err_exp
--- tests/invalid/ext_type.err_exp	17 Jan 2003 05:57:08 -0000	1.2
+++ tests/invalid/ext_type.err_exp	28 Mar 2003 03:27:49 -0000
@@ -3,11 +3,11 @@
 ext_type.m:016:   and functor `q/1'.
 ext_type.m:016:   variable `Z' has type `(some [QT] QT)',
 ext_type.m:016:   functor `q/1' has type 
-ext_type.m:016:   `q(int) :: (some [QT] QT)'.
+ext_type.m:016:   `q(int): (some [QT] QT)'.
 ext_type.m:019: In clause for predicate `ext_type.r/0':
 ext_type.m:019:   type error in unification of argument
 ext_type.m:019:   and functor `q/1'.
 ext_type.m:019:   argument has type `(some [QT] QT)',
 ext_type.m:019:   functor `q/1' has type 
-ext_type.m:019:   `q(int) :: (some [QT] QT)'.
+ext_type.m:019:   `q(int): (some [QT] QT)'.
 For more information, try recompiling with `-E'.
Index: tests/invalid/overloading.err_exp
===================================================================
RCS file: /home/mercury1/repository/tests/invalid/overloading.err_exp,v
retrieving revision 1.3
diff -u -r1.3 overloading.err_exp
--- tests/invalid/overloading.err_exp	17 Jan 2003 05:57:09 -0000	1.3
+++ tests/invalid/overloading.err_exp	28 Mar 2003 03:28:29 -0000
@@ -4,7 +4,7 @@
 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:   functor `opt_info/9' has type 
-overloading.m:050:   `opt_info((set.set((term.var((term.generic))))), (set.set((term.var((term.generic))))), (tree234.tree234((term.var((term.generic))), (tree234.tree234((overloading.goal_path), string)))), (overloading.interval_id), (counter.counter), (tree234.tree234((overloading.interval_id), (overloading.anchor))), (tree234.tree234((overloading.interval_id), (overloading.anchor))), (tree234.tree234((overloading.interval_id), (set.set((term.var((term.generic))))))), (tree234.tree234((overloading.interval_id), (list.list((overloading.interval_id)))))) :: (overloading.opt_info)',
+overloading.m:050:   `opt_info((set.set((term.var((term.generic))))), (set.set((term.var((term.generic))))), (tree234.tree234((term.var((term.generic))), (tree234.tree234((overloading.goal_path), string)))), (overloading.interval_id), (counter.counter), (tree234.tree234((overloading.interval_id), (overloading.anchor))), (tree234.tree234((overloading.interval_id), (overloading.anchor))), (tree234.tree234((overloading.interval_id), (set.set((term.var((term.generic))))))), (tree234.tree234((overloading.interval_id), (list.list((overloading.interval_id)))))): (overloading.opt_info)',
 overloading.m:050:   variable `MustHaveOwnSlot' has type `(set.set((term.var((term.generic)))))',
 overloading.m:050:   variable `EverOnStack' has type `(set.set((term.var((term.generic)))))',
 overloading.m:050:   variable `CurIntervalId' has type `(overloading.interval_id)',
Index: tests/invalid/typeclass_test_8.err_exp
===================================================================
RCS file: /home/mercury1/repository/tests/invalid/typeclass_test_8.err_exp,v
retrieving revision 1.4
diff -u -r1.4 typeclass_test_8.err_exp
--- tests/invalid/typeclass_test_8.err_exp	17 Jan 2003 05:57:10 -0000	1.4
+++ tests/invalid/typeclass_test_8.err_exp	28 Mar 2003 03:32:27 -0000
@@ -4,7 +4,7 @@
 typeclass_test_8.m:004: In predicate `typeclass_test_8.main/2':
 typeclass_test_8.m:004:   warning: unresolved polymorphism.
 typeclass_test_8.m:004:   The variable with an unbound type was:
-typeclass_test_8.m:004:       X :: T
+typeclass_test_8.m:004:       X: T
 typeclass_test_8.m:004:   The unbound type variable(s) will be implicitly
 typeclass_test_8.m:004:   bound to the builtin type `void'.
 For more information, try recompiling with `-E'.
Index: tests/warnings/singleton_test.exp
===================================================================
RCS file: /home/mercury1/repository/tests/warnings/singleton_test.exp,v
retrieving revision 1.7
diff -u -r1.7 singleton_test.exp
--- tests/warnings/singleton_test.exp	17 Jan 2003 05:57:19 -0000	1.7
+++ tests/warnings/singleton_test.exp	26 Mar 2003 23:54:21 -0000
@@ -13,7 +13,7 @@
 singleton_test.m:008: In function `singleton_test.my_append_func/2':
 singleton_test.m:008:   warning: unresolved polymorphism.
 singleton_test.m:008:   The variables with unbound types were:
-singleton_test.m:008:       L2 :: V_1
-singleton_test.m:008:       L1 :: V_1
+singleton_test.m:008:       L2: V_1
+singleton_test.m:008:       L1: V_1
 singleton_test.m:008:   The unbound type variable(s) will be implicitly
 singleton_test.m:008:   bound to the builtin type `void'.
--------------------------------------------------------------------------
mercury-reviews mailing list
post:  mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the reviews mailing list