[m-rev.] diff: misc compiler cleanups (part 3)

Zoltan Somogyi zs at cs.mu.OZ.AU
Fri Mar 19 21:14:51 AEDT 2004


Index: compiler/options_file.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/options_file.m,v
retrieving revision 1.20
diff -u -b -r1.20 options_file.m
--- compiler/options_file.m	6 Aug 2003 12:38:11 -0000	1.20
+++ compiler/options_file.m	16 Mar 2004 05:49:57 -0000
@@ -61,9 +61,9 @@
 %-----------------------------------------------------------------------------%
 :- implementation.
 
-:- import_module hlds__error_util.
 :- import_module libs__globals.
 :- import_module libs__options.
+:- import_module parse_tree__error_util.
 :- import_module parse_tree__prog_io.
 :- import_module parse_tree__prog_out.
 
Index: compiler/parse_tree.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/parse_tree.m,v
retrieving revision 1.4
diff -u -b -r1.4 parse_tree.m
--- compiler/parse_tree.m	1 Dec 2003 15:55:44 -0000	1.4
+++ compiler/parse_tree.m	15 Mar 2004 11:01:47 -0000
@@ -38,6 +38,7 @@
 
 % Utility routines.
 :- include_module prog_util.
+:- include_module error_util.
 
 % Transformations that act on the parse tree,
 % and stuff relating to the module system.
Index: compiler/post_typecheck.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/post_typecheck.m,v
retrieving revision 1.61
diff -u -b -r1.61 post_typecheck.m
--- compiler/post_typecheck.m	21 Dec 2003 05:04:36 -0000	1.61
+++ compiler/post_typecheck.m	16 Mar 2004 05:50:08 -0000
@@ -124,12 +124,12 @@
 :- import_module check_hlds__type_util.
 :- import_module check_hlds__typecheck.
 :- import_module hlds__assertion.
-:- import_module hlds__error_util.
 :- import_module hlds__goal_util.
 :- import_module hlds__hlds_out.
 :- import_module hlds__special_pred.
 :- import_module libs__globals.
 :- import_module libs__options.
+:- import_module parse_tree__error_util.
 :- import_module parse_tree__inst.
 :- import_module parse_tree__mercury_to_mercury.
 :- import_module parse_tree__prog_out.
Index: compiler/pragma_c_gen.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/pragma_c_gen.m,v
retrieving revision 1.65
diff -u -b -r1.65 pragma_c_gen.m
--- compiler/pragma_c_gen.m	21 Dec 2003 05:04:37 -0000	1.65
+++ compiler/pragma_c_gen.m	16 Mar 2004 05:50:22 -0000
@@ -47,7 +47,6 @@
 :- import_module backend_libs__foreign.
 :- import_module backend_libs__name_mangle.
 :- import_module check_hlds__type_util.
-:- import_module hlds__error_util.
 :- import_module hlds__hlds_data.
 :- import_module hlds__hlds_llds.
 :- import_module hlds__hlds_module.
@@ -59,6 +58,7 @@
 :- import_module ll_backend__code_util.
 :- import_module ll_backend__llds_out.
 :- import_module ll_backend__trace.
+:- import_module parse_tree__error_util.
 
 :- import_module bool, string, int, assoc_list, set, map, require, term.
 
Index: compiler/prog_io_util.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/prog_io_util.m,v
retrieving revision 1.28
diff -u -b -r1.28 prog_io_util.m
--- compiler/prog_io_util.m	21 Dec 2003 05:04:37 -0000	1.28
+++ compiler/prog_io_util.m	19 Mar 2004 03:54:45 -0000
@@ -14,12 +14,10 @@
 % Most parsing predicates must check for errors. They return either the
 % item(s) they were looking for, or an error indication.
 %
-% Most of the parsing predicates return a `maybe1(T)'
-% or a `maybe2(T1, T2)', which will either be the
-% `ok(ParseTree)' (or `ok(ParseTree1, ParseTree2)'),
-% if the parse is successful, or `error(Message, Term)'
-% if it is not.  The `Term' there should be the term which
-% is syntactically incorrect.
+% Most of the parsing predicates return a `maybe1(T)' or a `maybe2(T1, T2)',
+% which will either be the `ok(ParseTree)' (or `ok(ParseTree1, ParseTree2)'),
+% if the parse is successful, or `error(Message, Term)' if it is not.
+% The `Term' there should be the term which is syntactically incorrect.
 
 :- module parse_tree__prog_io_util.
 
@@ -28,9 +26,10 @@
 :- import_module parse_tree__inst.
 :- import_module parse_tree__prog_data.
 
-:- import_module list, map, std_util, term, io.
+:- import_module list, map, std_util, term.
 
-:- type maybe2(T1, T2)	--->	error(string, term)
+:- type maybe2(T1, T2)
+	--->	error(string, term)
 			;	ok(T1, T2).
 
 :- type maybe3(T1, T2, T3)
@@ -57,113 +56,85 @@
 :- type parser(T) == pred(term, maybe1(T)).
 :- mode parser    :: pred(in, out) is det.
 
-:- pred add_context(maybe1(item), prog_context, maybe_item_and_context).
-:- mode add_context(in, in, out) is det.
+:- pred add_context(maybe1(item)::in, prog_context::in,
+	maybe_item_and_context::out) is det.
 
 %
 % Various predicates to parse small bits of syntax.
 % These predicates simply fail if they encounter a syntax error.
 %
 
-:- pred parse_list_of_vars(term(T), list(var(T))).
-:- mode parse_list_of_vars(in, out) is semidet.
+:- pred parse_list_of_vars(term(T)::in, list(var(T))::out) is semidet.
 
 	% Parse a list of quantified variables, splitting it into
 	% state variables and ordinary logic variables, respectively.
 	%
-:- pred parse_quantifier_vars(term(T), list(var(T)), list(var(T))).
-:- mode parse_quantifier_vars(in, out, out) is semidet.
+:- pred parse_quantifier_vars(term(T)::in, list(var(T))::out,
+	list(var(T))::out) is semidet.
 
-:- pred parse_name_and_arity(module_name, term(_T), sym_name, arity).
-:- mode parse_name_and_arity(in, in, out, out) is semidet.
+:- pred parse_name_and_arity(module_name::in, term(_T)::in,
+	sym_name::out, arity::out) is semidet.
 
-:- pred parse_name_and_arity(term(_T), sym_name, arity).
-:- mode parse_name_and_arity(in, out, out) is semidet.
+:- pred parse_name_and_arity(term(_T)::in, sym_name::out, arity::out)
+	is semidet.
 
-:- pred parse_pred_or_func_name_and_arity(module_name,
-		term(_T), pred_or_func, sym_name, arity).
-:- mode parse_pred_or_func_name_and_arity(in, in, out, out, out) is semidet.
+:- pred parse_pred_or_func_name_and_arity(module_name::in,
+	term(_T)::in, pred_or_func::out, sym_name::out, arity::out) is semidet.
 
-:- pred parse_pred_or_func_name_and_arity(term(_T), pred_or_func,
-		sym_name, arity).
-:- mode parse_pred_or_func_name_and_arity(in, out, out, out) is semidet.
+:- pred parse_pred_or_func_name_and_arity(term(_T)::in, pred_or_func::out,
+	sym_name::out, arity::out) is semidet.
 
-:- pred parse_pred_or_func_and_args(maybe(module_name), term(_T), term(_T),
-		string, maybe_pred_or_func(term(_T))).
-:- mode parse_pred_or_func_and_args(in, in, in, in, out) is det.
+:- pred parse_pred_or_func_and_args(maybe(module_name)::in, term(_T)::in,
+	term(_T)::in, string::in, maybe_pred_or_func(term(_T))::out) is det.
 
-:- pred parse_pred_or_func_and_args(term(_T), pred_or_func, sym_name,
-		list(term(_T))).
-:- mode parse_pred_or_func_and_args(in, out, out, out) is semidet.
+:- pred parse_pred_or_func_and_args(term(_T)::in, pred_or_func::out,
+	sym_name::out, list(term(_T))::out) is semidet.
 
-:- pred convert_type(term(T), type).
-:- mode convert_type(in, out) is det.
+:- pred convert_type(term(T)::in, (type)::out) is det.
 
 :- type allow_constrained_inst_var
 	--->	allow_constrained_inst_var
 	;	no_allow_constrained_inst_var.
 
-:- pred convert_mode_list(allow_constrained_inst_var, list(term), list(mode)).
-:- mode convert_mode_list(in, in, out) is semidet.
+:- pred convert_mode_list(allow_constrained_inst_var::in, list(term)::in,
+	list(mode)::out) is semidet.
 
-:- pred convert_mode(allow_constrained_inst_var, term, mode).
-:- mode convert_mode(in, in, out) is semidet.
+:- pred convert_mode(allow_constrained_inst_var::in, term::in, (mode)::out)
+	is semidet.
 
-:- pred convert_inst_list(allow_constrained_inst_var, list(term), list(inst)).
-:- mode convert_inst_list(in, in, out) is semidet.
+:- pred convert_inst_list(allow_constrained_inst_var::in, list(term)::in,
+	list(inst)::out) is semidet.
 
-:- pred convert_inst(allow_constrained_inst_var, term, inst).
-:- mode convert_inst(in, in, out) is semidet.
+:- pred convert_inst(allow_constrained_inst_var::in, term::in, (inst)::out)
+	is semidet.
 
-:- pred standard_det(string, determinism).
-:- mode standard_det(in, out) is semidet.
+:- pred standard_det(string::in, determinism::out) is semidet.
 
 	% convert a "disjunction" (bunch of terms separated by ';'s) to a list
 
-:- pred disjunction_to_list(term(T), list(term(T))).
-:- mode disjunction_to_list(in, out) is det.
+:- pred disjunction_to_list(term(T)::in, list(term(T))::out) is det.
 
 	% convert a "conjunction" (bunch of terms separated by ','s) to a list
 
-:- pred conjunction_to_list(term(T), list(term(T))).
-:- mode conjunction_to_list(in, out) is det.
+:- pred conjunction_to_list(term(T)::in, list(term(T))::out) is det.
 
 	% list_to_conjunction(Context, First, Rest, Term).
 	% convert a list to a "conjunction" (bunch of terms separated by ','s)
 
-:- pred list_to_conjunction(prog_context, term(T), list(term(T)), term(T)).
-:- mode list_to_conjunction(in, in, in, out) is det.
+:- pred list_to_conjunction(prog_context::in, term(T)::in, list(term(T))::in,
+	term(T)::out) is det.
 
 	% convert a "sum" (bunch of terms separated by '+' operators) to a list
 
-:- pred sum_to_list(term(T), list(term(T))).
-:- mode sum_to_list(in, out) is det.
+:- pred sum_to_list(term(T)::in, list(term(T))::out) is det.
 
 	% Parse a comma-separated list (misleading described as
 	% a "conjunction") of things.
 
-:- pred parse_list(parser(T), term, maybe1(list(T))).
-:- mode parse_list(parser, in, out) is det.
-
-:- pred map_parser(parser(T), list(term), maybe1(list(T))).
-:- mode map_parser(parser, in, out) is det.
-
-% The following /3, /4 and /5 predicates are to be used for reporting
-% warnings to stderr.  This is preferable to using io__write_string, as
-% this checks the halt-at-warn option.
-%
-% This predicate is best used by predicates that do not have access to
-% module_info for a particular module.  It sets the exit status to error
-% when a warning is encountered in a module, and the --halt-at-warn
-% option is set.
-
-:- pred report_warning(string::in, io__state::di, io__state::uo) is det.
+:- pred parse_list(parser(T)::parser, term::in, maybe1(list(T))::out) is det.
 
-:- pred report_warning(io__output_stream::in, string::in, io__state::di,
-                      io__state::uo) is det.
-
-:- pred report_warning(string::in, int::in, string::in, io__state::di,
-                      io__state::uo) is det.
+:- pred map_parser(parser(T)::parser, list(term)::in, maybe1(list(T))::out)
+	is det.
 
 %-----------------------------------------------------------------------------%
 
@@ -253,7 +224,7 @@
 
 parse_list_of_vars(term__functor(term__atom("[]"), [], _), []).
 parse_list_of_vars(term__functor(term__atom("[|]"),
-		[Head, Tail], _), [V|Vs]) :-
+		[Head, Tail], _), [V | Vs]) :-
 	Head = term__variable(V),
 	parse_list_of_vars(Tail, Vs).
 
@@ -277,11 +248,10 @@
 			term__context_init).
 
 convert_mode_list(_, [], []).
-convert_mode_list(AllowConstrainedInstVar, [H0|T0], [H|T]) :-
+convert_mode_list(AllowConstrainedInstVar, [H0 | T0], [H | T]) :-
 	convert_mode(AllowConstrainedInstVar, H0, H),
 	convert_mode_list(AllowConstrainedInstVar, T0, T).
 
-
 	% 
 	% The new operator for mode declarations is >>.
 	% Previously we used ->, but this required a high-precedence
@@ -355,7 +325,7 @@
 	).
 
 convert_inst_list(_, [], []).
-convert_inst_list(AllowConstrainedInstVar, [H0|T0], [H|T]) :-
+convert_inst_list(AllowConstrainedInstVar, [H0 | T0], [H | T]) :-
 	convert_inst(AllowConstrainedInstVar, H0, H),
 	convert_inst_list(AllowConstrainedInstVar, T0, T).
 
@@ -411,7 +381,8 @@
 	; Name = "bound", Args0 = [Disj] ->
 		parse_bound_inst_list(AllowConstrainedInstVar, Disj, shared,
 			Result)
-/* `bound_unique' is for backwards compatibility - use `unique' instead */
+	% `bound_unique' is for backwards compatibility
+	% - use `unique' instead
 	; Name = "bound_unique", Args0 = [Disj] ->
 		parse_bound_inst_list(AllowConstrainedInstVar, Disj, unique,
 			Result)
@@ -457,14 +428,13 @@
 
 	% A "simple" builtin inst is one that has no arguments and no special
 	% syntax.
-:- pred convert_simple_builtin_inst(string, list(term), inst).
-:- mode convert_simple_builtin_inst(in, in, out) is semidet.
+:- pred convert_simple_builtin_inst(string::in, list(term)::in, (inst)::out)
+	is semidet.
 
 convert_simple_builtin_inst(Name, [], Inst) :-
 	convert_simple_builtin_inst_2(Name, Inst).
 
-:- pred convert_simple_builtin_inst_2(string, inst).
-:- mode convert_simple_builtin_inst_2(in, out) is semidet.
+:- pred convert_simple_builtin_inst_2(string::in, (inst)::out) is semidet.
 
 	% `free' insts
 convert_simple_builtin_inst_2("free", free).
@@ -513,17 +483,16 @@
 		F2 = functor(ConsId, _)
 	).
 
-:- pred convert_bound_inst_list(allow_constrained_inst_var, list(term),
-		list(bound_inst)).
-:- mode convert_bound_inst_list(in, in, out) is semidet.
+:- pred convert_bound_inst_list(allow_constrained_inst_var::in, list(term)::in,
+	list(bound_inst)::out) is semidet.
 
 convert_bound_inst_list(_, [], []).
-convert_bound_inst_list(AllowConstrainedInstVar, [H0|T0], [H|T]) :-
+convert_bound_inst_list(AllowConstrainedInstVar, [H0 | T0], [H | T]) :-
 	convert_bound_inst(AllowConstrainedInstVar, H0, H),
 	convert_bound_inst_list(AllowConstrainedInstVar, T0, T).
 
-:- pred convert_bound_inst(allow_constrained_inst_var, term, bound_inst).
-:- mode convert_bound_inst(in, in, out) is semidet.
+:- pred convert_bound_inst(allow_constrained_inst_var::in, term::in,
+	bound_inst::out) is semidet.
 
 convert_bound_inst(AllowConstrainedInstVar, InstTerm, functor(ConsId, Args)) :-
 	InstTerm = term__functor(Functor, Args0, _),
@@ -556,23 +525,22 @@
 	% general predicate to convert terms separated by any specified
 	% operator into a list
 
-:- pred binop_term_to_list(string, term(T), list(term(T))).
-:- mode binop_term_to_list(in, in, out) is det.
+:- pred binop_term_to_list(string::in, term(T)::in, list(term(T))::out) is det.
 
 binop_term_to_list(Op, Term, List) :-
 	binop_term_to_list_2(Op, Term, [], List).
 
-:- pred binop_term_to_list_2(string, term(T), list(term(T)), list(term(T))).
-:- mode binop_term_to_list_2(in, in, in, out) is det.
+:- pred binop_term_to_list_2(string::in, term(T)::in, list(term(T))::in,
+	list(term(T))::out) is det.
 
-binop_term_to_list_2(Op, Term, List0, List) :-
+binop_term_to_list_2(Op, Term, !List) :-
 	(
 		Term = term__functor(term__atom(Op), [L, R], _Context)
 	->
-		binop_term_to_list_2(Op, R, List0, List1),
-		binop_term_to_list_2(Op, L, List1, List)
+		binop_term_to_list_2(Op, R, !List),
+		binop_term_to_list_2(Op, L, !List)
 	;
-		List = [Term|List0]
+		!:List = [Term | !.List]
 	).
 
 parse_list(Parser, Term, Result) :-
@@ -580,55 +548,23 @@
 	map_parser(Parser, List, Result).
 
 map_parser(_, [], ok([])).
-map_parser(Parser, [X|Xs], Result) :-
+map_parser(Parser, [X | Xs], Result) :-
 	call(Parser, X, X_Result),
 	map_parser(Parser, Xs, Xs_Result),
 	combine_list_results(X_Result, Xs_Result, Result).
 
 	% If a list of things contains multiple errors, then we only
 	% report the first one.
-:- pred combine_list_results(maybe1(T), maybe1(list(T)), maybe1(list(T))).
-:- mode combine_list_results(in, in, out) is det.
+:- pred combine_list_results(maybe1(T)::in, maybe1(list(T))::in,
+	maybe1(list(T))::out) is det.
 
 combine_list_results(error(Msg, Term), _, error(Msg, Term)).
 combine_list_results(ok(_), error(Msg, Term), error(Msg, Term)).
-combine_list_results(ok(X), ok(Xs), ok([X|Xs])).
+combine_list_results(ok(X), ok(Xs), ok([X | Xs])).
 
 %-----------------------------------------------------------------------------%
 
-report_warning(Message) -->
-	globals__io_lookup_bool_option(halt_at_warn, HaltAtWarn),
-	( { HaltAtWarn = yes } ->
-		io__set_exit_status(1)
-	;
-		[]
-	),
-	io__write_string(Message).
-
-report_warning(Stream, Message) -->
-	globals__io_lookup_bool_option(halt_at_warn, HaltAtWarn),
-	( { HaltAtWarn = yes } ->
-		io__set_exit_status(1)
-	;
-		[]
-	),
-	io__write_string(Stream, Message).
-
-report_warning(FileName, LineNum, Message) -->
-	{ string__format("%s:%3d: Warning: %s\n",
-		[s(FileName), i(LineNum), s(Message)], FullMessage) },
-	io__write_string(FullMessage),
-	globals__io_lookup_bool_option(halt_at_warn, HaltAtWarn),
-	( { HaltAtWarn = yes } ->
-		io__set_exit_status(1)
-	;
-		[]
-	).
-
-%------------------------------------------------------------------------------%
-
 parse_quantifier_vars(functor(atom("[]"),  [],     _), [],  []).
-
 parse_quantifier_vars(functor(atom("[|]"), [H, T], _), SVs, Vs) :-
 	(
 		H   = functor(atom("!"), [variable(SV)], _),
Index: compiler/purity.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/purity.m,v
retrieving revision 1.63
diff -u -b -r1.63 purity.m
--- compiler/purity.m	21 Dec 2003 05:04:37 -0000	1.63
+++ compiler/purity.m	15 Mar 2004 23:36:51 -0000
@@ -191,6 +191,7 @@
 :- import_module hlds__passes_aux.
 :- import_module libs__globals.
 :- import_module libs__options.
+:- import_module parse_tree__error_util.
 :- import_module parse_tree__mercury_to_mercury.
 :- import_module parse_tree__module_qual.
 :- import_module parse_tree__prog_data.
@@ -999,14 +1000,14 @@
 	io__state::di, io__state::uo) is det.
 
 warn_exaggerated_impurity_decl(ModuleInfo, PredInfo, PredId,
-		DeclPurity, AcutalPurity) -->
+		DeclPurity, ActualPurity) -->
 	{ pred_info_context(PredInfo, Context) },
 	write_context_and_pred_id(ModuleInfo, PredInfo, PredId),
 	prog_out__write_context(Context),
 	report_warning("  warning: declared `"),
 	write_purity(DeclPurity),
 	io__write_string("' but actually "),
-	write_purity(AcutalPurity),
+	write_purity(ActualPurity),
 	io__write_string(".\n").
 
 :- pred warn_unnecessary_promise_pure(module_info::in, pred_info::in,
Index: compiler/recompilation.check.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/recompilation.check.m,v
retrieving revision 1.5
diff -u -b -r1.5 recompilation.check.m
--- compiler/recompilation.check.m	1 Dec 2003 15:55:48 -0000	1.5
+++ compiler/recompilation.check.m	16 Mar 2004 05:51:23 -0000
@@ -56,13 +56,13 @@
 
 :- implementation.
 
-:- import_module hlds__error_util.
 :- import_module hlds__hlds_data.	% for type field_access_type
 :- import_module hlds__hlds_pred.	% for field_access_function_name,
 					% type pred_id.
 :- import_module libs__globals.
 :- import_module libs__options.
 :- import_module libs__timestamp.
+:- import_module parse_tree__error_util.
 :- import_module parse_tree__prog_io_util.
 :- import_module parse_tree__prog_out.
 :- import_module parse_tree__prog_util.
Index: compiler/rl_exprn.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/rl_exprn.m,v
retrieving revision 1.36
diff -u -b -r1.36 rl_exprn.m
--- compiler/rl_exprn.m	1 Dec 2003 15:55:48 -0000	1.36
+++ compiler/rl_exprn.m	15 Mar 2004 23:34:27 -0000
@@ -135,8 +135,9 @@
 :- import_module check_hlds__inst_match.
 :- import_module check_hlds__mode_util.
 :- import_module check_hlds__type_util.
-:- import_module hlds__error_util.
+:- import_module parse_tree__error_util.
 :- import_module hlds__hlds_data.
+:- import_module hlds__hlds_error_util.
 :- import_module hlds__hlds_goal.
 :- import_module hlds__hlds_pred.
 :- import_module hlds__instmap.
@@ -984,8 +985,7 @@
 
 rl_exprn__call_not_implemented_error(Context, 
 		ModuleInfo, PredId, ProcId, ErrorDescr) :-
-	error_util__describe_one_proc_name(ModuleInfo,
-		proc(PredId, ProcId), ProcName),
+	describe_one_proc_name(ModuleInfo, proc(PredId, ProcId), ProcName),
 	prog_out__context_to_string(Context, ContextStr),
 	string__append_list(
 		[
Index: compiler/rtti_out.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/rtti_out.m,v
retrieving revision 1.41
diff -u -b -r1.41 rtti_out.m
--- compiler/rtti_out.m	3 Feb 2004 05:40:01 -0000	1.41
+++ compiler/rtti_out.m	16 Mar 2004 05:51:27 -0000
@@ -75,13 +75,13 @@
 :- import_module backend_libs__name_mangle.
 :- import_module backend_libs__pseudo_type_info.
 :- import_module backend_libs__type_ctor_info.
-:- import_module hlds__error_util.
 :- import_module hlds__hlds_data.
 :- import_module libs__globals.
 :- import_module libs__options.
 :- import_module ll_backend__code_util.
 :- import_module ll_backend__layout_out.
 :- import_module ll_backend__llds.
+:- import_module parse_tree__error_util.
 :- import_module parse_tree__prog_data.
 :- import_module parse_tree__prog_out.
 
Index: compiler/table_gen.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/table_gen.m,v
retrieving revision 1.56
diff -u -b -r1.56 table_gen.m
--- compiler/table_gen.m	21 Dec 2003 05:04:37 -0000	1.56
+++ compiler/table_gen.m	16 Mar 2004 05:55:28 -0000
@@ -251,9 +251,9 @@
 :- import_module check_hlds__polymorphism.
 :- import_module check_hlds__purity.
 :- import_module check_hlds__type_util.
-:- import_module hlds__error_util.
 :- import_module hlds__goal_util.
 :- import_module hlds__hlds_data.
+:- import_module hlds__hlds_error_util.
 :- import_module hlds__hlds_goal.
 :- import_module hlds__hlds_module.
 :- import_module hlds__hlds_out.
@@ -268,6 +268,7 @@
 :- import_module ll_backend__continuation_info.
 :- import_module ll_backend__follow_code.
 :- import_module ll_backend__llds.
+:- import_module parse_tree__error_util.
 :- import_module parse_tree__inst.
 :- import_module parse_tree__prog_data.
 :- import_module parse_tree__prog_out.
@@ -490,8 +491,7 @@
 
 report_missing_tabled_for_io(ModuleInfo, PredInfo, PredId, ProcId) -->
 	{ pred_info_context(PredInfo, Context) },
-	{ error_util__describe_one_proc_name(ModuleInfo, proc(PredId, ProcId),
-		Name) },
+	{ describe_one_proc_name(ModuleInfo, proc(PredId, ProcId), Name) },
 	{ Msg = [fixed(Name), words("contains untabled I/O primitive.")] },
 	error_util__write_error_pieces(Context, 0, Msg).
 
Index: compiler/term_errors.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/term_errors.m,v
retrieving revision 1.22
diff -u -b -r1.22 term_errors.m
--- compiler/term_errors.m	12 Feb 2004 03:36:16 -0000	1.22
+++ compiler/term_errors.m	16 Mar 2004 05:56:30 -0000
@@ -139,11 +139,12 @@
 
 :- implementation.
 
-:- import_module hlds__error_util.
+:- import_module hlds__hlds_error_util.
 :- import_module hlds__hlds_out.
 :- import_module hlds__passes_aux.
 :- import_module libs__globals.
 :- import_module libs__options.
+:- import_module parse_tree__error_util.
 :- import_module parse_tree__mercury_to_mercury.
 :- import_module parse_tree__prog_out.
 :- import_module term.
@@ -163,13 +164,12 @@
 	{ get_context_from_scc(SCC, Module, Context) },
 	( { SCC = [PPId] } ->
 		{ Pieces0 = [words("Termination of")] },
-		{ error_util__describe_one_proc_name(Module, PPId, PredName) },
+		{ describe_one_proc_name(Module, PPId, PredName) },
 		{ list__append(Pieces0, [fixed(PredName)], Pieces1) },
 		{ Single = yes(PPId) }
 	;
 		{ Pieces0 = [words("Termination of the mutually recursive procedures")] },
-		{ error_util__describe_several_proc_names(Module, SCC,
-			ProcNamePieces) },
+		{ describe_several_proc_names(Module, SCC, ProcNamePieces) },
 		{ list__append(Pieces0, ProcNamePieces, Pieces1) },
 		{ Single = no }
 	),
@@ -203,14 +203,13 @@
 	{ get_context_from_scc(SCC, Module, Context) },
 	( { SCC = [PPId] } ->
 		{ Pieces0 = [words("Termination constant of")] },
-		{ error_util__describe_one_proc_name(Module, PPId, ProcName) },
+		{ describe_one_proc_name(Module, PPId, ProcName) },
 		{ list__append(Pieces0, [fixed(ProcName)], Pieces1) },
 		{ Single = yes(PPId) }
 	;
 		{ Pieces0 = [words("Termination constants"),
 			words("of the mutually recursive procedures")] },
-		{ error_util__describe_several_proc_names(Module, SCC,
-			ProcNamePieces) },
+		{ describe_several_proc_names(Module, SCC, ProcNamePieces) },
 		{ list__append(Pieces0, ProcNamePieces, Pieces1) },
 		{ Single = no }
 	),
@@ -294,12 +293,11 @@
 		Piece1 = words("It")
 	;
 		Single = no,
-		error_util__describe_one_proc_name(Module, CallerPPId,
-			ProcName),
+		describe_one_proc_name(Module, CallerPPId, ProcName),
 		Piece1 = fixed(ProcName)
 	),
 	Piece2 = words("calls"),
-	error_util__describe_one_proc_name(Module, CalleePPId, CalleePiece),
+	describe_one_proc_name(Module, CalleePPId, CalleePiece),
 	Pieces3 = [words("with an unbounded increase"),
 		words("in the size of the input arguments.")],
 	Pieces = [Piece1, Piece2, fixed(CalleePiece) | Pieces3].
@@ -312,12 +310,11 @@
 		Piece1 = words("It")
 	;
 		Single = no,
-		error_util__describe_one_proc_name(Module, CallerPPId,
-			ProcName),
+		describe_one_proc_name(Module, CallerPPId, ProcName),
 		Piece1 = fixed(ProcName)
 	),
 	Piece2 = words("calls"),
-	error_util__describe_one_proc_name(Module, CalleePPId, CalleePiece),
+	describe_one_proc_name(Module, CalleePPId, CalleePiece),
 	Pieces3 = [words("which could not be proven to terminate.")],
 	Pieces = [Piece1, Piece2, fixed(CalleePiece) | Pieces3].
 
@@ -334,12 +331,11 @@
 		Piece1 = words("It")
 	;
 		Single = no,
-		error_util__describe_one_proc_name(Module, CallerPPId,
-			ProcName),
+		describe_one_proc_name(Module, CallerPPId, ProcName),
 		Piece1 = fixed(ProcName)
 	),
 	Piece2 = words("calls"),
-	error_util__describe_one_proc_name(Module, CalleePPId, CalleePiece),
+	describe_one_proc_name(Module, CalleePPId, CalleePiece),
 	Pieces3 = [words("with one or more higher order arguments.")],
 	Pieces = [Piece1, Piece2, fixed(CalleePiece) | Pieces3].
 
@@ -351,12 +347,11 @@
 		Piece1 = words("It")
 	;
 		Single = no,
-		error_util__describe_one_proc_name(Module, CallerPPId,
-			ProcName),
+		describe_one_proc_name(Module, CallerPPId, ProcName),
 		Piece1 = fixed(ProcName)
 	),
 	Piece2 = words("calls"),
-	error_util__describe_one_proc_name(Module, CalleePPId, CalleePiece),
+	describe_one_proc_name(Module, CalleePPId, CalleePiece),
 	Pieces3 = [words("which has a termination constant of infinity.")],
 	Pieces = [Piece1, Piece2, fixed(CalleePiece) | Pieces3].
 
@@ -370,16 +365,14 @@
 		;
 			% XXX this should never happen (but it does)
 			% error("not_subset outside this SCC"),
-			error_util__describe_one_proc_name(Module, ProcPPId,
-				PPIdPiece),
+			describe_one_proc_name(Module, ProcPPId, PPIdPiece),
 			Pieces1 = [words("The set of"),
 				words("output supplier variables of"),
 				fixed(PPIdPiece)]
 		)
 	;
 		Single = no,
-		error_util__describe_one_proc_name(Module, ProcPPId,
-			PPIdPiece),
+		describe_one_proc_name(Module, ProcPPId, PPIdPiece),
 		Pieces1 = [words("The set of output supplier variables of"),
 			fixed(PPIdPiece)]
 	),
@@ -399,7 +392,7 @@
 
 term_errors__description(cycle(_StartPPId, CallSites), _, Module, Pieces, no) :-
 	( CallSites = [DirectCall] ->
-		error_util__describe_one_call_site(Module, DirectCall, Site),
+		describe_one_call_site(Module, DirectCall, Site),
 		Pieces = [words("At the recursive call to"),
 			fixed(Site),
 			words("the arguments are"),
@@ -407,8 +400,7 @@
 	;
 		Pieces1 = [words("In the recursive cycle"),
 			words("through the calls to")],
-		error_util__describe_several_call_sites(Module, CallSites,
-			SitePieces),
+		describe_several_call_sites(Module, CallSites, SitePieces),
 		Pieces2 = [words("the arguments are"),
 			words("not guaranteed to decrease in size.")],
 		list__condense([Pieces1, SitePieces, Pieces2], Pieces)
@@ -441,8 +433,7 @@
 		Piece2 = words("it.")
 	;
 		Single = no,
-		error_util__describe_one_pred_name(Module, PredId,
-			Piece2Nodot),
+		describe_one_pred_name(Module, PredId, Piece2Nodot),
 		string__append(Piece2Nodot, ".", Piece2Str),
 		Piece2 = fixed(Piece2Str)
 	),
Index: compiler/term_pass1.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/term_pass1.m,v
retrieving revision 1.15
diff -u -b -r1.15 term_pass1.m
--- compiler/term_pass1.m	3 Feb 2004 04:07:52 -0000	1.15
+++ compiler/term_pass1.m	15 Mar 2004 11:16:27 -0000
@@ -57,7 +57,7 @@
 :- import_module check_hlds__type_util.
 :- import_module hlds__hlds_data.
 :- import_module hlds__hlds_goal.
-:- import_module hlds__error_util.
+:- import_module parse_tree__error_util.
 :- import_module parse_tree__prog_data.
 :- import_module transform_hlds__lp.
 :- import_module transform_hlds__term_errors.
Index: compiler/term_pass2.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/term_pass2.m,v
retrieving revision 1.15
diff -u -b -r1.15 term_pass2.m
--- compiler/term_pass2.m	3 Feb 2004 04:07:52 -0000	1.15
+++ compiler/term_pass2.m	16 Mar 2004 05:51:48 -0000
@@ -37,8 +37,8 @@
 
 :- import_module check_hlds__mode_util.
 :- import_module check_hlds__type_util.
-:- import_module hlds__error_util.
 :- import_module hlds__hlds_goal.
+:- import_module parse_tree__error_util.
 :- import_module parse_tree__prog_data.
 :- import_module transform_hlds__term_traversal.
 :- import_module transform_hlds__term_errors.
Index: compiler/term_traversal.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/term_traversal.m,v
retrieving revision 1.28
diff -u -b -r1.28 term_traversal.m
--- compiler/term_traversal.m	12 Feb 2004 03:36:16 -0000	1.28
+++ compiler/term_traversal.m	16 Mar 2004 05:51:52 -0000
@@ -106,8 +106,8 @@
 :- implementation.
 
 :- import_module check_hlds__type_util.
-:- import_module hlds__error_util.
 :- import_module hlds__hlds_data.
+:- import_module parse_tree__error_util.
 
 :- import_module assoc_list, bool, int, require, string.
 
Index: compiler/term_util.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/term_util.m,v
retrieving revision 1.34
diff -u -b -r1.34 term_util.m
--- compiler/term_util.m	12 Feb 2004 03:36:16 -0000	1.34
+++ compiler/term_util.m	16 Mar 2004 05:51:55 -0000
@@ -168,9 +168,9 @@
 :- import_module check_hlds__inst_match.
 :- import_module check_hlds__mode_util.
 :- import_module check_hlds__type_util.
-:- import_module hlds__error_util.
 :- import_module libs__globals.
 :- import_module libs__options.
+:- import_module parse_tree__error_util.
 :- import_module parse_tree__prog_out.
 
 :- import_module assoc_list, require, string.
Index: compiler/termination.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/termination.m,v
retrieving revision 1.38
diff -u -b -r1.38 termination.m
--- compiler/termination.m	12 Feb 2004 03:36:16 -0000	1.38
+++ compiler/termination.m	16 Mar 2004 05:57:05 -0000
@@ -90,14 +90,15 @@
 :- import_module check_hlds__inst_match.
 :- import_module check_hlds__mode_util.
 :- import_module check_hlds__type_util.
-:- import_module hlds__error_util.
 :- import_module hlds__hlds_data.
+:- import_module hlds__hlds_error_util.
 :- import_module hlds__hlds_goal.
 :- import_module hlds__hlds_out.
 :- import_module hlds__passes_aux.
 :- import_module hlds__special_pred.
 :- import_module libs__globals.
 :- import_module libs__options.
+:- import_module parse_tree__error_util.
 :- import_module parse_tree__mercury_to_mercury.
 :- import_module parse_tree__modules.
 :- import_module parse_tree__prog_out.
@@ -206,8 +207,8 @@
 				proc_info_set_maybe_termination_info(
 					yes(can_loop([TermErr])), ProcInfo0,
 					ProcInfo),
-				error_util__describe_one_proc_name(!.Module,
-					PPId, ProcName),
+				describe_one_proc_name(!.Module, PPId,
+					ProcName),
 				Piece1 = words("has a `pragma terminates'"),
 				Piece2 = words("declaration but also has the"),
 				Piece3 = words("`does_not_terminate' foreign"),
@@ -231,8 +232,7 @@
 			    proc_info_set_maybe_termination_info(
 			        yes(can_loop(TermErrs)),
 			        ProcInfo0, ProcInfo),
-			    error_util__describe_one_proc_name(!.Module,
-			        PPId, ProcName),
+			    describe_one_proc_name(!.Module, PPId, ProcName),
 			    Piece1 = words("has a `pragma does_not_terminate'"),
 			    Piece2 = words("declaration but also has the"),
 			    Piece3 = words("`terminates' foreign code"),
@@ -317,8 +317,8 @@
 			
 			PredIds = list__map((func(proc(PredId, _)) = PredId), 
 				SCCTerminationKnown),
-			error_util__describe_several_pred_names(!.Module, 
-				PredIds, PredNames),	
+			describe_several_pred_names(!.Module, PredIds,
+				PredNames),	
 			Piece1 = words(
 				"are mutually recursive but some of their"),
 			Piece2 = words(
Index: compiler/trace_params.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/trace_params.m,v
retrieving revision 1.15
diff -u -b -r1.15 trace_params.m
--- compiler/trace_params.m	16 Mar 2003 08:01:31 -0000	1.15
+++ compiler/trace_params.m	10 Mar 2004 06:46:48 -0000
@@ -79,6 +79,7 @@
 
 :- pred convert_trace_suppress(string::in, trace_suppress_items::out)
 	is semidet.
+:- func default_trace_suppress = trace_suppress_items.
 
 	% These functions check for various properties of the global
 	% trace level.
@@ -283,6 +284,8 @@
 :- pred char_is_comma(char::in) is semidet.
 
 char_is_comma(',').
+
+default_trace_suppress = set__init.
 
 :- func convert_port_name(string) = trace_port is semidet.
 
Index: compiler/type_ctor_info.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/type_ctor_info.m,v
retrieving revision 1.52
diff -u -b -r1.52 type_ctor_info.m
--- compiler/type_ctor_info.m	3 Feb 2004 05:40:01 -0000	1.52
+++ compiler/type_ctor_info.m	16 Mar 2004 05:52:07 -0000
@@ -64,7 +64,6 @@
 :- import_module backend_libs__rtti.
 :- import_module backend_libs__type_class_info.
 :- import_module check_hlds__type_util.
-:- import_module hlds__error_util.
 :- import_module hlds__hlds_code_util.
 :- import_module hlds__hlds_data.
 :- import_module hlds__hlds_out.
@@ -75,6 +74,7 @@
 :- import_module libs__globals.
 :- import_module libs__options.
 :- import_module ll_backend__code_util.
+:- import_module parse_tree__error_util.
 :- import_module parse_tree__prog_data.
 :- import_module parse_tree__prog_out.
 :- import_module parse_tree__prog_util.
Index: compiler/typecheck.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/typecheck.m,v
retrieving revision 1.349
diff -u -b -r1.349 typecheck.m
--- compiler/typecheck.m	23 Dec 2003 03:14:10 -0000	1.349
+++ compiler/typecheck.m	16 Mar 2004 05:34:00 -0000
@@ -158,14 +158,15 @@
 :- import_module check_hlds__inst_match.
 :- import_module check_hlds__mode_util.
 :- import_module check_hlds__type_util.
-:- import_module hlds__error_util.
 :- import_module hlds__goal_util.
+:- import_module hlds__hlds_error_util.
 :- import_module hlds__hlds_goal.
 :- import_module hlds__hlds_out.
 :- import_module hlds__passes_aux.
 :- import_module hlds__special_pred.
 :- import_module libs__globals.
 :- import_module libs__options.
+:- import_module parse_tree__error_util.
 :- import_module parse_tree__mercury_to_mercury.
 :- import_module parse_tree__modules.
 :- import_module parse_tree__prog_io.
@@ -385,8 +386,7 @@
 		;
 			true
 		),
-		error_util__describe_one_pred_name(!.ModuleInfo, PredId,
-			PredName),
+		describe_one_pred_name(!.ModuleInfo, PredId, PredName),
 		generate_stub_clause(PredName, !PredInfo, !.ModuleInfo,
 			StubClause, VarSet0, VarSet),
 		Clauses1 = [StubClause],
@@ -4632,7 +4632,7 @@
 
 report_no_clauses(MessageKind, PredId, PredInfo, ModuleInfo, !IO) :-
 	pred_info_context(PredInfo, Context),
-	error_util__describe_one_pred_name(ModuleInfo, PredId, PredName0),
+	describe_one_pred_name(ModuleInfo, PredId, PredName0),
 	string__append(PredName0, ".", PredName),
 	ErrorMsg = [ words(MessageKind ++ ": no clauses for "),
 		fixed(PredName) ],
@@ -6050,11 +6050,8 @@
 make_pred_id_preamble(Info, Preamble) :-
 	typecheck_info_get_module_info(Info, Module),
 	typecheck_info_get_predid(Info, PredID),
-	error_util__describe_one_pred_name(Module, PredID, PredName),
-	Words = "In clause for ",
-	Colon = ":",
-	string__append(Words, PredName, Preamble0),
-	string__append(Preamble0, Colon, Preamble).
+	describe_one_pred_name(Module, PredID, PredName),
+	Preamble = "In clause for " ++ PredName ++ ":".
 
 %-----------------------------------------------------------------------------%
 
Index: compiler/unify_gen.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/unify_gen.m,v
retrieving revision 1.136
diff -u -b -r1.136 unify_gen.m
--- compiler/unify_gen.m	6 Nov 2003 20:14:27 -0000	1.136
+++ compiler/unify_gen.m	16 Mar 2004 05:52:15 -0000
@@ -46,7 +46,6 @@
 :- import_module backend_libs__rtti.
 :- import_module check_hlds__mode_util.
 :- import_module check_hlds__type_util.
-:- import_module hlds__error_util.
 :- import_module hlds__hlds_module.
 :- import_module hlds__hlds_out.
 :- import_module hlds__hlds_pred.
@@ -59,6 +58,7 @@
 :- import_module ll_backend__continuation_info.
 :- import_module ll_backend__layout.
 :- import_module ll_backend__stack_layout.
+:- import_module parse_tree__error_util.
 :- import_module parse_tree__prog_data.
 :- import_module parse_tree__prog_out.
 
Index: compiler/unify_proc.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/unify_proc.m,v
retrieving revision 1.132
diff -u -b -r1.132 unify_proc.m
--- compiler/unify_proc.m	12 Feb 2004 04:06:45 -0000	1.132
+++ compiler/unify_proc.m	16 Mar 2004 05:52:20 -0000
@@ -140,7 +140,6 @@
 :- import_module check_hlds__switch_detection.
 :- import_module check_hlds__type_util.
 :- import_module check_hlds__unique_modes.
-:- import_module hlds__error_util.
 :- import_module hlds__goal_util.
 :- import_module hlds__hlds_out.
 :- import_module hlds__instmap.
@@ -149,6 +148,7 @@
 :- import_module libs__globals.
 :- import_module libs__options.
 :- import_module libs__tree.
+:- import_module parse_tree__error_util.
 :- import_module parse_tree__inst.
 :- import_module parse_tree__mercury_to_mercury.
 :- import_module parse_tree__prog_out.
Index: compiler/var_locn.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/var_locn.m,v
retrieving revision 1.16
diff -u -b -r1.16 var_locn.m
--- compiler/var_locn.m	8 Mar 2004 09:12:25 -0000	1.16
+++ compiler/var_locn.m	15 Mar 2004 11:16:28 -0000
@@ -342,7 +342,7 @@
 :- import_module libs__tree.
 :- import_module ll_backend__code_util.
 :- import_module ll_backend__exprn_aux.
-:- import_module hlds__error_util.
+:- import_module parse_tree__error_util.
 
 :- import_module int, string, bag, require, getopt, varset, term.
 
cvs diff: Diffing compiler/notes
Index: compiler/notes/compiler_design.html
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/notes/compiler_design.html,v
retrieving revision 1.89
diff -u -b -r1.89 compiler_design.html
--- compiler/notes/compiler_design.html	1 Dec 2003 15:56:05 -0000	1.89
+++ compiler/notes/compiler_design.html	15 Mar 2004 11:31:56 -0000
@@ -275,7 +275,8 @@
 
 	The modules prog_out.m and mercury_to_mercury.m contain predicates
 	for printing the parse tree.  prog_util.m contains some utility
-	predicates for manipulating the parse tree.
+	predicates for manipulating the parse tree, while error_util.m
+	contains predicates for printing nicely formatting error messages.
 
 <li><p> imports and exports are handled at this point (modules.m)
 
@@ -405,24 +406,27 @@
 the HLDS:
 
 <dl>
-	<dt> hlds_code_util.m
-	     <dd> Utility routines for use during HLDS generation.
+<dt> hlds_code_util.m
+<dd> Utility routines for use during HLDS generation.
 
-	<dt> goal_form.m
-	     <dd> Contains predicates for determining whether
-	          HLDS goals match various criteria.
-
-	<dt> goal_util.m
-	     <dd> Contains various miscellaneous utility predicates for
-	          manipulating HLDS goals, e.g. for renaming variables.
-
-	<dt> passes_aux.m
-	     <dd> Contains code to write progress messages, and higher-order
-		code to traverse all the predicates defined in the current
-		module and do something with each one.
-
-	<dt> error_util.m:
-	     <dd> Utility routines for printing nicely formatted error messages.
+<dt> goal_form.m
+<dd> Contains predicates for determining whether
+HLDS goals match various criteria.
+
+<dt> goal_util.m
+<dd> Contains various miscellaneous utility predicates for manipulating
+HLDS goals, e.g. for renaming variables.
+
+<dt> passes_aux.m
+<dd> Contains code to write progress messages, and higher-order code
+to traverse all the predicates defined in the current module
+and do something with each one.
+
+<dt> hlds_error_util.m:
+<dd> Utility routines for printing nicely formatted error messages
+for symptoms involving HLDS data structures.
+For symptoms involving only structures defined in prog_data,
+use parse_tree__error_util.
 </dl>
 
 <h4> 2. Semantic analysis and error checking </h4>
cvs diff: Diffing debian
cvs diff: Diffing deep_profiler
cvs diff: Diffing deep_profiler/notes
cvs diff: Diffing doc
cvs diff: Diffing extras
cvs diff: Diffing extras/aditi
cvs diff: Diffing extras/cgi
cvs diff: Diffing extras/complex_numbers
cvs diff: Diffing extras/complex_numbers/samples
cvs diff: Diffing extras/complex_numbers/tests
cvs diff: Diffing extras/concurrency
cvs diff: Diffing extras/curs
cvs diff: Diffing extras/curs/samples
cvs diff: Diffing extras/curses
cvs diff: Diffing extras/curses/sample
cvs diff: Diffing extras/dynamic_linking
cvs diff: Diffing extras/error
cvs diff: Diffing extras/graphics
cvs diff: Diffing extras/graphics/mercury_opengl
cvs diff: Diffing extras/graphics/mercury_tcltk
cvs diff: Diffing extras/graphics/samples
cvs diff: Diffing extras/graphics/samples/calc
cvs diff: Diffing extras/graphics/samples/maze
cvs diff: Diffing extras/graphics/samples/pent
cvs diff: Diffing extras/lazy_evaluation
cvs diff: Diffing extras/lex
cvs diff: Diffing extras/lex/samples
cvs diff: Diffing extras/lex/tests
cvs diff: Diffing extras/logged_output
cvs diff: Diffing extras/moose
cvs diff: Diffing extras/moose/samples
cvs diff: Diffing extras/moose/tests
cvs diff: Diffing extras/morphine
cvs diff: Diffing extras/morphine/non-regression-tests
cvs diff: Diffing extras/morphine/scripts
cvs diff: Diffing extras/morphine/source
cvs diff: Diffing extras/odbc
cvs diff: Diffing extras/posix
cvs diff: Diffing extras/quickcheck
cvs diff: Diffing extras/quickcheck/tutes
cvs diff: Diffing extras/references
cvs diff: Diffing extras/references/samples
cvs diff: Diffing extras/references/tests
cvs diff: Diffing extras/stream
cvs diff: Diffing extras/trailed_update
cvs diff: Diffing extras/trailed_update/samples
cvs diff: Diffing extras/trailed_update/tests
cvs diff: Diffing extras/xml
cvs diff: Diffing extras/xml/samples
cvs diff: Diffing java
cvs diff: Diffing java/library
cvs diff: Diffing java/runtime
cvs diff: Diffing library
cvs diff: Diffing profiler
cvs diff: Diffing robdd
cvs diff: Diffing runtime
cvs diff: Diffing runtime/GETOPT
cvs diff: Diffing runtime/machdeps
cvs diff: Diffing samples
cvs diff: Diffing samples/c_interface
cvs diff: Diffing samples/c_interface/c_calls_mercury
cvs diff: Diffing samples/c_interface/cplusplus_calls_mercury
cvs diff: Diffing samples/c_interface/mercury_calls_c
cvs diff: Diffing samples/c_interface/mercury_calls_cplusplus
cvs diff: Diffing samples/c_interface/mercury_calls_fortran
cvs diff: Diffing samples/c_interface/simpler_c_calls_mercury
cvs diff: Diffing samples/c_interface/simpler_cplusplus_calls_mercury
cvs diff: Diffing samples/diff
cvs diff: Diffing samples/muz
cvs diff: Diffing samples/rot13
cvs diff: Diffing samples/solutions
cvs diff: Diffing samples/tests
cvs diff: Diffing samples/tests/c_interface
cvs diff: Diffing samples/tests/c_interface/c_calls_mercury
cvs diff: Diffing samples/tests/c_interface/cplusplus_calls_mercury
cvs diff: Diffing samples/tests/c_interface/mercury_calls_c
cvs diff: Diffing samples/tests/c_interface/mercury_calls_cplusplus
cvs diff: Diffing samples/tests/c_interface/mercury_calls_fortran
cvs diff: Diffing samples/tests/c_interface/simpler_c_calls_mercury
cvs diff: Diffing samples/tests/c_interface/simpler_cplusplus_calls_mercury
cvs diff: Diffing samples/tests/diff
cvs diff: Diffing samples/tests/muz
cvs diff: Diffing samples/tests/rot13
cvs diff: Diffing samples/tests/solutions
cvs diff: Diffing samples/tests/toplevel
cvs diff: Diffing scripts
cvs diff: Diffing tests
cvs diff: Diffing tests/benchmarks
cvs diff: Diffing tests/debugger
cvs diff: Diffing tests/debugger/declarative
cvs diff: Diffing tests/dppd
cvs diff: Diffing tests/general
cvs diff: Diffing tests/general/accumulator
cvs diff: Diffing tests/general/string_format
cvs diff: Diffing tests/general/structure_reuse
cvs diff: Diffing tests/grade_subdirs
cvs diff: Diffing tests/hard_coded
Index: tests/hard_coded/string_hash.m
===================================================================
RCS file: /home/mercury/mercury1/repository/tests/hard_coded/string_hash.m,v
retrieving revision 1.1
diff -u -b -r1.1 string_hash.m
--- tests/hard_coded/string_hash.m	21 Nov 2002 09:00:28 -0000	1.1
+++ tests/hard_coded/string_hash.m	18 Mar 2004 15:20:23 -0000
@@ -1,4 +1,5 @@
-% Test that string__hash and the MR_hash_string return the same value.
+% Test that string__hash and MR_hash_string return the same value.
+
 :- module string_hash.
 
 :- interface.
@@ -70,9 +71,10 @@
 
 :- func runtime_string_hash(string) = int.
 
-:- pragma foreign_proc("C", runtime_string_hash(String::in) = (Hash::out),
+:- pragma foreign_proc("C",
+	runtime_string_hash(StringArg::in) = (Hash::out),
 		[promise_pure, will_not_call_mercury],
 "
-	Hash = MR_hash_string(String);
+	Hash = MR_hash_string(StringArg);
 ").
 
cvs diff: Diffing tests/hard_coded/exceptions
cvs diff: Diffing tests/hard_coded/purity
cvs diff: Diffing tests/hard_coded/sub-modules
cvs diff: Diffing tests/hard_coded/typeclasses
cvs diff: Diffing tests/invalid
Index: tests/invalid/bigtest.err_exp
===================================================================
RCS file: /home/mercury/mercury1/repository/tests/invalid/bigtest.err_exp,v
retrieving revision 1.8
diff -u -b -r1.8 bigtest.err_exp
--- tests/invalid/bigtest.err_exp	17 Jan 2003 05:57:07 -0000	1.8
+++ tests/invalid/bigtest.err_exp	18 Mar 2004 15:26:54 -0000
@@ -2,7 +2,8 @@
 bigtest.m:006: Syntax error at token ':-': operator precedence error.
 bigtest.m:008: Error: unrecognized declaration: incorrect_declaration.
 bigtest.m:016: Error: type parameters must be variables: t3 = t1 + t2.
-bigtest.m:  1: Warning: interface for module `bigtest' does not export anything.
+bigtest.m:001: Warning: interface for module `bigtest' does not export
+bigtest.m:001:   anything.
 bigtest.m:001: Warning: declaration not yet implemented.
 bigtest.m:002: Warning: declaration not yet implemented.
 bigtest.m:003: Warning: declaration not yet implemented.
Index: tests/invalid/duplicate_modes.err_exp
===================================================================
RCS file: /home/mercury/mercury1/repository/tests/invalid/duplicate_modes.err_exp,v
retrieving revision 1.6
diff -u -b -r1.6 duplicate_modes.err_exp
--- tests/invalid/duplicate_modes.err_exp	18 Jan 2003 06:14:43 -0000	1.6
+++ tests/invalid/duplicate_modes.err_exp	18 Mar 2004 15:27:02 -0000
@@ -1,9 +1,10 @@
-duplicate_modes.m:  1: Warning: interface for module `duplicate_modes' does not export anything.
-		To be useful, a module should export something.
-		A file should contain at least one declaration other than
-		`:- import_module' in its interface section(s).
-		This would normally be a `:- pred', `:- func', `:- type',
-		`:- inst' or `:- mode' declaration.
+duplicate_modes.m:001: Warning: interface for module `duplicate_modes' does not
+duplicate_modes.m:001:   export anything.
+duplicate_modes.m:001: To be useful, a module should export something. A file
+duplicate_modes.m:001:   should contain at least one declaration other than
+duplicate_modes.m:001:   `:- import_module' in its interface section(s). This
+duplicate_modes.m:001:   would normally be a `:- pred', `:- func', `:- type',
+duplicate_modes.m:001:   `:- inst' or `:- mode' declaration.
 duplicate_modes.m:008: In mode declarations for predicate `duplicate_modes.q/2':
 duplicate_modes.m:008:   error: duplicate mode declaration.
 duplicate_modes.m:008:   Modes `q(in, out) is det'
Index: tests/invalid/errors.err_exp
===================================================================
RCS file: /home/mercury/mercury1/repository/tests/invalid/errors.err_exp,v
retrieving revision 1.8
diff -u -b -r1.8 errors.err_exp
--- tests/invalid/errors.err_exp	17 Jan 2003 05:57:08 -0000	1.8
+++ tests/invalid/errors.err_exp	18 Mar 2004 15:27:04 -0000
@@ -1,7 +1,7 @@
 errors.m:010: Warning: module should start with a `:- module' declaration.
 errors.m:060: Error: free type parameter in RHS of type definition: f(_1).
 errors.m:061: Error: free type parameter in RHS of type definition: f(_1).
-errors.m:  1: Warning: interface for module `errors' does not export anything.
+errors.m:001: Warning: interface for module `errors' does not export anything.
 errors.m:001: Warning: module `int' is imported using both
 errors.m:001:   `:- import_module' and `:- use_module' declarations.
 errors.m:051: In definition of type `errors.du_type_which_references_undefined_type'/0:
Index: tests/invalid/errors1.err_exp
===================================================================
RCS file: /home/mercury/mercury1/repository/tests/invalid/errors1.err_exp,v
retrieving revision 1.5
diff -u -b -r1.5 errors1.err_exp
--- tests/invalid/errors1.err_exp	17 Jan 2003 05:57:08 -0000	1.5
+++ tests/invalid/errors1.err_exp	18 Mar 2004 15:27:05 -0000
@@ -1,4 +1,5 @@
-errors1.m:  1: Warning: interface for module `errors1' does not export anything.
+errors1.m:001: Warning: interface for module `errors1' does not export
+errors1.m:001:   anything.
 errors1.m:051: In definition of type `errors1.du_type_which_references_undefined_type'/0:
 errors1.m:051:   error: undefined type `undefined_type'/0.
 errors1.m:053: In definition of type `errors1.eqv_type_which_references_undefined_type'/0:
Index: tests/invalid/errors2.err_exp2
===================================================================
RCS file: /home/mercury/mercury1/repository/tests/invalid/errors2.err_exp2,v
retrieving revision 1.6
diff -u -b -r1.6 errors2.err_exp2
--- tests/invalid/errors2.err_exp2	17 Jan 2003 05:57:08 -0000	1.6
+++ tests/invalid/errors2.err_exp2	18 Mar 2004 16:30:58 -0000
@@ -1,4 +1,5 @@
-errors2.m:  1: Warning: interface for module `errors2' does not export anything.
+errors2.m:001: Warning: interface for module `errors2' does not export
+errors2.m:001:   anything.
 errors2.m:009: Error: clause for predicate `errors2.bind_type_param/1'
 errors2.m:009:   without preceding `pred' declaration.
 errors2.m:052: In clause for predicate `errors2.type_error_4/0':
Index: tests/invalid/funcs_as_preds.err_exp
===================================================================
RCS file: /home/mercury/mercury1/repository/tests/invalid/funcs_as_preds.err_exp,v
retrieving revision 1.8
diff -u -b -r1.8 funcs_as_preds.err_exp
--- tests/invalid/funcs_as_preds.err_exp	17 Jan 2003 05:57:08 -0000	1.8
+++ tests/invalid/funcs_as_preds.err_exp	18 Mar 2004 15:27:09 -0000
@@ -1,4 +1,5 @@
-funcs_as_preds.m:  1: Warning: interface for module `funcs_as_preds' does not export anything.
+funcs_as_preds.m:001: Warning: interface for module `funcs_as_preds' does not
+funcs_as_preds.m:001:   export anything.
 funcs_as_preds.m:017: Error: clause for function `funcs_as_preds.null/1'
 funcs_as_preds.m:017:   without preceding `func' declaration.
 funcs_as_preds.m:021: Error: clause for function `funcs_as_preds.car/1'
Index: tests/invalid/inst_list_dup.err_exp
===================================================================
RCS file: /home/mercury/mercury1/repository/tests/invalid/inst_list_dup.err_exp,v
retrieving revision 1.3
diff -u -b -r1.3 inst_list_dup.err_exp
--- tests/invalid/inst_list_dup.err_exp	8 Nov 2001 15:30:39 -0000	1.3
+++ tests/invalid/inst_list_dup.err_exp	18 Mar 2004 15:27:14 -0000
@@ -1,3 +1,4 @@
 inst_list_dup.m:003: Error: syntax error in inst body: bound(ground - unique ; ground - ground).
-inst_list_dup.m:  1: Warning: interface for module `inst_list_dup' does not export anything.
+inst_list_dup.m:001: Warning: interface for module `inst_list_dup' does not
+inst_list_dup.m:001:   export anything.
 For more information, try recompiling with `-E'.
Index: tests/invalid/modes_erroneous.err_exp
===================================================================
RCS file: /home/mercury/mercury1/repository/tests/invalid/modes_erroneous.err_exp,v
retrieving revision 1.3
diff -u -b -r1.3 modes_erroneous.err_exp
--- tests/invalid/modes_erroneous.err_exp	17 Jan 2003 05:57:09 -0000	1.3
+++ tests/invalid/modes_erroneous.err_exp	18 Mar 2004 15:27:20 -0000
@@ -1,4 +1,5 @@
-modes_erroneous.m:  1: Warning: interface for module `modes_erroneous' does not export anything.
+modes_erroneous.m:001: Warning: interface for module `modes_erroneous' does not
+modes_erroneous.m:001:   export anything.
 modes_erroneous.m:009: In clause for `p((ground -> ground), (free -> ground))':
 modes_erroneous.m:009:   in argument 1 of call to predicate `modes_erroneous.p/2':
 modes_erroneous.m:009:   mode error: variable `V_5' has instantiatedness `free',
Index: tests/invalid/no_exports.err_exp
===================================================================
RCS file: /home/mercury/mercury1/repository/tests/invalid/no_exports.err_exp,v
retrieving revision 1.2
diff -u -b -r1.2 no_exports.err_exp
--- tests/invalid/no_exports.err_exp	28 Oct 1998 06:15:21 -0000	1.2
+++ tests/invalid/no_exports.err_exp	18 Mar 2004 15:27:26 -0000
@@ -1,2 +1,3 @@
-no_exports.m:  1: Warning: interface for module `no_exports' does not export anything.
+no_exports.m:001: Warning: interface for module `no_exports' does not export
+no_exports.m:001:   anything.
 For more information, try recompiling with `-E'.
Index: tests/invalid/occurs.err_exp
===================================================================
RCS file: /home/mercury/mercury1/repository/tests/invalid/occurs.err_exp,v
retrieving revision 1.5
diff -u -b -r1.5 occurs.err_exp
--- tests/invalid/occurs.err_exp	17 Jan 2003 05:57:09 -0000	1.5
+++ tests/invalid/occurs.err_exp	18 Mar 2004 15:27:28 -0000
@@ -1,4 +1,4 @@
-occurs.m:  1: Warning: interface for module `occurs' does not export anything.
+occurs.m:001: Warning: interface for module `occurs' does not export anything.
 occurs.m:008: In clause for predicate `occurs.p/0':
 occurs.m:008:   warning: variable `X' occurs only once in this scope.
 occurs.m:008: In clause for `p':
Index: tests/invalid/predmode.err_exp
===================================================================
RCS file: /home/mercury/mercury1/repository/tests/invalid/predmode.err_exp,v
retrieving revision 1.5
diff -u -b -r1.5 predmode.err_exp
--- tests/invalid/predmode.err_exp	8 Nov 2001 15:30:40 -0000	1.5
+++ tests/invalid/predmode.err_exp	18 Mar 2004 15:27:31 -0000
@@ -1,3 +1,4 @@
 predmode.m:005: Error: some but not all arguments have modes: p(int :: in, int).
-predmode.m:  1: Warning: interface for module `predmode' does not export anything.
+predmode.m:001: Warning: interface for module `predmode' does not export
+predmode.m:001:   anything.
 For more information, try recompiling with `-E'.
Index: tests/invalid/prog_io_erroneous.err_exp2
===================================================================
RCS file: /home/mercury/mercury1/repository/tests/invalid/prog_io_erroneous.err_exp2,v
retrieving revision 1.5
diff -u -b -r1.5 prog_io_erroneous.err_exp2
--- tests/invalid/prog_io_erroneous.err_exp2	17 Jan 2003 05:57:09 -0000	1.5
+++ tests/invalid/prog_io_erroneous.err_exp2	18 Mar 2004 15:27:32 -0000
@@ -1,4 +1,5 @@
-prog_io_erroneous.m:  1: Warning: interface for module `prog_io_erroneous' does not export anything.
+prog_io_erroneous.m:001: Warning: interface for module `prog_io_erroneous' does
+prog_io_erroneous.m:001:   not export anything.
 prog_io_erroneous.m:012: Error: no clauses for
 prog_io_erroneous.m:012:   predicate `prog_io_erroneous.q/2'.
 For more information, try recompiling with `-E'.
Index: tests/invalid/type_inf_loop.err_exp2
===================================================================
RCS file: /home/mercury/mercury1/repository/tests/invalid/type_inf_loop.err_exp2,v
retrieving revision 1.3
diff -u -b -r1.3 type_inf_loop.err_exp2
--- tests/invalid/type_inf_loop.err_exp2	17 Jan 2003 05:57:10 -0000	1.3
+++ tests/invalid/type_inf_loop.err_exp2	18 Mar 2004 15:27:38 -0000
@@ -1,4 +1,5 @@
-type_inf_loop.m:  1: Warning: interface for module `type_inf_loop' does not export anything.
+type_inf_loop.m:001: Warning: interface for module `type_inf_loop' does not
+type_inf_loop.m:001:   export anything.
 type_inf_loop.m:004: Error: clause for predicate `type_inf_loop.loop/1'
 type_inf_loop.m:004:   without preceding `pred' declaration.
 Type inference iteration limit exceeded.
Index: tests/invalid/typeclass_missing_det_3.err_exp
===================================================================
RCS file: /home/mercury/mercury1/repository/tests/invalid/typeclass_missing_det_3.err_exp,v
retrieving revision 1.2
diff -u -b -r1.2 typeclass_missing_det_3.err_exp
--- tests/invalid/typeclass_missing_det_3.err_exp	17 Jan 2003 05:57:10 -0000	1.2
+++ tests/invalid/typeclass_missing_det_3.err_exp	18 Mar 2004 15:27:43 -0000
@@ -1,4 +1,6 @@
-typeclass_missing_det_3.m:  1: Warning: interface for module `typeclass_missing_det_3' does not export anything.
+typeclass_missing_det_3.m:001: Warning: interface for module
+typeclass_missing_det_3.m:001:   `typeclass_missing_det_3' does not export
+typeclass_missing_det_3.m:001:   anything.
 typeclass_missing_det_3.m:013: Error: no determinism declaration for type class method
 typeclass_missing_det_3.m:013:   predicate `typeclass_missing_det_3.write/3'.
 For more information, try recompiling with `-E'.
Index: tests/invalid/types.err_exp2
===================================================================
RCS file: /home/mercury/mercury1/repository/tests/invalid/types.err_exp2,v
retrieving revision 1.6
diff -u -b -r1.6 types.err_exp2
--- tests/invalid/types.err_exp2	17 Jan 2003 05:57:10 -0000	1.6
+++ tests/invalid/types.err_exp2	18 Mar 2004 15:27:48 -0000
@@ -1,4 +1,4 @@
-types.m:  1: Warning: interface for module `types' does not export anything.
+types.m:001: Warning: interface for module `types' does not export anything.
 types.m:003: Error: constructor `types.a/0' for type `types.t/0' multiply defined.
 types.m:003: Error: constructor `types.f/1' for type `types.t/0' multiply defined.
 types.m:017: Error: clause for predicate `types.r/0'
Index: tests/invalid/undef_inst.err_exp
===================================================================
RCS file: /home/mercury/mercury1/repository/tests/invalid/undef_inst.err_exp,v
retrieving revision 1.3
diff -u -b -r1.3 undef_inst.err_exp
--- tests/invalid/undef_inst.err_exp	17 Jan 2003 05:57:10 -0000	1.3
+++ tests/invalid/undef_inst.err_exp	18 Mar 2004 15:27:50 -0000
@@ -1,4 +1,5 @@
-undef_inst.m:  1: Warning: interface for module `undef_inst' does not export anything.
+undef_inst.m:001: Warning: interface for module `undef_inst' does not export
+undef_inst.m:001:   anything.
 undef_inst.m:004: In mode declaration for predicate `undef_inst.x'/1:
 undef_inst.m:004:   error: undefined inst `foo'/0.
 undef_inst.m:004: In mode declaration for predicate `undef_inst.x'/1:
Index: tests/invalid/undef_mode.err_exp
===================================================================
RCS file: /home/mercury/mercury1/repository/tests/invalid/undef_mode.err_exp,v
retrieving revision 1.3
diff -u -b -r1.3 undef_mode.err_exp
--- tests/invalid/undef_mode.err_exp	17 Jan 2003 05:57:10 -0000	1.3
+++ tests/invalid/undef_mode.err_exp	18 Mar 2004 15:27:50 -0000
@@ -1,4 +1,5 @@
-undef_mode.m:  1: Warning: interface for module `undef_mode' does not export anything.
+undef_mode.m:001: Warning: interface for module `undef_mode' does not export
+undef_mode.m:001:   anything.
 undef_mode.m:004: In mode declaration for predicate `undef_mode.x'/1:
 undef_mode.m:004:   error: undefined mode `foo'/0.
 For more information, try recompiling with `-E'.
Index: tests/invalid/undef_type.err_exp
===================================================================
RCS file: /home/mercury/mercury1/repository/tests/invalid/undef_type.err_exp,v
retrieving revision 1.6
diff -u -b -r1.6 undef_type.err_exp
--- tests/invalid/undef_type.err_exp	17 Jan 2003 05:57:10 -0000	1.6
+++ tests/invalid/undef_type.err_exp	18 Mar 2004 15:27:52 -0000
@@ -1,4 +1,5 @@
-undef_type.m:  1: Warning: interface for module `undef_type' does not export anything.
+undef_type.m:001: Warning: interface for module `undef_type' does not export
+undef_type.m:001:   anything.
 undef_type.m:003: In definition of type `undef_type.t1'/0:
 undef_type.m:003:   error: undefined type `undef1'/0.
 undef_type.m:010: In definition of predicate `undef_type.q'/1:
Index: tests/invalid/vars_in_wrong_places.err_exp
===================================================================
RCS file: /home/mercury/mercury1/repository/tests/invalid/vars_in_wrong_places.err_exp,v
retrieving revision 1.4
diff -u -b -r1.4 vars_in_wrong_places.err_exp
--- tests/invalid/vars_in_wrong_places.err_exp	15 Mar 2002 07:32:22 -0000	1.4
+++ tests/invalid/vars_in_wrong_places.err_exp	18 Mar 2004 15:27:54 -0000
@@ -5,5 +5,6 @@
 vars_in_wrong_places.m:006: Error: atom expected in `:- func' declaration: _1 = int.
 Error: atom expected in `:- mode' declaration: _1.
 vars_in_wrong_places.m:008: Error: atom expected in function `:- mode' declaration: _1 = int.
-vars_in_wrong_places.m:  1: Warning: interface for module `vars_in_wrong_places' does not export anything.
+vars_in_wrong_places.m:001: Warning: interface for module
+vars_in_wrong_places.m:001:   `vars_in_wrong_places' does not export anything.
 For more information, try recompiling with `-E'.
cvs diff: Diffing tests/invalid/purity
cvs diff: Diffing tests/misc_tests
cvs diff: Diffing tests/mmc_make
cvs diff: Diffing tests/mmc_make/lib
cvs diff: Diffing tests/recompilation
cvs diff: Diffing tests/tabling
cvs diff: Diffing tests/term
cvs diff: Diffing tests/valid
cvs diff: Diffing tests/warnings
cvs diff: Diffing tools
cvs diff: Diffing trace
cvs diff: Diffing util
cvs diff: Diffing vim
cvs diff: Diffing vim/after
cvs diff: Diffing vim/ftplugin
cvs diff: Diffing vim/syntax
--------------------------------------------------------------------------
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