[m-rev.] diff: error.m additions

Zoltan Somogyi zs at csse.unimelb.edu.au
Wed Dec 15 12:59:24 AEDT 2010


The concept has been reviewed by Julien, and the implementation is
straightforward.

Zoltan.

Add the predicates sorry, unexpected and expect to library/error.m.

compiler/compiler_util.m:
library/error.m:
	Move the predicates sorry, unexpected and expect from compiler_util
	to error.

	Put the predicates in error.m into the same order as their
	declarations.

compiler/*.m:
	Change imports as needed.

compiler/lp.m:
compiler/lp_rational.m:
	Change imports as needed, and some minor cleanups.

deep_profiler/*.m:
	Switch to using the new library predicates, instead of calling error
	directly. Some other minor cleanups.

NEWS:
	Mention the new predicates in the standard library.

cvs diff: Diffing .
Index: NEWS
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/NEWS,v
retrieving revision 1.550
diff -u -b -r1.550 NEWS
--- NEWS	13 Dec 2010 04:40:33 -0000	1.550
+++ NEWS	15 Dec 2010 01:42:35 -0000
@@ -82,6 +82,12 @@
 * We have added the predicate unsorted_aggregate2/6 to the solutions module
   of the standard library.
 
+* We have added several predicates and functions to the error module
+  of the standard library. The predicates sorry/2 and sorry/3 report
+  the absence of a feature, while the predicates unexpected/2 and unexpected/3
+  report an internal error in the program; all have function versions too.
+  The predicate expect/3 calls unexpected if a condition isn't satisfied.
+
 Changes to the Mercury compiler:
 
 * We have added a new backend that generates C#.
cvs diff: Diffing analysis
cvs diff: Diffing bindist
cvs diff: Diffing boehm_gc
cvs diff: Diffing boehm_gc/Mac_files
cvs diff: Diffing boehm_gc/cord
cvs diff: Diffing boehm_gc/cord/private
cvs diff: Diffing boehm_gc/doc
cvs diff: Diffing boehm_gc/extra
cvs diff: Diffing boehm_gc/include
cvs diff: Diffing boehm_gc/include/extra
cvs diff: Diffing boehm_gc/include/private
cvs diff: Diffing boehm_gc/libatomic_ops
cvs diff: Diffing boehm_gc/libatomic_ops/doc
cvs diff: Diffing boehm_gc/libatomic_ops/src
cvs diff: Diffing boehm_gc/libatomic_ops/src/atomic_ops
cvs diff: Diffing boehm_gc/libatomic_ops/src/atomic_ops/sysdeps
cvs diff: Diffing boehm_gc/libatomic_ops/src/atomic_ops/sysdeps/armcc
cvs diff: Diffing boehm_gc/libatomic_ops/src/atomic_ops/sysdeps/gcc
cvs diff: Diffing boehm_gc/libatomic_ops/src/atomic_ops/sysdeps/hpc
cvs diff: Diffing boehm_gc/libatomic_ops/src/atomic_ops/sysdeps/ibmc
cvs diff: Diffing boehm_gc/libatomic_ops/src/atomic_ops/sysdeps/icc
cvs diff: Diffing boehm_gc/libatomic_ops/src/atomic_ops/sysdeps/msftc
cvs diff: Diffing boehm_gc/libatomic_ops/src/atomic_ops/sysdeps/sunc
cvs diff: Diffing boehm_gc/libatomic_ops/tests
cvs diff: Diffing boehm_gc/libatomic_ops-1.2
cvs diff: Diffing boehm_gc/libatomic_ops-1.2/doc
cvs diff: Diffing boehm_gc/libatomic_ops-1.2/src
cvs diff: Diffing boehm_gc/libatomic_ops-1.2/src/atomic_ops
cvs diff: Diffing boehm_gc/libatomic_ops-1.2/src/atomic_ops/sysdeps
cvs diff: Diffing boehm_gc/libatomic_ops-1.2/tests
cvs diff: Diffing boehm_gc/m4
cvs diff: Diffing boehm_gc/tests
cvs diff: Diffing browser
cvs diff: Diffing bytecode
cvs diff: Diffing compiler
Index: compiler/accumulator.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/accumulator.m,v
retrieving revision 1.80
diff -u -b -r1.80 accumulator.m
--- compiler/accumulator.m	15 Sep 2010 04:35:25 -0000	1.80
+++ compiler/accumulator.m	14 Dec 2010 11:28:03 -0000
@@ -174,7 +174,6 @@
 :- import_module hlds.instmap.
 :- import_module hlds.pred_table.
 :- import_module hlds.quantification.
-:- import_module libs.compiler_util.
 :- import_module libs.globals.
 :- import_module libs.options.
 :- import_module mdbcomp.prim_data.
@@ -192,6 +191,7 @@
 :- import_module map.
 :- import_module maybe.
 :- import_module pair.
+:- import_module require.
 :- import_module set.
 :- import_module solutions.
 :- import_module string.
Index: compiler/add_class.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/add_class.m,v
retrieving revision 1.33
diff -u -b -r1.33 add_class.m
--- compiler/add_class.m	12 Jan 2010 03:12:36 -0000	1.33
+++ compiler/add_class.m	14 Dec 2010 11:28:03 -0000
@@ -60,7 +60,6 @@
 :- import_module hlds.make_hlds.make_hlds_warn.
 :- import_module hlds.make_hlds.state_var.
 :- import_module hlds.pred_table.
-:- import_module libs.compiler_util.
 :- import_module parse_tree.prog_type.
 :- import_module parse_tree.prog_type_subst.
 :- import_module parse_tree.prog_util.
@@ -69,6 +68,7 @@
 :- import_module int.
 :- import_module map.
 :- import_module pair.
+:- import_module require.
 :- import_module set.
 :- import_module solutions.
 :- import_module string.
Index: compiler/add_clause.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/add_clause.m,v
retrieving revision 1.60
diff -u -b -r1.60 add_clause.m
--- compiler/add_clause.m	4 Nov 2009 03:44:46 -0000	1.60
+++ compiler/add_clause.m	14 Dec 2010 11:28:03 -0000
@@ -72,7 +72,6 @@
 :- import_module hlds.make_hlds.make_hlds_warn.
 :- import_module hlds.make_hlds.superhomogeneous.
 :- import_module hlds.pred_table.
-:- import_module libs.compiler_util.
 :- import_module libs.globals.
 :- import_module libs.options.
 :- import_module parse_tree.mercury_to_mercury.
@@ -89,6 +88,7 @@
 :- import_module io.
 :- import_module map.
 :- import_module pair.
+:- import_module require.
 :- import_module set.
 :- import_module string.
 :- import_module varset.
Index: compiler/add_heap_ops.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/add_heap_ops.m,v
retrieving revision 1.44
diff -u -b -r1.44 add_heap_ops.m
--- compiler/add_heap_ops.m	14 Sep 2010 02:22:52 -0000	1.44
+++ compiler/add_heap_ops.m	14 Dec 2010 11:28:03 -0000
@@ -48,7 +48,6 @@
 :- import_module hlds.instmap.
 :- import_module hlds.pred_table.
 :- import_module hlds.quantification.
-:- import_module libs.compiler_util.
 :- import_module mdbcomp.prim_data.
 :- import_module parse_tree.builtin_lib_types.
 :- import_module parse_tree.prog_data.
@@ -60,6 +59,7 @@
 :- import_module map.
 :- import_module maybe.
 :- import_module pair.
+:- import_module require.
 :- import_module term.
 :- import_module varset.
 
Index: compiler/add_mode.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/add_mode.m,v
retrieving revision 1.15
diff -u -b -r1.15 add_mode.m
--- compiler/add_mode.m	28 Jul 2008 08:34:16 -0000	1.15
+++ compiler/add_mode.m	14 Dec 2010 11:28:03 -0000
@@ -38,10 +38,10 @@
 :- import_module hlds.hlds_data.
 :- import_module hlds.hlds_pred.
 :- import_module hlds.make_hlds.make_hlds_error.
-:- import_module libs.compiler_util.
 :- import_module parse_tree.prog_mode.
 
 :- import_module map.
+:- import_module require.
 
 %----------------------------------------------------------------------------%
 
Index: compiler/add_pragma.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/add_pragma.m,v
retrieving revision 1.106
diff -u -b -r1.106 add_pragma.m
--- compiler/add_pragma.m	16 Sep 2010 00:39:02 -0000	1.106
+++ compiler/add_pragma.m	14 Dec 2010 11:28:03 -0000
@@ -141,7 +141,6 @@
 :- import_module hlds.make_tags.
 :- import_module hlds.pred_table.
 :- import_module hlds.quantification.
-:- import_module libs.compiler_util.
 :- import_module libs.globals.
 :- import_module libs.options.
 :- import_module ll_backend.
@@ -175,6 +174,7 @@
 :- import_module map.
 :- import_module multi_map.
 :- import_module pair.
+:- import_module require.
 :- import_module set.
 :- import_module string.
 :- import_module svmap.
Index: compiler/add_pred.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/add_pred.m,v
retrieving revision 1.42
diff -u -b -r1.42 add_pred.m
--- compiler/add_pred.m	1 Nov 2010 05:08:41 -0000	1.42
+++ compiler/add_pred.m	14 Dec 2010 11:28:03 -0000
@@ -79,7 +79,6 @@
 :- import_module hlds.hlds_pred.
 :- import_module hlds.hlds_rtti.
 :- import_module hlds.make_hlds.make_hlds_error.
-:- import_module libs.compiler_util.
 :- import_module libs.globals.
 :- import_module libs.options.
 :- import_module parse_tree.builtin_lib_types.
@@ -90,6 +89,7 @@
 
 :- import_module map.
 :- import_module set.
+:- import_module require.
 :- import_module term.
 :- import_module varset.
 
Index: compiler/add_special_pred.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/add_special_pred.m,v
retrieving revision 1.29
diff -u -b -r1.29 add_special_pred.m
--- compiler/add_special_pred.m	15 Sep 2010 04:35:25 -0000	1.29
+++ compiler/add_special_pred.m	14 Dec 2010 11:28:04 -0000
@@ -70,7 +70,6 @@
 :- import_module hlds.make_hlds.add_pred.
 :- import_module hlds.pred_table.
 :- import_module hlds.special_pred.
-:- import_module libs.compiler_util.
 :- import_module libs.globals.
 :- import_module libs.options.
 :- import_module parse_tree.prog_type.
@@ -80,6 +79,7 @@
 :- import_module list.
 :- import_module map.
 :- import_module pair.
+:- import_module require.
 :- import_module string.
 :- import_module varset.
 
Index: compiler/add_trail_ops.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/add_trail_ops.m,v
retrieving revision 1.55
diff -u -b -r1.55 add_trail_ops.m
--- compiler/add_trail_ops.m	10 Sep 2010 05:14:57 -0000	1.55
+++ compiler/add_trail_ops.m	14 Dec 2010 11:28:04 -0000
@@ -75,7 +75,6 @@
 :- import_module hlds.instmap.
 :- import_module hlds.pred_table.
 :- import_module hlds.quantification.
-:- import_module libs.compiler_util.
 :- import_module libs.globals.
 :- import_module mdbcomp.prim_data.
 :- import_module parse_tree.builtin_lib_types.
@@ -88,6 +87,7 @@
 :- import_module map.
 :- import_module maybe.
 :- import_module pair.
+:- import_module require.
 :- import_module term.
 :- import_module varset.
 
Index: compiler/add_type.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/add_type.m,v
retrieving revision 1.38
diff -u -b -r1.38 add_type.m
--- compiler/add_type.m	16 Sep 2010 00:39:02 -0000	1.38
+++ compiler/add_type.m	14 Dec 2010 11:28:04 -0000
@@ -64,7 +64,6 @@
 :- import_module hlds.hlds_out.
 :- import_module hlds.hlds_out.hlds_out_goal.
 :- import_module hlds.hlds_out.hlds_out_util.
-:- import_module libs.compiler_util.
 :- import_module libs.globals.
 :- import_module libs.options.
 :- import_module parse_tree.module_qual.
@@ -75,6 +74,7 @@
 :- import_module map.
 :- import_module multi_map.
 :- import_module pair.
+:- import_module require.
 :- import_module string.
 :- import_module svmap.
 :- import_module svmulti_map.
Index: compiler/analysis.file.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/analysis.file.m,v
retrieving revision 1.13
diff -u -b -r1.13 analysis.file.m
--- compiler/analysis.file.m	14 Oct 2009 05:28:31 -0000	1.13
+++ compiler/analysis.file.m	14 Dec 2010 11:28:04 -0000
@@ -101,26 +101,26 @@
 
 :- implementation.
 
+:- import_module libs.globals.
+:- import_module libs.options.
+:- import_module libs.pickle.
+:- import_module parse_tree.
+:- import_module parse_tree.module_cmds.        % XXX unwanted dependency
+:- import_module parse_tree.prog_io_sym_name.
+:- import_module parse_tree.prog_out.
+
 :- import_module bool.
 :- import_module char.
 :- import_module dir.
 :- import_module exception.
 :- import_module parser.
+:- import_module require.
 :- import_module term.
 :- import_module term_io.
 :- import_module type_desc.
 :- import_module univ.
 :- import_module varset.
 
-:- import_module libs.compiler_util.
-:- import_module libs.globals.
-:- import_module libs.options.
-:- import_module libs.pickle.
-:- import_module parse_tree.
-:- import_module parse_tree.module_cmds.        % XXX unwanted dependency
-:- import_module parse_tree.prog_io_sym_name.
-:- import_module parse_tree.prog_out.
-
 %-----------------------------------------------------------------------------%
 
 % The format of an analysis result file is:
Index: compiler/analysis.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/analysis.m,v
retrieving revision 1.10
diff -u -b -r1.10 analysis.m
--- compiler/analysis.m	14 Oct 2009 05:28:31 -0000	1.10
+++ compiler/analysis.m	14 Dec 2010 11:28:04 -0000
@@ -319,11 +319,11 @@
 
 :- import_module analysis.file.
 :- import_module libs.
-:- import_module libs.compiler_util.
 :- import_module parse_tree.                % XXX unwanted dependency
 :- import_module parse_tree.module_cmds.    % XXX unwanted dependency
 
 :- import_module map.
+:- import_module require.
 :- import_module string.
 :- import_module type_desc.
 :- import_module univ.
Index: compiler/arg_info.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/arg_info.m,v
retrieving revision 1.59
diff -u -b -r1.59 arg_info.m
--- compiler/arg_info.m	30 Jul 2010 05:16:07 -0000	1.59
+++ compiler/arg_info.m	14 Dec 2010 11:28:04 -0000
@@ -114,10 +114,10 @@
 :- implementation.
 
 :- import_module check_hlds.mode_util.
-:- import_module libs.compiler_util.
 
 :- import_module map.
 :- import_module pair.
+:- import_module require.
 :- import_module int.
 :- import_module svset.
 
Index: compiler/assertion.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/assertion.m,v
retrieving revision 1.67
diff -u -b -r1.67 assertion.m
--- compiler/assertion.m	19 Aug 2009 07:44:52 -0000	1.67
+++ compiler/assertion.m	14 Dec 2010 11:28:04 -0000
@@ -134,7 +134,6 @@
 
 :- import_module hlds.goal_util.
 :- import_module hlds.hlds_clauses.
-:- import_module libs.compiler_util.
 :- import_module mdbcomp.
 :- import_module mdbcomp.prim_data.
 
@@ -142,6 +141,7 @@
 :- import_module list.
 :- import_module map.
 :- import_module maybe.
+:- import_module require.
 :- import_module set.
 :- import_module solutions.
 
Index: compiler/atsort.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/atsort.m,v
retrieving revision 1.20
diff -u -b -r1.20 atsort.m
--- compiler/atsort.m	1 Dec 2006 15:03:49 -0000	1.20
+++ compiler/atsort.m	14 Dec 2010 11:28:04 -0000
@@ -47,7 +47,7 @@
 
 :- implementation.
 
-:- import_module libs.compiler_util.
+:- import_module require.
 
 % :- pred main1(list(list(int))).
 % :- mode main1(out) is det.
Index: compiler/base_typeclass_info.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/base_typeclass_info.m,v
retrieving revision 1.51
diff -u -b -r1.51 base_typeclass_info.m
--- compiler/base_typeclass_info.m	13 Aug 2007 03:01:37 -0000	1.51
+++ compiler/base_typeclass_info.m	14 Dec 2010 11:28:04 -0000
@@ -45,8 +45,6 @@
 :- import_module hlds.hlds_data.
 :- import_module hlds.hlds_pred.
 :- import_module hlds.hlds_rtti.
-:- import_module libs.
-:- import_module libs.compiler_util.
 :- import_module mdbcomp.
 :- import_module mdbcomp.prim_data.
 :- import_module parse_tree.
@@ -59,6 +57,7 @@
 :- import_module map.
 :- import_module maybe.
 :- import_module pair.
+:- import_module require.
 :- import_module string.
 :- import_module term.
 
Index: compiler/basic_block.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/basic_block.m,v
retrieving revision 1.34
diff -u -b -r1.34 basic_block.m
--- compiler/basic_block.m	23 Nov 2007 07:34:54 -0000	1.34
+++ compiler/basic_block.m	14 Dec 2010 11:28:04 -0000
@@ -99,10 +99,10 @@
 
 :- implementation.
 
-:- import_module libs.compiler_util.
 :- import_module ll_backend.opt_util.
 
 :- import_module pair.
+:- import_module require.
 :- import_module svmap.
 :- import_module svset.
 
Index: compiler/build_mode_constraints.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/build_mode_constraints.m,v
retrieving revision 1.36
diff -u -b -r1.36 build_mode_constraints.m
--- compiler/build_mode_constraints.m	19 Aug 2009 07:44:52 -0000	1.36
+++ compiler/build_mode_constraints.m	14 Dec 2010 11:28:04 -0000
@@ -201,8 +201,6 @@
 :- import_module hlds.hlds_args.
 :- import_module hlds.hlds_clauses.
 :- import_module hlds.hlds_desc.
-:- import_module libs.
-:- import_module libs.compiler_util.
 
 :- import_module bool.
 :- import_module cord.
@@ -211,6 +209,7 @@
 :- import_module maybe.
 :- import_module multi_map.
 :- import_module pair.
+:- import_module require.
 :- import_module string.
 :- import_module svbimap.
 :- import_module svmulti_map.
Index: compiler/bytecode.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/bytecode.m,v
retrieving revision 1.77
diff -u -b -r1.77 bytecode.m
--- compiler/bytecode.m	12 Nov 2010 02:21:57 -0000	1.77
+++ compiler/bytecode.m	14 Dec 2010 11:28:04 -0000
@@ -152,10 +152,9 @@
 
 :- import_module backend_libs.bytecode_data.
 :- import_module backend_libs.c_util.
-:- import_module libs.
-:- import_module libs.compiler_util.
 
 :- import_module assoc_list.
+:- import_module require.
 :- import_module string.
 
 %---------------------------------------------------------------------------%
Index: compiler/bytecode_data.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/bytecode_data.m,v
retrieving revision 1.25
diff -u -b -r1.25 bytecode_data.m
--- compiler/bytecode_data.m	3 Sep 2009 23:57:23 -0000	1.25
+++ compiler/bytecode_data.m	14 Dec 2010 11:28:04 -0000
@@ -62,11 +62,9 @@
 
 :- implementation.
 
-:- import_module libs.
-:- import_module libs.compiler_util.
-
 :- import_module char.
 :- import_module int.
+:- import_module require.
 :- import_module string.
 
 %-----------------------------------------------------------------------------%
Index: compiler/bytecode_gen.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/bytecode_gen.m,v
retrieving revision 1.123
diff -u -b -r1.123 bytecode_gen.m
--- compiler/bytecode_gen.m	30 Jul 2010 05:16:08 -0000	1.123
+++ compiler/bytecode_gen.m	14 Dec 2010 11:28:04 -0000
@@ -57,8 +57,6 @@
 :- import_module hlds.hlds_goal.
 :- import_module hlds.hlds_pred.
 :- import_module hlds.passes_aux.
-:- import_module libs.
-:- import_module libs.compiler_util.
 :- import_module ll_backend.
 :- import_module ll_backend.call_gen.  % XXX for arg passing convention
 :- import_module mdbcomp.
@@ -75,6 +73,7 @@
 :- import_module list.
 :- import_module map.
 :- import_module pair.
+:- import_module require.
 :- import_module set.
 :- import_module string.
 :- import_module term.
Index: compiler/call_gen.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/call_gen.m,v
retrieving revision 1.196
diff -u -b -r1.196 call_gen.m
--- compiler/call_gen.m	6 Jan 2009 03:56:24 -0000	1.196
+++ compiler/call_gen.m	14 Dec 2010 11:28:04 -0000
@@ -68,7 +68,6 @@
 :- import_module hlds.hlds_llds.
 :- import_module hlds.hlds_module.
 :- import_module hlds.instmap.
-:- import_module libs.compiler_util.
 :- import_module libs.options.
 :- import_module ll_backend.code_util.
 :- import_module ll_backend.continuation_info.
@@ -80,6 +79,7 @@
 :- import_module int.
 :- import_module maybe.
 :- import_module pair.
+:- import_module require.
 :- import_module set.
 :- import_module string.
 
Index: compiler/check_typeclass.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/check_typeclass.m,v
retrieving revision 1.129
diff -u -b -r1.129 check_typeclass.m
--- compiler/check_typeclass.m	15 Sep 2010 04:35:25 -0000	1.129
+++ compiler/check_typeclass.m	14 Dec 2010 11:28:04 -0000
@@ -112,7 +112,6 @@
 :- import_module hlds.passes_aux.
 :- import_module hlds.pred_table.
 :- import_module libs.
-:- import_module libs.compiler_util.
 :- import_module libs.file_util.
 :- import_module libs.globals.
 :- import_module libs.options.
@@ -131,6 +130,7 @@
 :- import_module maybe.
 :- import_module multi_map.
 :- import_module pair.
+:- import_module require.
 :- import_module set.
 :- import_module solutions.
 :- import_module string.
Index: compiler/clause_to_proc.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/clause_to_proc.m,v
retrieving revision 1.85
diff -u -b -r1.85 clause_to_proc.m
--- compiler/clause_to_proc.m	15 Sep 2010 04:35:26 -0000	1.85
+++ compiler/clause_to_proc.m	14 Dec 2010 11:28:04 -0000
@@ -72,8 +72,6 @@
 :- import_module hlds.hlds_goal.
 :- import_module hlds.hlds_rtti.
 :- import_module hlds.make_hlds.
-:- import_module libs.
-:- import_module libs.compiler_util.
 :- import_module mdbcomp.
 :- import_module mdbcomp.prim_data.
 :- import_module parse_tree.
@@ -85,6 +83,7 @@
 :- import_module int.
 :- import_module map.
 :- import_module pair.
+:- import_module require.
 :- import_module set.
 :- import_module string.
 :- import_module svmap.
Index: compiler/closure_analysis.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/closure_analysis.m,v
retrieving revision 1.20
diff -u -b -r1.20 closure_analysis.m
--- compiler/closure_analysis.m	14 Oct 2009 05:28:31 -0000	1.20
+++ compiler/closure_analysis.m	14 Dec 2010 11:28:04 -0000
@@ -37,7 +37,6 @@
 :- import_module hlds.hlds_goal.
 :- import_module hlds.hlds_pred.
 :- import_module hlds.passes_aux.
-:- import_module libs.compiler_util.
 :- import_module libs.globals.
 :- import_module libs.options.
 :- import_module parse_tree.prog_data.
@@ -51,6 +50,7 @@
 :- import_module map.
 :- import_module maybe.
 :- import_module pair.
+:- import_module require.
 :- import_module set.
 :- import_module string.
 :- import_module svmap.
Index: compiler/code_gen.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/code_gen.m,v
retrieving revision 1.180
diff -u -b -r1.180 code_gen.m
--- compiler/code_gen.m	6 Jan 2009 03:56:24 -0000	1.180
+++ compiler/code_gen.m	14 Dec 2010 11:28:05 -0000
@@ -45,7 +45,6 @@
 :- import_module hlds.hlds_desc.
 :- import_module hlds.hlds_pred.
 :- import_module hlds.instmap.
-:- import_module libs.compiler_util.
 :- import_module libs.globals.
 :- import_module ll_backend.call_gen.
 :- import_module ll_backend.commit_gen.
@@ -65,6 +64,7 @@
 :- import_module map.
 :- import_module maybe.
 :- import_module pair.
+:- import_module require.
 :- import_module set.
 :- import_module string.
 
Index: compiler/code_info.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/code_info.m,v
retrieving revision 1.378
diff -u -b -r1.378 code_info.m
--- compiler/code_info.m	1 Nov 2010 04:02:54 -0000	1.378
+++ compiler/code_info.m	14 Dec 2010 11:28:05 -0000
@@ -69,7 +69,6 @@
 :- import_module hlds.hlds_code_util.
 :- import_module hlds.hlds_desc.
 :- import_module hlds.hlds_rtti.
-:- import_module libs.compiler_util.
 :- import_module libs.options.
 :- import_module libs.trace_params.
 :- import_module ll_backend.code_util.
@@ -82,6 +81,7 @@
 :- import_module cord.
 :- import_module int.
 :- import_module pair.
+:- import_module require.
 :- import_module set.
 :- import_module stack.
 :- import_module string.
Index: compiler/code_util.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/code_util.m,v
retrieving revision 1.186
diff -u -b -r1.186 code_util.m
--- compiler/code_util.m	30 Oct 2009 03:33:12 -0000	1.186
+++ compiler/code_util.m	14 Dec 2010 11:28:05 -0000
@@ -96,9 +96,9 @@
 :- import_module backend_libs.proc_label.
 :- import_module backend_libs.rtti.
 :- import_module hlds.code_model.
-:- import_module libs.compiler_util.
 
 :- import_module int.
+:- import_module require.
 :- import_module term.
 
 %---------------------------------------------------------------------------%
Index: compiler/commit_gen.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/commit_gen.m,v
retrieving revision 1.21
diff -u -b -r1.21 commit_gen.m
--- compiler/commit_gen.m	6 Jan 2009 03:56:25 -0000	1.21
+++ compiler/commit_gen.m	14 Dec 2010 11:28:05 -0000
@@ -35,12 +35,12 @@
 
 :- implementation.
 
-:- import_module libs.compiler_util.
 :- import_module ll_backend.code_gen.
 
 :- import_module cord.
 :- import_module list.
 :- import_module maybe.
+:- import_module require.
 :- import_module pair.
 :- import_module string.
 
Index: compiler/common.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/common.m,v
retrieving revision 1.109
diff -u -b -r1.109 common.m
--- compiler/common.m	3 Sep 2009 23:57:23 -0000	1.109
+++ compiler/common.m	14 Dec 2010 11:28:05 -0000
@@ -98,7 +98,6 @@
 :- import_module hlds.hlds_rtti.
 :- import_module hlds.instmap.
 :- import_module libs.
-:- import_module libs.compiler_util.
 :- import_module libs.options.
 :- import_module parse_tree.error_util.
 :- import_module parse_tree.prog_type.
@@ -110,6 +109,7 @@
 :- import_module map.
 :- import_module maybe.
 :- import_module pair.
+:- import_module require.
 :- import_module set.
 :- import_module sveqvclass.
 :- import_module svmap.
Index: compiler/compile_target_code.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/compile_target_code.m,v
retrieving revision 1.161
diff -u -b -r1.161 compile_target_code.m
--- compiler/compile_target_code.m	6 Oct 2010 04:01:32 -0000	1.161
+++ compiler/compile_target_code.m	14 Dec 2010 11:28:05 -0000
@@ -235,7 +235,6 @@
 :- import_module hlds.
 
 :- import_module hlds.passes_aux.
-:- import_module libs.compiler_util.
 :- import_module libs.globals.
 :- import_module libs.handle_options.
 :- import_module libs.options.
@@ -250,6 +249,7 @@
 
 :- import_module dir.
 :- import_module getopt_io.
+:- import_module require.
 :- import_module string.
 
 %-----------------------------------------------------------------------------%
Index: compiler/compiler_util.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/compiler_util.m,v
retrieving revision 1.6
diff -u -b -r1.6 compiler_util.m
--- compiler/compiler_util.m	14 Oct 2009 05:28:31 -0000	1.6
+++ compiler/compiler_util.m	14 Dec 2010 11:28:05 -0000
@@ -22,28 +22,6 @@
 
 %-----------------------------------------------------------------------------%
 
-    % Call error/1 with a "Sorry, not implemented" message.
-    %
-    % Use this for features that should be implemented (or at least could be
-    % implemented).
-    %
-:- func sorry(string, string) = _ is erroneous.
-:- pred sorry(string::in, string::in) is erroneous.
-
-    % unexpected(ModuleName, Message):
-    %
-    % Call error/1 with an "Unexpected" message.
-    % Use this to handle cases which are not expected to arise (i.e. bugs).
-    %
-:- func unexpected(string, string) = _ is erroneous.
-:- pred unexpected(string::in, string::in) is erroneous.
-    
-    % expect(Goal, ModuleName, Message):
-    %
-    % Call Goal, and call unexpected(ModuleName, Message) if Goal fails.
-    %
-:- pred expect((pred)::((pred) is semidet), string::in, string::in) is det.
-
     % Record the fact that a warning has been issued; set the exit status
     % to error if the `--halt-at-warn' option is set.
     %
@@ -74,26 +52,6 @@
 
 %-----------------------------------------------------------------------------%
 
-    % Call error/1 with a "Sorry, not implemented" message.
-    %
-sorry(Module, What) = _ :- sorry(Module, What).
-sorry(Module, What) :-
-    string.format("%s: Sorry, not implemented: %s",
-        [s(Module), s(What)], ErrorMessage),
-    error(ErrorMessage).
-
-unexpected(Module, What) = _ :- unexpected(Module, What).
-unexpected(Module, What) :-
-    string.format("%s: Unexpected: %s", [s(Module), s(What)], ErrorMessage),
-    error(ErrorMessage).
-
-expect(Goal, Module, Message) :-
-    ( Goal ->
-        true
-    ;
-        unexpected(Module, Message)
-    ).
-
 record_warning(Globals, !IO) :-
     globals.lookup_bool_option(Globals, halt_at_warn, HaltAtWarn),
     (
Index: compiler/complexity.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/complexity.m,v
retrieving revision 1.37
diff -u -b -r1.37 complexity.m
--- compiler/complexity.m	23 Aug 2010 07:38:28 -0000	1.37
+++ compiler/complexity.m	14 Dec 2010 11:28:05 -0000
@@ -66,7 +66,6 @@
 :- import_module hlds.instmap.
 :- import_module hlds.passes_aux.
 :- import_module hlds.pred_table.
-:- import_module libs.compiler_util.
 :- import_module libs.globals.
 :- import_module libs.options.
 :- import_module mdbcomp.prim_data.
@@ -83,6 +82,7 @@
 :- import_module int.
 :- import_module list.
 :- import_module map.
+:- import_module require.
 :- import_module set.
 :- import_module string.
 :- import_module term.
Index: compiler/constraint.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/constraint.m,v
retrieving revision 1.94
diff -u -b -r1.94 constraint.m
--- compiler/constraint.m	26 Jul 2010 05:05:48 -0000	1.94
+++ compiler/constraint.m	14 Dec 2010 11:28:05 -0000
@@ -53,7 +53,6 @@
 :- import_module check_hlds.inst_match.
 :- import_module hlds.goal_form.
 :- import_module hlds.goal_util.
-:- import_module libs.compiler_util.
 :- import_module libs.globals.
 :- import_module libs.options.
 
@@ -61,6 +60,7 @@
 :- import_module list.
 :- import_module map.
 :- import_module pair.
+:- import_module require.
 :- import_module set.
 :- import_module term.
 :- import_module varset.
Index: compiler/continuation_info.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/continuation_info.m,v
retrieving revision 1.97
diff -u -b -r1.97 continuation_info.m
--- compiler/continuation_info.m	30 Oct 2009 03:33:13 -0000	1.97
+++ compiler/continuation_info.m	14 Dec 2010 11:28:05 -0000
@@ -408,12 +408,12 @@
 :- import_module check_hlds.type_util.
 :- import_module hlds.hlds_goal.
 :- import_module hlds.hlds_llds.
-:- import_module libs.compiler_util.
 :- import_module libs.options.
 :- import_module ll_backend.code_util.
 :- import_module parse_tree.prog_type.
 
 :- import_module int.
+:- import_module require.
 :- import_module solutions.
 :- import_module string.
 :- import_module svmap.
Index: compiler/coverage_profiling.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/coverage_profiling.m,v
retrieving revision 1.2
diff -u -b -r1.2 coverage_profiling.m
--- compiler/coverage_profiling.m	21 Sep 2010 01:09:15 -0000	1.2
+++ compiler/coverage_profiling.m	14 Dec 2010 11:28:05 -0000
@@ -45,7 +45,6 @@
 
 :- import_module hlds.goal_util.
 :- import_module hlds.instmap.
-:- import_module libs.compiler_util.
 :- import_module libs.globals.
 :- import_module libs.options.
 :- import_module ll_backend.deep_profiling.
@@ -56,6 +55,7 @@
 :- import_module counter.
 :- import_module map.
 :- import_module pair.
+:- import_module require.
 :- import_module set.
 :- import_module string.
 
Index: compiler/cse_detection.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/cse_detection.m,v
retrieving revision 1.127
diff -u -b -r1.127 cse_detection.m
--- compiler/cse_detection.m	23 Aug 2010 04:16:09 -0000	1.127
+++ compiler/cse_detection.m	14 Dec 2010 11:28:05 -0000
@@ -47,7 +47,6 @@
 :- import_module hlds.instmap.
 :- import_module hlds.quantification.
 :- import_module libs.
-:- import_module libs.compiler_util.
 :- import_module libs.file_util.
 :- import_module libs.globals.
 :- import_module libs.options.
@@ -64,6 +63,7 @@
 :- import_module map.
 :- import_module maybe.
 :- import_module pair.
+:- import_module require.
 :- import_module set.
 :- import_module string.
 :- import_module svmap.
Index: compiler/ctgc.fixpoint_table.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/ctgc.fixpoint_table.m,v
retrieving revision 1.6
diff -u -b -r1.6 ctgc.fixpoint_table.m
--- compiler/ctgc.fixpoint_table.m	27 Mar 2008 02:29:41 -0000	1.6
+++ compiler/ctgc.fixpoint_table.m	14 Dec 2010 11:28:05 -0000
@@ -89,11 +89,10 @@
 
 :- implementation.
 
-:- import_module libs.compiler_util.
-
 :- import_module int.
 :- import_module list.
 :- import_module map.
+:- import_module require.
 :- import_module svmap.
 
 %-----------------------------------------------------------------------------%
Index: compiler/ctgc.livedata.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/ctgc.livedata.m,v
retrieving revision 1.7
diff -u -b -r1.7 ctgc.livedata.m
--- compiler/ctgc.livedata.m	28 May 2008 05:26:51 -0000	1.7
+++ compiler/ctgc.livedata.m	14 Dec 2010 11:28:05 -0000
@@ -87,11 +87,11 @@
 
 :- implementation.
 
-:- import_module libs.compiler_util.
 :- import_module transform_hlds.ctgc.datastruct.
 :- import_module transform_hlds.ctgc.structure_sharing.domain.
 
 :- import_module pair.
+:- import_module require.
 :- import_module set.
 
 %-----------------------------------------------------------------------------%
Index: compiler/ctgc.selector.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/ctgc.selector.m,v
retrieving revision 1.28
diff -u -b -r1.28 ctgc.selector.m
--- compiler/ctgc.selector.m	11 Jun 2009 07:00:07 -0000	1.28
+++ compiler/ctgc.selector.m	14 Dec 2010 11:28:05 -0000
@@ -87,7 +87,6 @@
 :- implementation.
 
 :- import_module check_hlds.type_util.
-:- import_module libs.compiler_util.
 :- import_module parse_tree.prog_type.
 
 :- import_module assoc_list.
@@ -96,6 +95,7 @@
 :- import_module map.
 :- import_module pair.
 :- import_module queue.
+:- import_module require.
 :- import_module set.
 :- import_module solutions.
 :- import_module string.
Index: compiler/ctgc.util.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/ctgc.util.m,v
retrieving revision 1.21
diff -u -b -r1.21 ctgc.util.m
--- compiler/ctgc.util.m	16 Jun 2008 04:52:30 -0000	1.21
+++ compiler/ctgc.util.m	14 Dec 2010 11:28:05 -0000
@@ -76,13 +76,13 @@
 :- implementation.
 
 :- import_module check_hlds.type_util.
-:- import_module libs.compiler_util.
 :- import_module parse_tree.prog_type.
 :- import_module parse_tree.prog_type_subst.
 
 :- import_module bool.
 :- import_module list.
 :- import_module map.
+:- import_module require.
 :- import_module svmap.
 
 %-----------------------------------------------------------------------------%
Index: compiler/dead_proc_elim.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/dead_proc_elim.m,v
retrieving revision 1.136
diff -u -b -r1.136 dead_proc_elim.m
--- compiler/dead_proc_elim.m	8 Nov 2010 03:43:41 -0000	1.136
+++ compiler/dead_proc_elim.m	14 Dec 2010 11:28:05 -0000
@@ -84,7 +84,6 @@
 :- import_module hlds.hlds_goal.
 :- import_module hlds.passes_aux.
 :- import_module hlds.pred_table.
-:- import_module libs.compiler_util.
 :- import_module libs.globals.
 :- import_module libs.options.
 :- import_module parse_tree.error_util.
@@ -96,6 +95,7 @@
 :- import_module maybe.
 :- import_module pair.
 :- import_module queue.
+:- import_module require.
 :- import_module set_tree234.
 :- import_module set.
 :- import_module string.
Index: compiler/deforest.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/deforest.m,v
retrieving revision 1.95
diff -u -b -r1.95 deforest.m
--- compiler/deforest.m	23 Aug 2010 07:38:28 -0000	1.95
+++ compiler/deforest.m	14 Dec 2010 11:28:06 -0000
@@ -60,7 +60,6 @@
 :- import_module hlds.instmap.
 :- import_module hlds.passes_aux.
 :- import_module hlds.quantification.
-:- import_module libs.compiler_util.
 :- import_module libs.globals.
 :- import_module libs.options.
 :- import_module mdbcomp.prim_data.
@@ -84,6 +83,7 @@
 :- import_module map.
 :- import_module maybe.
 :- import_module pair.
+:- import_module require.
 :- import_module set.
 :- import_module string.
 :- import_module term.
Index: compiler/delay_construct.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/delay_construct.m,v
retrieving revision 1.30
diff -u -b -r1.30 delay_construct.m
--- compiler/delay_construct.m	5 Aug 2010 03:07:08 -0000	1.30
+++ compiler/delay_construct.m	14 Dec 2010 11:28:06 -0000
@@ -45,7 +45,6 @@
 :- import_module hlds.hlds_rtti.
 :- import_module hlds.instmap.
 :- import_module hlds.passes_aux.
-:- import_module libs.compiler_util.
 :- import_module libs.globals.
 :- import_module parse_tree.prog_data.
 
@@ -53,6 +52,7 @@
 :- import_module io.
 :- import_module list.
 :- import_module pair.
+:- import_module require.
 :- import_module set.
 
 %-----------------------------------------------------------------------------%
Index: compiler/delay_info.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/delay_info.m,v
retrieving revision 1.31
diff -u -b -r1.31 delay_info.m
--- compiler/delay_info.m	20 Jul 2009 02:22:51 -0000	1.31
+++ compiler/delay_info.m	14 Dec 2010 11:28:06 -0000
@@ -91,12 +91,11 @@
 
 :- import_module check_hlds.mode_errors.   % for the mode_error_info
                                             % and delay_info types.
-:- import_module libs.
-:- import_module libs.compiler_util.
 
 :- import_module int.
 :- import_module map.
 :- import_module pair.
+:- import_module require.
 :- import_module set.
 :- import_module stack.
 :- import_module svmap.
Index: compiler/delay_partial_inst.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/delay_partial_inst.m,v
retrieving revision 1.16
diff -u -b -r1.16 delay_partial_inst.m
--- compiler/delay_partial_inst.m	8 Sep 2009 02:43:31 -0000	1.16
+++ compiler/delay_partial_inst.m	14 Dec 2010 11:28:06 -0000
@@ -132,8 +132,6 @@
 :- import_module hlds.instmap.
 :- import_module hlds.passes_aux.
 :- import_module hlds.quantification.
-:- import_module libs.
-:- import_module libs.compiler_util.
 :- import_module parse_tree.
 :- import_module parse_tree.prog_data.
 
@@ -143,6 +141,7 @@
 :- import_module map.
 :- import_module maybe.
 :- import_module pair.
+:- import_module require.
 :- import_module set.
 :- import_module string.
 :- import_module svmap.
Index: compiler/dense_switch.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/dense_switch.m,v
retrieving revision 1.73
diff -u -b -r1.73 dense_switch.m
--- compiler/dense_switch.m	4 Nov 2009 03:44:46 -0000	1.73
+++ compiler/dense_switch.m	14 Dec 2010 11:28:06 -0000
@@ -58,7 +58,6 @@
 :- import_module hlds.hlds_llds.
 :- import_module hlds.hlds_out.
 :- import_module hlds.hlds_out.hlds_out_goal.
-:- import_module libs.compiler_util.
 :- import_module ll_backend.code_gen.
 :- import_module ll_backend.trace_gen.
 :- import_module parse_tree.prog_type.
@@ -69,6 +68,7 @@
 :- import_module map.
 :- import_module maybe.
 :- import_module pair.
+:- import_module require.
 :- import_module svmap.
 
 %-----------------------------------------------------------------------------%
Index: compiler/dep_par_conj.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/dep_par_conj.m,v
retrieving revision 1.44
diff -u -b -r1.44 dep_par_conj.m
--- compiler/dep_par_conj.m	30 Jul 2010 05:16:09 -0000	1.44
+++ compiler/dep_par_conj.m	14 Dec 2010 11:28:06 -0000
@@ -151,7 +151,6 @@
 :- import_module hlds.hlds_pred.
 :- import_module hlds.pred_table.
 :- import_module hlds.quantification.
-:- import_module libs.compiler_util.
 :- import_module libs.globals.
 :- import_module libs.options.
 :- import_module mdbcomp.prim_data.
@@ -168,6 +167,7 @@
 :- import_module map.
 :- import_module maybe.
 :- import_module pair.
+:- import_module require.
 :- import_module std_util.
 :- import_module string.
 :- import_module svmap.
Index: compiler/det_analysis.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/det_analysis.m,v
retrieving revision 1.224
diff -u -b -r1.224 det_analysis.m
--- compiler/det_analysis.m	10 Sep 2010 05:14:57 -0000	1.224
+++ compiler/det_analysis.m	14 Dec 2010 11:28:06 -0000
@@ -122,7 +122,6 @@
 :- import_module libs.
 :- import_module libs.file_util.
 :- import_module libs.globals.
-:- import_module libs.compiler_util.
 :- import_module libs.options.
 :- import_module parse_tree.mercury_to_mercury.
 :- import_module parse_tree.prog_data.
@@ -134,6 +133,7 @@
 :- import_module io.
 :- import_module map.
 :- import_module pair.
+:- import_module require.
 :- import_module set.
 :- import_module string.
 :- import_module term.
Index: compiler/det_report.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/det_report.m,v
retrieving revision 1.151
diff -u -b -r1.151 det_report.m
--- compiler/det_report.m	8 Nov 2010 03:43:41 -0000	1.151
+++ compiler/det_report.m	14 Dec 2010 11:28:06 -0000
@@ -145,7 +145,6 @@
 :- import_module hlds.hlds_out.hlds_out_goal.
 :- import_module hlds.hlds_out.hlds_out_util.
 :- import_module libs.
-:- import_module libs.compiler_util.
 :- import_module libs.options.
 :- import_module mdbcomp.
 :- import_module mdbcomp.prim_data.
@@ -163,6 +162,7 @@
 :- import_module map.
 :- import_module maybe.
 :- import_module pair.
+:- import_module require.
 :- import_module set_tree234.
 :- import_module solutions.
 :- import_module string.
Index: compiler/det_util.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/det_util.m,v
retrieving revision 1.52
diff -u -b -r1.52 det_util.m
--- compiler/det_util.m	8 Nov 2010 03:43:42 -0000	1.52
+++ compiler/det_util.m	14 Dec 2010 11:28:06 -0000
@@ -118,13 +118,13 @@
 :- implementation.
 
 :- import_module libs.
-:- import_module libs.compiler_util.
 :- import_module libs.globals.
 :- import_module libs.options.
 :- import_module parse_tree.prog_type.
 :- import_module parse_tree.prog_util.
 
 :- import_module map.
+:- import_module require.
 :- import_module set_tree234.
 :- import_module term.
 
Index: compiler/disj_gen.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/disj_gen.m,v
retrieving revision 1.114
diff -u -b -r1.114 disj_gen.m
--- compiler/disj_gen.m	1 Nov 2010 04:02:55 -0000	1.114
+++ compiler/disj_gen.m	14 Dec 2010 11:28:06 -0000
@@ -40,7 +40,6 @@
 :- import_module backend_libs.builtin_ops.
 :- import_module hlds.goal_form.
 :- import_module hlds.hlds_llds.
-:- import_module libs.compiler_util.
 :- import_module libs.globals.
 :- import_module libs.options.
 :- import_module ll_backend.code_gen.
@@ -57,6 +56,7 @@
 :- import_module map.
 :- import_module maybe.
 :- import_module pair.
+:- import_module require.
 :- import_module set.
 :- import_module term.
 
Index: compiler/dupelim.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/dupelim.m,v
retrieving revision 1.94
diff -u -b -r1.94 dupelim.m
--- compiler/dupelim.m	21 Oct 2009 06:36:18 -0000	1.94
+++ compiler/dupelim.m	14 Dec 2010 11:28:06 -0000
@@ -61,7 +61,6 @@
 
 :- implementation.
 
-:- import_module libs.compiler_util.
 :- import_module ll_backend.basic_block.
 :- import_module ll_backend.opt_util.
 
@@ -69,6 +68,7 @@
 :- import_module map.
 :- import_module maybe.
 :- import_module pair.
+:- import_module require.
 :- import_module set.
 :- import_module svmap.
 :- import_module svset.
Index: compiler/dupproc.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/dupproc.m,v
retrieving revision 1.26
diff -u -b -r1.26 dupproc.m
--- compiler/dupproc.m	1 Nov 2010 04:02:55 -0000	1.26
+++ compiler/dupproc.m	14 Dec 2010 11:28:06 -0000
@@ -37,12 +37,12 @@
 
 :- implementation.
 
-:- import_module libs.compiler_util.
 :- import_module ll_backend.opt_util.
 
 :- import_module int.
 :- import_module maybe.
 :- import_module pair.
+:- import_module require.
 
 %-----------------------------------------------------------------------------%
 
Index: compiler/elds.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/elds.m,v
retrieving revision 1.18
diff -u -b -r1.18 elds.m
--- compiler/elds.m	17 Aug 2007 02:08:37 -0000	1.18
+++ compiler/elds.m	14 Dec 2010 11:28:06 -0000
@@ -385,7 +385,7 @@
 
 :- implementation.
 
-:- import_module libs.compiler_util.
+:- import_module require.
 
 %-----------------------------------------------------------------------------%
 
Index: compiler/elds_to_erlang.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/elds_to_erlang.m,v
retrieving revision 1.36
diff -u -b -r1.36 elds_to_erlang.m
--- compiler/elds_to_erlang.m	14 Oct 2009 05:28:31 -0000	1.36
+++ compiler/elds_to_erlang.m	14 Dec 2010 11:28:06 -0000
@@ -47,7 +47,6 @@
 :- import_module hlds.hlds_rtti.
 :- import_module hlds.pred_table.
 :- import_module hlds.special_pred.
-:- import_module libs.compiler_util.
 :- import_module libs.file_util.
 :- import_module libs.globals.
 :- import_module mdbcomp.prim_data.
@@ -65,6 +64,7 @@
 :- import_module list.
 :- import_module maybe.
 :- import_module pair.
+:- import_module require.
 :- import_module set.
 :- import_module string.
 :- import_module term.
Index: compiler/equiv_type.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/equiv_type.m,v
retrieving revision 1.85
diff -u -b -r1.85 equiv_type.m
--- compiler/equiv_type.m	10 Sep 2010 05:14:57 -0000	1.85
+++ compiler/equiv_type.m	14 Dec 2010 11:28:06 -0000
@@ -109,7 +109,6 @@
 
 :- implementation.
 
-:- import_module libs.compiler_util.
 :- import_module parse_tree.prog_data.
 :- import_module parse_tree.prog_mode.
 :- import_module parse_tree.prog_util.
@@ -119,6 +118,7 @@
 :- import_module assoc_list.
 :- import_module bool.
 :- import_module pair.
+:- import_module require.
 :- import_module set.
 :- import_module svmap.
 :- import_module term.
Index: compiler/equiv_type_hlds.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/equiv_type_hlds.m,v
retrieving revision 1.61
diff -u -b -r1.61 equiv_type_hlds.m
--- compiler/equiv_type_hlds.m	30 Jul 2010 05:16:10 -0000	1.61
+++ compiler/equiv_type_hlds.m	14 Dec 2010 11:28:06 -0000
@@ -41,7 +41,6 @@
 :- import_module hlds.hlds_rtti.
 :- import_module hlds.instmap.
 :- import_module hlds.quantification.
-:- import_module libs.compiler_util.
 :- import_module mdbcomp.prim_data.
 :- import_module parse_tree.equiv_type.
 :- import_module parse_tree.prog_data.
@@ -54,6 +53,7 @@
 :- import_module map.
 :- import_module maybe.
 :- import_module pair.
+:- import_module require.
 :- import_module set.
 :- import_module svmap.
 :- import_module svset.
Index: compiler/erl_call_gen.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/erl_call_gen.m,v
retrieving revision 1.17
diff -u -b -r1.17 erl_call_gen.m
--- compiler/erl_call_gen.m	10 Sep 2010 05:14:57 -0000	1.17
+++ compiler/erl_call_gen.m	14 Dec 2010 11:28:07 -0000
@@ -106,11 +106,11 @@
 :- import_module backend_libs.builtin_ops.
 :- import_module check_hlds.type_util.
 :- import_module hlds.hlds_module.
-:- import_module libs.compiler_util.
 
 :- import_module int.
 :- import_module map.
 :- import_module pair.
+:- import_module require.
 
 %-----------------------------------------------------------------------------%
 %
Index: compiler/erl_code_gen.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/erl_code_gen.m,v
retrieving revision 1.35
diff -u -b -r1.35 erl_code_gen.m
--- compiler/erl_code_gen.m	30 Jul 2010 05:16:10 -0000	1.35
+++ compiler/erl_code_gen.m	14 Dec 2010 11:28:07 -0000
@@ -59,7 +59,6 @@
 :- import_module hlds.instmap.
 :- import_module hlds.passes_aux.
 :- import_module hlds.pred_table.
-:- import_module libs.compiler_util.
 :- import_module libs.globals.
 :- import_module libs.options.
 :- import_module mdbcomp.prim_data.
@@ -72,6 +71,7 @@
 :- import_module list.
 :- import_module map.
 :- import_module maybe.
+:- import_module require.
 :- import_module set.
 :- import_module string.
 :- import_module varset.
Index: compiler/erl_code_util.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/erl_code_util.m,v
retrieving revision 1.19
diff -u -b -r1.19 erl_code_util.m
--- compiler/erl_code_util.m	4 Nov 2009 03:44:47 -0000	1.19
+++ compiler/erl_code_util.m	14 Dec 2010 11:28:07 -0000
@@ -211,11 +211,11 @@
 :- import_module check_hlds.mode_util.
 :- import_module check_hlds.type_util.
 :- import_module hlds.goal_util.
-:- import_module libs.compiler_util.
 
 :- import_module int.
 :- import_module map.
 :- import_module pair.
+:- import_module require.
 :- import_module set.
 :- import_module svset.
 :- import_module term.
Index: compiler/erl_rtti.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/erl_rtti.m,v
retrieving revision 1.21
diff -u -b -r1.21 erl_rtti.m
--- compiler/erl_rtti.m	30 Oct 2009 03:33:13 -0000	1.21
+++ compiler/erl_rtti.m	14 Dec 2010 11:28:07 -0000
@@ -49,7 +49,6 @@
 :- import_module hlds.code_model.
 :- import_module hlds.hlds_pred.
 :- import_module hlds.hlds_rtti.
-:- import_module libs.compiler_util.
 :- import_module mdbcomp.prim_data.
 :- import_module parse_tree.prog_data.
 :- import_module parse_tree.prog_util.
@@ -59,6 +58,7 @@
 :- import_module exception.
 :- import_module int.
 :- import_module maybe.
+:- import_module require.
 :- import_module string.
 :- import_module svvarset.
 :- import_module univ.
Index: compiler/erl_unify_gen.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/erl_unify_gen.m,v
retrieving revision 1.15
diff -u -b -r1.15 erl_unify_gen.m
--- compiler/erl_unify_gen.m	11 Jun 2009 07:00:08 -0000	1.15
+++ compiler/erl_unify_gen.m	14 Dec 2010 11:28:07 -0000
@@ -83,7 +83,6 @@
 :- import_module erl_backend.erl_call_gen.
 :- import_module hlds.hlds_module.
 :- import_module hlds.hlds_pred.
-:- import_module libs.compiler_util.
 :- import_module mdbcomp.prim_data.
 :- import_module parse_tree.prog_data.
 :- import_module parse_tree.prog_util.
@@ -92,6 +91,7 @@
 :- import_module list.
 :- import_module map.
 :- import_module pair.
+:- import_module require.
 :- import_module set.
 :- import_module string.
 
Index: compiler/exception_analysis.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/exception_analysis.m,v
retrieving revision 1.54
diff -u -b -r1.54 exception_analysis.m
--- compiler/exception_analysis.m	30 Jul 2010 05:16:10 -0000	1.54
+++ compiler/exception_analysis.m	14 Dec 2010 11:28:07 -0000
@@ -130,7 +130,6 @@
 :- import_module check_hlds.type_util.
 :- import_module hlds.hlds_goal.
 :- import_module hlds.hlds_pred.
-:- import_module libs.compiler_util.
 :- import_module libs.file_util.
 :- import_module libs.globals.
 :- import_module libs.options.
@@ -146,6 +145,7 @@
 :- import_module map.
 :- import_module maybe.
 :- import_module pair.
+:- import_module require.
 :- import_module set.
 :- import_module term.
 
Index: compiler/export.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/export.m,v
retrieving revision 1.126
diff -u -b -r1.126 export.m
--- compiler/export.m	11 Nov 2009 07:10:16 -0000	1.126
+++ compiler/export.m	14 Dec 2010 11:28:07 -0000
@@ -81,20 +81,18 @@
 
 :- implementation.
 
-:- import_module check_hlds.        % needed for type_util, mode_util
-:- import_module libs.
-
 :- import_module backend_libs.c_util.
 :- import_module backend_libs.foreign.
 :- import_module backend_libs.name_mangle.
 :- import_module backend_libs.proc_label.
+:- import_module check_hlds.
 :- import_module check_hlds.type_util.
 :- import_module hlds.arg_info.
 :- import_module hlds.code_model.
 :- import_module hlds.hlds_data.
 :- import_module hlds.hlds_pred.
 :- import_module hlds.pred_table.
-:- import_module libs.compiler_util.
+:- import_module libs.
 :- import_module libs.globals.
 :- import_module parse_tree.file_names.
 :- import_module parse_tree.module_cmds.
@@ -109,6 +107,7 @@
 :- import_module map.
 :- import_module maybe.
 :- import_module pair.
+:- import_module require.
 :- import_module string.
 :- import_module term.
 
Index: compiler/fact_table.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/fact_table.m,v
retrieving revision 1.89
diff -u -b -r1.89 fact_table.m
--- compiler/fact_table.m	30 Mar 2010 23:57:25 -0000	1.89
+++ compiler/fact_table.m	14 Dec 2010 11:28:07 -0000
@@ -102,7 +102,6 @@
 :- import_module hlds.arg_info.
 :- import_module hlds.code_model.
 :- import_module hlds.passes_aux.
-:- import_module libs.compiler_util.
 :- import_module libs.file_util.
 :- import_module libs.globals.
 :- import_module libs.options.
@@ -127,6 +126,7 @@
 :- import_module maybe.
 :- import_module pair.
 :- import_module parser.
+:- import_module require.
 :- import_module string.
 :- import_module term.
 :- import_module term_io.
Index: compiler/field_access.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/field_access.m,v
retrieving revision 1.17
diff -u -b -r1.17 field_access.m
--- compiler/field_access.m	8 Sep 2009 02:43:32 -0000	1.17
+++ compiler/field_access.m	14 Dec 2010 11:28:07 -0000
@@ -105,12 +105,12 @@
 :- import_module hlds.hlds_data.
 :- import_module hlds.hlds_pred.
 :- import_module hlds.make_hlds.superhomogeneous.
-:- import_module libs.compiler_util.
 :- import_module parse_tree.mercury_to_mercury.
 :- import_module parse_tree.prog_io_sym_name.
 
 :- import_module bool.
 :- import_module int.
+:- import_module require.
 :- import_module term.
 :- import_module varset.
 
Index: compiler/file_names.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/file_names.m,v
retrieving revision 1.12
diff -u -b -r1.12 file_names.m
--- compiler/file_names.m	30 Sep 2010 07:23:31 -0000	1.12
+++ compiler/file_names.m	14 Dec 2010 11:28:07 -0000
@@ -133,7 +133,6 @@
 
 :- implementation.
 
-:- import_module libs.compiler_util.
 :- import_module libs.globals.
 :- import_module libs.handle_options.
 :- import_module libs.options.
@@ -146,6 +145,7 @@
 :- import_module dir.
 :- import_module library.
 :- import_module list.
+:- import_module require.
 :- import_module string.
 
 %-----------------------------------------------------------------------------%
Index: compiler/follow_code.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/follow_code.m,v
retrieving revision 1.98
diff -u -b -r1.98 follow_code.m
--- compiler/follow_code.m	5 Aug 2010 03:07:08 -0000	1.98
+++ compiler/follow_code.m	14 Dec 2010 11:28:07 -0000
@@ -51,7 +51,6 @@
 :- import_module hlds.hlds_rtti.
 :- import_module hlds.instmap.
 :- import_module hlds.quantification.
-:- import_module libs.compiler_util.
 :- import_module libs.globals.
 :- import_module libs.options.
 :- import_module parse_tree.prog_data.
@@ -59,6 +58,7 @@
 :- import_module bool.
 :- import_module list.
 :- import_module pair.
+:- import_module require.
 :- import_module set.
 
 %-----------------------------------------------------------------------------%
Index: compiler/follow_vars.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/follow_vars.m,v
retrieving revision 1.92
diff -u -b -r1.92 follow_vars.m
--- compiler/follow_vars.m	23 Dec 2008 01:37:32 -0000	1.92
+++ compiler/follow_vars.m	14 Dec 2010 11:28:07 -0000
@@ -53,7 +53,6 @@
 
 :- import_module hlds.arg_info.
 :- import_module hlds.code_model.
-:- import_module libs.compiler_util.
 :- import_module ll_backend.call_gen.
 :- import_module parse_tree.prog_data.
 
@@ -64,6 +63,7 @@
 :- import_module map.
 :- import_module maybe.
 :- import_module pair.
+:- import_module require.
 :- import_module svmap.
 
 %-----------------------------------------------------------------------------%
Index: compiler/foreign.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/foreign.m,v
retrieving revision 1.85
diff -u -b -r1.85 foreign.m
--- compiler/foreign.m	16 Sep 2010 00:39:02 -0000	1.85
+++ compiler/foreign.m	14 Dec 2010 11:28:07 -0000
@@ -157,7 +157,6 @@
 :- import_module hlds.hlds_out.
 :- import_module hlds.hlds_pred.
 :- import_module libs.
-:- import_module libs.compiler_util.
 :- import_module libs.globals.
 :- import_module parse_tree.error_util.
 :- import_module parse_tree.prog_out.
@@ -169,6 +168,7 @@
 :- import_module list.
 :- import_module map.
 :- import_module pair.
+:- import_module require.
 :- import_module string.
 :- import_module term.
 :- import_module varset.
Index: compiler/frameopt.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/frameopt.m,v
retrieving revision 1.119
diff -u -b -r1.119 frameopt.m
--- compiler/frameopt.m	1 Nov 2010 04:02:55 -0000	1.119
+++ compiler/frameopt.m	14 Dec 2010 11:28:08 -0000
@@ -154,7 +154,6 @@
 
 :- implementation.
 
-:- import_module libs.compiler_util.
 :- import_module libs.options.
 :- import_module ll_backend.opt_debug.
 :- import_module ll_backend.opt_util.
@@ -166,6 +165,7 @@
 :- import_module maybe.
 :- import_module pair.
 :- import_module queue.
+:- import_module require.
 :- import_module set.
 :- import_module string.
 :- import_module svmap.
Index: compiler/globals.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/globals.m,v
retrieving revision 1.96
diff -u -b -r1.96 globals.m
--- compiler/globals.m	16 Sep 2010 00:39:03 -0000	1.96
+++ compiler/globals.m	14 Dec 2010 11:28:08 -0000
@@ -295,9 +295,8 @@
 
 :- implementation.
 
-:- import_module libs.compiler_util.
-
 :- import_module int.
+:- import_module require.
 :- import_module string.
 :- import_module univ.
 
Index: compiler/goal_form.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/goal_form.m,v
retrieving revision 1.49
diff -u -b -r1.49 goal_form.m
--- compiler/goal_form.m	2 Oct 2009 03:55:27 -0000	1.49
+++ compiler/goal_form.m	14 Dec 2010 11:28:08 -0000
@@ -186,7 +186,6 @@
 
 :- import_module hlds.code_model.
 :- import_module hlds.hlds_goal.
-:- import_module libs.compiler_util.
 :- import_module transform_hlds.exception_analysis.
 :- import_module transform_hlds.term_constr_main.
 
@@ -195,6 +194,7 @@
 :- import_module map.
 :- import_module maybe.
 :- import_module pair.
+:- import_module require.
 
 %-----------------------------------------------------------------------------%
 
Index: compiler/goal_path.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/goal_path.m,v
retrieving revision 1.55
diff -u -b -r1.55 goal_path.m
--- compiler/goal_path.m	19 Aug 2009 07:44:53 -0000	1.55
+++ compiler/goal_path.m	14 Dec 2010 11:28:08 -0000
@@ -61,8 +61,6 @@
 :- import_module check_hlds.type_util.
 :- import_module hlds.hlds_clauses.
 :- import_module hlds.hlds_goal.
-:- import_module libs.
-:- import_module libs.compiler_util.
 :- import_module mdbcomp.
 :- import_module mdbcomp.program_representation.
 :- import_module parse_tree.prog_data.
@@ -73,6 +71,7 @@
 :- import_module map.
 :- import_module maybe.
 :- import_module pair.
+:- import_module require.
 
 %-----------------------------------------------------------------------------%
 
Index: compiler/goal_util.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/goal_util.m,v
retrieving revision 1.174
diff -u -b -r1.174 goal_util.m
--- compiler/goal_util.m	10 Sep 2010 05:14:57 -0000	1.174
+++ compiler/goal_util.m	14 Dec 2010 11:28:08 -0000
@@ -451,7 +451,6 @@
 :- import_module check_hlds.type_util.
 :- import_module hlds.goal_form.
 :- import_module hlds.hlds_llds.
-:- import_module libs.compiler_util.
 :- import_module parse_tree.prog_data.
 :- import_module parse_tree.prog_mode.
 :- import_module parse_tree.prog_type.
@@ -460,6 +459,7 @@
 :- import_module int.
 :- import_module map.
 :- import_module pair.
+:- import_module require.
 :- import_module solutions.
 :- import_module string.
 :- import_module svmap.
Index: compiler/granularity.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/granularity.m,v
retrieving revision 1.18
diff -u -b -r1.18 granularity.m
--- compiler/granularity.m	7 Oct 2010 23:38:43 -0000	1.18
+++ compiler/granularity.m	14 Dec 2010 11:28:08 -0000
@@ -31,7 +31,6 @@
 :- import_module hlds.instmap.
 :- import_module hlds.pred_table.
 :- import_module hlds.quantification.
-:- import_module libs.compiler_util.
 :- import_module libs.globals.
 :- import_module libs.options.
 :- import_module transform_hlds.dependency_graph.
@@ -44,6 +43,7 @@
 :- import_module map.
 :- import_module maybe.
 :- import_module pair.
+:- import_module require.
 :- import_module string.
 
 %-----------------------------------------------------------------------------%
Index: compiler/graph_colour.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/graph_colour.m,v
retrieving revision 1.19
diff -u -b -r1.19 graph_colour.m
--- compiler/graph_colour.m	31 Jul 2006 08:31:39 -0000	1.19
+++ compiler/graph_colour.m	14 Dec 2010 11:28:08 -0000
@@ -33,9 +33,8 @@
 
 :- implementation.
 
-:- import_module libs.compiler_util.
-
 :- import_module list.
+:- import_module require.
 
 %-----------------------------------------------------------------------------%
 
Index: compiler/headvar_names.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/headvar_names.m,v
retrieving revision 1.6
diff -u -b -r1.6 headvar_names.m
--- compiler/headvar_names.m	19 Aug 2009 07:44:53 -0000	1.6
+++ compiler/headvar_names.m	14 Dec 2010 11:28:08 -0000
@@ -36,7 +36,6 @@
 :- import_module hlds.hlds_clauses.
 :- import_module hlds.hlds_goal.
 :- import_module hlds.goal_util.
-:- import_module libs.compiler_util.
 :- import_module libs.options.
 :- import_module parse_tree.prog_data.
 
@@ -44,6 +43,7 @@
 :- import_module list.
 :- import_module map.
 :- import_module maybe.
+:- import_module require.
 :- import_module set.
 :- import_module varset.
 :- import_module svmap.
Index: compiler/hhf.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/hhf.m,v
retrieving revision 1.39
diff -u -b -r1.39 hhf.m
--- compiler/hhf.m	19 Aug 2009 07:44:53 -0000	1.39
+++ compiler/hhf.m	14 Dec 2010 11:28:08 -0000
@@ -46,7 +46,6 @@
 :- import_module hlds.hlds_args.
 :- import_module hlds.hlds_goal.
 :- import_module hlds.passes_aux.
-:- import_module libs.compiler_util.
 :- import_module parse_tree.prog_data.
 :- import_module parse_tree.prog_type.
 :- import_module parse_tree.prog_util.
@@ -56,6 +55,7 @@
 :- import_module map.
 :- import_module maybe.
 :- import_module pair.
+:- import_module require.
 :- import_module set.
 :- import_module solutions.
 :- import_module term.
Index: compiler/higher_order.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/higher_order.m,v
retrieving revision 1.188
diff -u -b -r1.188 higher_order.m
--- compiler/higher_order.m	30 Jul 2010 05:16:10 -0000	1.188
+++ compiler/higher_order.m	14 Dec 2010 11:28:08 -0000
@@ -59,7 +59,6 @@
 :- import_module hlds.pred_table.
 :- import_module hlds.quantification.
 :- import_module hlds.special_pred.
-:- import_module libs.compiler_util.
 :- import_module libs.file_util.
 :- import_module libs.globals.
 :- import_module libs.options.
@@ -79,6 +78,7 @@
 :- import_module map.
 :- import_module maybe.
 :- import_module pair.
+:- import_module require.
 :- import_module set.
 :- import_module string.
 :- import_module svmap.
@@ -88,10 +88,10 @@
 
 %-----------------------------------------------------------------------------%
 
-    % Iterate collecting requests and processing them until there are no more
-    % requests remaining.
-    %
 specialize_higher_order(!ModuleInfo, !IO) :-
+    % Iterate collecting requests and process them until there are no more
+    % requests remaining.
+
     module_info_get_globals(!.ModuleInfo, Globals),
     globals.lookup_bool_option(Globals, optimize_higher_order, HigherOrder),
     globals.lookup_bool_option(Globals, type_specialization, TypeSpec),
Index: compiler/hlds_args.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/hlds_args.m,v
retrieving revision 1.4
diff -u -b -r1.4 hlds_args.m
--- compiler/hlds_args.m	19 Jan 2007 07:04:13 -0000	1.4
+++ compiler/hlds_args.m	14 Dec 2010 11:28:08 -0000
@@ -219,12 +219,12 @@
 
 :- implementation.
 
-:- import_module libs.compiler_util.
 :- import_module parse_tree.prog_util.
 :- import_module parse_tree.prog_type.  
-    % Require for apply_partial_map_to_list
-    % XXX that should really live in a different module.
+    % Required for apply_partial_map_to_list.
+    % XXX That should really live in a different module.
 
+:- import_module require.
 :- import_module string.
 
 %-----------------------------------------------------------------------------%
Index: compiler/hlds_clauses.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/hlds_clauses.m,v
retrieving revision 1.11
diff -u -b -r1.11 hlds_clauses.m
--- compiler/hlds_clauses.m	19 Aug 2009 07:44:54 -0000	1.11
+++ compiler/hlds_clauses.m	14 Dec 2010 11:28:08 -0000
@@ -237,11 +237,11 @@
 
 :- implementation.
 
-:- import_module libs.compiler_util.
 :- import_module parse_tree.prog_util.
 
 :- import_module int.
 :- import_module map.
+:- import_module require.
 :- import_module term.
 :- import_module varset.
 
Index: compiler/hlds_code_util.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/hlds_code_util.m,v
retrieving revision 1.41
diff -u -b -r1.41 hlds_code_util.m
--- compiler/hlds_code_util.m	4 Sep 2009 02:27:50 -0000	1.41
+++ compiler/hlds_code_util.m	14 Dec 2010 11:28:08 -0000
@@ -48,7 +48,6 @@
 :- import_module check_hlds.mode_util.
 :- import_module hlds.hlds_goal.
 :- import_module hlds.hlds_pred.
-:- import_module libs.compiler_util.
 :- import_module libs.globals.
 :- import_module libs.options.
 :- import_module mdbcomp.prim_data.
@@ -57,6 +56,7 @@
 :- import_module bool.
 :- import_module char.
 :- import_module map.
+:- import_module require.
 :- import_module set.
 :- import_module string.
 
Index: compiler/hlds_data.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/hlds_data.m,v
retrieving revision 1.128
diff -u -b -r1.128 hlds_data.m
--- compiler/hlds_data.m	16 Sep 2010 00:39:03 -0000	1.128
+++ compiler/hlds_data.m	14 Dec 2010 11:28:08 -0000
@@ -34,13 +34,13 @@
 :- implementation.
 
 :- import_module check_hlds.type_util.
-:- import_module libs.compiler_util.
 :- import_module parse_tree.prog_type_subst.
 :- import_module parse_tree.prog_util.
 
 :- import_module cord.
 :- import_module int.
 :- import_module multi_map.
+:- import_module require.
 :- import_module svmap.
 :- import_module varset.
 
Index: compiler/hlds_error_util.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/hlds_error_util.m,v
retrieving revision 1.27
diff -u -b -r1.27 hlds_error_util.m
--- compiler/hlds_error_util.m	14 Aug 2009 20:37:46 -0000	1.27
+++ compiler/hlds_error_util.m	14 Dec 2010 11:28:08 -0000
@@ -116,7 +116,6 @@
 
 :- import_module hlds.special_pred.
 :- import_module mdbcomp.prim_data.
-:- import_module libs.compiler_util.
 :- import_module parse_tree.mercury_to_mercury.
 :- import_module parse_tree.prog_mode.
 :- import_module parse_tree.prog_out.
@@ -125,6 +124,7 @@
 :- import_module int.
 :- import_module string.
 :- import_module list.
+:- import_module require.
 :- import_module term.
 
 %-----------------------------------------------------------------------------%
Index: compiler/hlds_goal.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/hlds_goal.m,v
retrieving revision 1.216
diff -u -b -r1.216 hlds_goal.m
--- compiler/hlds_goal.m	1 Nov 2010 05:21:17 -0000	1.216
+++ compiler/hlds_goal.m	14 Dec 2010 11:28:09 -0000
@@ -1785,7 +1785,6 @@
 
 :- implementation.
 
-:- import_module libs.compiler_util.
 :- import_module parse_tree.builtin_lib_types.
 :- import_module parse_tree.prog_mode.
 :- import_module parse_tree.prog_type.
@@ -1793,6 +1792,7 @@
 :- import_module assoc_list.
 :- import_module cord.
 :- import_module map.
+:- import_module require.
 :- import_module string.
 :- import_module svmap.
 :- import_module svvarset.
Index: compiler/hlds_llds.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/hlds_llds.m,v
retrieving revision 1.23
diff -u -b -r1.23 hlds_llds.m
--- compiler/hlds_llds.m	4 Nov 2009 03:44:47 -0000	1.23
+++ compiler/hlds_llds.m	14 Dec 2010 11:28:09 -0000
@@ -278,11 +278,11 @@
 :- implementation.
 
 :- import_module hlds.goal_util.
-:- import_module libs.compiler_util.
 
 :- import_module assoc_list.
 :- import_module list.
 :- import_module pair.
+:- import_module require.
 :- import_module string.
 :- import_module varset.
 
Index: compiler/hlds_module.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/hlds_module.m,v
retrieving revision 1.166
diff -u -b -r1.166 hlds_module.m
--- compiler/hlds_module.m	30 Jul 2010 05:16:11 -0000	1.166
+++ compiler/hlds_module.m	14 Dec 2010 11:28:09 -0000
@@ -661,13 +661,13 @@
 
 :- implementation.
 
-:- import_module libs.compiler_util.
 :- import_module parse_tree.file_names.
 :- import_module parse_tree.module_imports.
 :- import_module parse_tree.prog_util.
 
 :- import_module assoc_list.
 :- import_module counter.
+:- import_module require.
 
 :- pred module_info_get_lambdas_per_context(module_info::in,
     map(prog_context, counter)::out) is det.
Index: compiler/hlds_out_mode.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/hlds_out_mode.m,v
retrieving revision 1.1
diff -u -b -r1.1 hlds_out_mode.m
--- compiler/hlds_out_mode.m	4 Nov 2009 03:44:47 -0000	1.1
+++ compiler/hlds_out_mode.m	14 Dec 2010 11:28:09 -0000
@@ -72,13 +72,13 @@
 
 :- import_module check_hlds.mode_util.
 :- import_module hlds.instmap.
-:- import_module libs.compiler_util.
 :- import_module mdbcomp.prim_data.
 :- import_module parse_tree.mercury_to_mercury.
 :- import_module parse_tree.prog_io_util.
 :- import_module parse_tree.prog_util.
 
 :- import_module pair.
+:- import_module require.
 :- import_module set.
 :- import_module term.
 :- import_module varset.
Index: compiler/hlds_out_module.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/hlds_out_module.m,v
retrieving revision 1.2
diff -u -b -r1.2 hlds_out_module.m
--- compiler/hlds_out_module.m	30 Jul 2010 05:16:11 -0000	1.2
+++ compiler/hlds_out_module.m	14 Dec 2010 11:28:09 -0000
@@ -45,7 +45,6 @@
 :- import_module hlds.hlds_out.hlds_out_goal.
 :- import_module hlds.hlds_out.hlds_out_pred.
 :- import_module hlds.pred_table.
-:- import_module libs.compiler_util.
 :- import_module libs.globals.
 :- import_module libs.options.
 :- import_module parse_tree.mercury_to_mercury.
@@ -56,6 +55,7 @@
 :- import_module map.
 :- import_module maybe.
 :- import_module pair.
+:- import_module require.
 :- import_module set.
 :- import_module string.
 :- import_module term.
Index: compiler/hlds_out_pred.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/hlds_out_pred.m,v
retrieving revision 1.1
diff -u -b -r1.1 hlds_out_pred.m
--- compiler/hlds_out_pred.m	4 Nov 2009 03:44:47 -0000	1.1
+++ compiler/hlds_out_pred.m	14 Dec 2010 11:28:09 -0000
@@ -78,7 +78,6 @@
 :- import_module hlds.hlds_out.hlds_out_goal.
 :- import_module hlds.hlds_out.hlds_out_mode.
 :- import_module hlds.hlds_rtti.
-:- import_module libs.compiler_util.
 :- import_module mdbcomp.program_representation.
 :- import_module parse_tree.mercury_to_mercury.
 :- import_module parse_tree.prog_ctgc.
@@ -90,6 +89,7 @@
 :- import_module map.
 :- import_module maybe.
 :- import_module pair.
+:- import_module require.
 :- import_module string.
 :- import_module term.
 :- import_module varset.
Index: compiler/hlds_pred.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/hlds_pred.m,v
retrieving revision 1.261
diff -u -b -r1.261 hlds_pred.m
--- compiler/hlds_pred.m	15 Sep 2010 04:35:26 -0000	1.261
+++ compiler/hlds_pred.m	14 Dec 2010 11:28:09 -0000
@@ -47,19 +47,24 @@
 
 :- implementation.
 
+:- import_module backend_libs.
+:- import_module backend_libs.builtin_ops.
 :- import_module check_hlds.inst_match.
+:- import_module check_hlds.mode_errors.
 :- import_module check_hlds.mode_util.
 :- import_module check_hlds.type_util.
 :- import_module hlds.goal_form.
 :- import_module hlds.goal_util.
 :- import_module hlds.hlds_args.
 :- import_module hlds.hlds_rtti.
-:- import_module libs.compiler_util.
+:- import_module hlds.special_pred.
 :- import_module libs.options.
+:- import_module mdbcomp.program_representation.
 :- import_module parse_tree.prog_type.
 :- import_module parse_tree.prog_util.
 
 :- import_module int.
+:- import_module require.
 :- import_module string.
 :- import_module term.
 :- import_module unit.
@@ -2215,9 +2220,6 @@
 
 :- implementation.
 
-:- import_module check_hlds.mode_errors.
-:- import_module mdbcomp.program_representation.
-
 :- type proc_info
     --->    proc_info(
                 % The context of the `:- mode' decl (or the context of the
@@ -3114,10 +3116,6 @@
 
 :- implementation.
 
-:- import_module backend_libs.
-:- import_module backend_libs.builtin_ops.
-:- import_module hlds.special_pred.
-
 pred_info_is_builtin(PredInfo) :-
     ModuleName = pred_info_module(PredInfo),
     PredName = pred_info_name(PredInfo),
Index: compiler/hlds_rtti.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/hlds_rtti.m,v
retrieving revision 1.21
diff -u -b -r1.21 hlds_rtti.m
--- compiler/hlds_rtti.m	15 Sep 2010 07:02:01 -0000	1.21
+++ compiler/hlds_rtti.m	14 Dec 2010 11:28:09 -0000
@@ -332,12 +332,12 @@
 :- implementation.
 
 :- import_module check_hlds.mode_util.
-:- import_module libs.compiler_util.
 :- import_module parse_tree.prog_type.
 :- import_module parse_tree.prog_type_subst.
 
 :- import_module map.
 :- import_module pair.
+:- import_module require.
 :- import_module set_tree234.
 :- import_module string.
 :- import_module svmap.
Index: compiler/ilasm.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/ilasm.m,v
retrieving revision 1.55
diff -u -b -r1.55 ilasm.m
--- compiler/ilasm.m	14 Oct 2009 05:28:34 -0000	1.55
+++ compiler/ilasm.m	14 Dec 2010 11:28:09 -0000
@@ -343,7 +343,6 @@
 :- implementation.
 
 :- import_module backend_libs.c_util. % for output_float_literal
-:- import_module libs.compiler_util.
 :- import_module libs.options.
 
 :- import_module char.
@@ -351,6 +350,7 @@
 :- import_module int.
 :- import_module pair.
 :- import_module pprint.
+:- import_module require.
 :- import_module string.
 :- import_module term_io.
 :- import_module varset.
Index: compiler/ilds.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/ilds.m,v
retrieving revision 1.29
diff -u -b -r1.29 ilds.m
--- compiler/ilds.m	10 Mar 2009 05:00:31 -0000	1.29
+++ compiler/ilds.m	14 Dec 2010 11:28:10 -0000
@@ -437,9 +437,8 @@
 
 :- implementation.
 
-:- import_module libs.compiler_util.
-
 :- import_module int.
+:- import_module require.
 
 %-----------------------------------------------------------------------------%
 
Index: compiler/implementation_defined_literals.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/implementation_defined_literals.m,v
retrieving revision 1.9
diff -u -b -r1.9 implementation_defined_literals.m
--- compiler/implementation_defined_literals.m	30 Jul 2010 05:16:11 -0000	1.9
+++ compiler/implementation_defined_literals.m	14 Dec 2010 11:28:10 -0000
@@ -35,7 +35,6 @@
 :- import_module hlds.hlds_out.hlds_out_util.
 :- import_module hlds.hlds_pred.
 :- import_module libs.
-:- import_module libs.compiler_util.
 :- import_module libs.handle_options.
 :- import_module mdbcomp.
 :- import_module mdbcomp.prim_data.
@@ -44,6 +43,7 @@
 
 :- import_module list.
 :- import_module map.
+:- import_module require.
 :- import_module term.
 
 :- type subst_literals_info
Index: compiler/inlining.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/inlining.m,v
retrieving revision 1.168
diff -u -b -r1.168 inlining.m
--- compiler/inlining.m	16 Sep 2010 00:39:03 -0000	1.168
+++ compiler/inlining.m	14 Dec 2010 11:28:10 -0000
@@ -153,7 +153,6 @@
 :- import_module hlds.goal_util.
 :- import_module hlds.passes_aux.
 :- import_module hlds.quantification.
-:- import_module libs.compiler_util.
 :- import_module libs.globals.
 :- import_module libs.options.
 :- import_module libs.trace_params.
@@ -171,6 +170,7 @@
 :- import_module maybe.
 :- import_module multi_map.
 :- import_module pair.
+:- import_module require.
 :- import_module set.
 :- import_module svset.
 :- import_module term.
Index: compiler/inst_graph.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/inst_graph.m,v
retrieving revision 1.20
diff -u -b -r1.20 inst_graph.m
--- compiler/inst_graph.m	4 Nov 2009 03:44:47 -0000	1.20
+++ compiler/inst_graph.m	14 Dec 2010 11:28:10 -0000
@@ -187,8 +187,8 @@
 
 :- import_module hlds.hlds_out.
 :- import_module hlds.hlds_out.hlds_out_util.
-:- import_module libs.compiler_util.
 
+:- import_module require.
 :- import_module set.
 :- import_module term.
 :- import_module term_io.
Index: compiler/inst_match.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/inst_match.m,v
retrieving revision 1.89
diff -u -b -r1.89 inst_match.m
--- compiler/inst_match.m	8 Nov 2010 03:43:42 -0000	1.89
+++ compiler/inst_match.m	14 Dec 2010 11:28:10 -0000
@@ -319,8 +319,6 @@
 :- import_module check_hlds.inst_util.
 :- import_module check_hlds.mode_util.
 :- import_module check_hlds.type_util.
-:- import_module libs.
-:- import_module libs.compiler_util.
 :- import_module mdbcomp.
 :- import_module mdbcomp.prim_data.
 :- import_module parse_tree.prog_data.
@@ -331,6 +329,7 @@
 :- import_module list.
 :- import_module map.
 :- import_module maybe.
+:- import_module require.
 :- import_module set.
 :- import_module set_tree234.
 :- import_module svset.
Index: compiler/inst_util.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/inst_util.m,v
retrieving revision 1.60
diff -u -b -r1.60 inst_util.m
--- compiler/inst_util.m	16 Jul 2009 08:34:32 -0000	1.60
+++ compiler/inst_util.m	14 Dec 2010 11:28:10 -0000
@@ -152,8 +152,6 @@
 :- import_module check_hlds.mode_util.
 :- import_module check_hlds.type_util.
 :- import_module hlds.hlds_data.
-:- import_module libs.
-:- import_module libs.compiler_util.
 :- import_module mdbcomp.
 :- import_module mdbcomp.prim_data.
 :- import_module parse_tree.prog_mode.
@@ -163,6 +161,7 @@
 :- import_module list.
 :- import_module map.
 :- import_module pair.
+:- import_module require.
 :- import_module set.
 :- import_module svmap.
 :- import_module svset.
Index: compiler/instmap.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/instmap.m,v
retrieving revision 1.68
diff -u -b -r1.68 instmap.m
--- compiler/instmap.m	1 Oct 2010 04:31:18 -0000	1.68
+++ compiler/instmap.m	14 Dec 2010 11:28:10 -0000
@@ -359,13 +359,13 @@
 :- import_module check_hlds.inst_util.
 :- import_module check_hlds.mode_util.
 :- import_module check_hlds.type_util.
-:- import_module libs.compiler_util.
 :- import_module parse_tree.prog_data.
 
 :- import_module bool.
 :- import_module int.
 :- import_module maybe.
 :- import_module pair.
+:- import_module require.
 :- import_module std_util.
 :- import_module string.
 :- import_module svmap.
Index: compiler/intermod.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/intermod.m,v
retrieving revision 1.254
diff -u -b -r1.254 intermod.m
--- compiler/intermod.m	16 Sep 2010 00:39:03 -0000	1.254
+++ compiler/intermod.m	14 Dec 2010 11:28:10 -0000
@@ -113,7 +113,6 @@
 :- import_module hlds.hlds_pred.
 :- import_module hlds.pred_table.
 :- import_module hlds.special_pred.
-:- import_module libs.compiler_util.
 :- import_module libs.file_util.
 :- import_module libs.globals.
 :- import_module libs.options.
@@ -136,6 +135,7 @@
 :- import_module maybe.
 :- import_module multi_map.
 :- import_module pair.
+:- import_module require.
 :- import_module set.
 :- import_module solutions.
 :- import_module string.
Index: compiler/interval.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/interval.m,v
retrieving revision 1.42
diff -u -b -r1.42 interval.m
--- compiler/interval.m	2 Sep 2009 00:30:16 -0000	1.42
+++ compiler/interval.m	14 Dec 2010 11:28:10 -0000
@@ -192,13 +192,12 @@
 :- import_module hlds.goal_util.
 :- import_module hlds.hlds_llds.
 :- import_module hlds.instmap.
-:- import_module libs.
-:- import_module libs.compiler_util.
 :- import_module ll_backend.
 :- import_module ll_backend.call_gen.
 
 :- import_module assoc_list.
 :- import_module pair.
+:- import_module require.
 :- import_module svmap.
 :- import_module svset.
 :- import_module svvarset.
Index: compiler/ite_gen.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/ite_gen.m,v
retrieving revision 1.109
diff -u -b -r1.109 ite_gen.m
--- compiler/ite_gen.m	21 Oct 2009 06:36:19 -0000	1.109
+++ compiler/ite_gen.m	14 Dec 2010 11:28:10 -0000
@@ -43,7 +43,6 @@
 :- import_module hlds.hlds_module.
 :- import_module hlds.hlds_pred.
 :- import_module hlds.instmap.
-:- import_module libs.compiler_util.
 :- import_module libs.globals.
 :- import_module libs.options.
 :- import_module ll_backend.code_gen.
@@ -64,6 +63,7 @@
 :- import_module map.
 :- import_module maybe.
 :- import_module pair.
+:- import_module require.
 :- import_module set.
 :- import_module string.
 :- import_module term.
Index: compiler/jumpopt.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/jumpopt.m,v
retrieving revision 1.114
diff -u -b -r1.114 jumpopt.m
--- compiler/jumpopt.m	1 Nov 2010 04:02:55 -0000	1.114
+++ compiler/jumpopt.m	14 Dec 2010 11:28:10 -0000
@@ -64,7 +64,6 @@
 :- implementation.
 
 :- import_module backend_libs.builtin_ops.
-:- import_module libs.compiler_util.
 :- import_module ll_backend.code_util.
 :- import_module ll_backend.opt_util.
 :- import_module parse_tree.prog_data.
@@ -72,6 +71,7 @@
 :- import_module map.
 :- import_module maybe.
 :- import_module pair.
+:- import_module require.
 :- import_module string.
 :- import_module svmap.
 
Index: compiler/lambda.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/lambda.m,v
retrieving revision 1.145
diff -u -b -r1.145 lambda.m
--- compiler/lambda.m	16 Sep 2010 00:39:03 -0000	1.145
+++ compiler/lambda.m	14 Dec 2010 11:28:10 -0000
@@ -92,7 +92,6 @@
 :- import_module hlds.hlds_rtti.
 :- import_module hlds.pred_table.
 :- import_module hlds.quantification.
-:- import_module libs.compiler_util.
 :- import_module libs.globals.
 :- import_module libs.options.
 :- import_module mdbcomp.prim_data.
@@ -109,6 +108,7 @@
 :- import_module map.
 :- import_module maybe.
 :- import_module pair.
+:- import_module require.
 :- import_module set.
 :- import_module term.
 :- import_module varset.
Index: compiler/layout_out.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/layout_out.m,v
retrieving revision 1.110
diff -u -b -r1.110 layout_out.m
--- compiler/layout_out.m	21 Sep 2010 01:09:15 -0000	1.110
+++ compiler/layout_out.m	14 Dec 2010 11:28:11 -0000
@@ -175,7 +175,6 @@
 :- import_module hlds.hlds_goal.
 :- import_module hlds.hlds_rtti.
 :- import_module hlds.special_pred.
-:- import_module libs.compiler_util.
 :- import_module libs.trace_params.
 :- import_module ll_backend.llds_out.llds_out_code_addr.
 :- import_module ll_backend.llds_out.llds_out_data.
@@ -188,6 +187,7 @@
 :- import_module int.
 :- import_module map.
 :- import_module pair.
+:- import_module require.
 :- import_module string.
 :- import_module varset.
 
Index: compiler/lco.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/lco.m,v
retrieving revision 1.62
diff -u -b -r1.62 lco.m
--- compiler/lco.m	30 Jul 2010 05:16:12 -0000	1.62
+++ compiler/lco.m	14 Dec 2010 11:28:11 -0000
@@ -178,7 +178,6 @@
 :- import_module hlds.instmap.
 :- import_module hlds.pred_table.
 :- import_module hlds.quantification.
-:- import_module libs.compiler_util.
 :- import_module libs.globals.
 :- import_module libs.options.
 :- import_module mdbcomp.prim_data.
@@ -196,6 +195,7 @@
 :- import_module multi_map.
 :- import_module maybe.
 :- import_module pair.
+:- import_module require.
 :- import_module set.
 :- import_module string.
 :- import_module svbag.
Index: compiler/live_vars.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/live_vars.m,v
retrieving revision 1.141
diff -u -b -r1.141 live_vars.m
--- compiler/live_vars.m	2 Nov 2009 05:12:31 -0000	1.141
+++ compiler/live_vars.m	14 Dec 2010 11:28:11 -0000
@@ -66,11 +66,11 @@
 :- import_module hlds.hlds_llds.
 :- import_module hlds.hlds_rtti.
 :- import_module hlds.instmap.
-:- import_module libs.compiler_util.
 
 :- import_module list.
 :- import_module map.
 :- import_module pair.
+:- import_module require.
 
 %-----------------------------------------------------------------------------%
 
Index: compiler/livemap.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/livemap.m,v
retrieving revision 1.93
diff -u -b -r1.93 livemap.m
--- compiler/livemap.m	21 Oct 2009 06:36:19 -0000	1.93
+++ compiler/livemap.m	14 Dec 2010 11:28:11 -0000
@@ -40,12 +40,12 @@
 
 :- implementation.
 
-:- import_module libs.compiler_util.
 :- import_module ll_backend.opt_util.
 :- import_module parse_tree.prog_data.
 
 :- import_module bool.
 :- import_module pair.
+:- import_module require.
 :- import_module string.
 :- import_module svset.
 
Index: compiler/liveness.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/liveness.m,v
retrieving revision 1.175
diff -u -b -r1.175 liveness.m
--- compiler/liveness.m	5 Aug 2010 03:07:08 -0000	1.175
+++ compiler/liveness.m	14 Dec 2010 11:28:11 -0000
@@ -197,7 +197,6 @@
 :- import_module hlds.hlds_rtti.
 :- import_module hlds.instmap.
 :- import_module hlds.quantification.
-:- import_module libs.compiler_util.
 :- import_module libs.globals.
 :- import_module libs.options.
 :- import_module libs.trace_params.
@@ -211,6 +210,7 @@
 :- import_module map.
 :- import_module maybe.
 :- import_module pair.
+:- import_module require.
 :- import_module string.
 :- import_module svset.
 :- import_module term.
Index: compiler/llds.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/llds.m,v
retrieving revision 1.368
diff -u -b -r1.368 llds.m
--- compiler/llds.m	12 Nov 2010 02:21:58 -0000	1.368
+++ compiler/llds.m	14 Dec 2010 11:28:11 -0000
@@ -1432,9 +1432,8 @@
 
 :- implementation.
 
-:- import_module libs.compiler_util.
-
 :- import_module int.
+:- import_module require.
 
 %-----------------------------------------------------------------------------%
 
Index: compiler/llds_out_data.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/llds_out_data.m,v
retrieving revision 1.1
diff -u -b -r1.1 llds_out_data.m
--- compiler/llds_out_data.m	4 Nov 2009 03:44:48 -0000	1.1
+++ compiler/llds_out_data.m	14 Dec 2010 11:28:11 -0000
@@ -151,7 +151,6 @@
 :- import_module backend_libs.c_util.
 :- import_module backend_libs.name_mangle.
 :- import_module backend_libs.rtti.
-:- import_module libs.compiler_util.
 :- import_module ll_backend.layout_out.
 :- import_module ll_backend.llds_out.llds_out_code_addr.
 :- import_module ll_backend.rtti_out.
@@ -161,6 +160,7 @@
 :- import_module int.
 :- import_module map.
 :- import_module maybe.
+:- import_module require.
 :- import_module string.
 
 %----------------------------------------------------------------------------%
Index: compiler/llds_out_file.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/llds_out_file.m,v
retrieving revision 1.1
diff -u -b -r1.1 llds_out_file.m
--- compiler/llds_out_file.m	4 Nov 2009 03:44:48 -0000	1.1
+++ compiler/llds_out_file.m	14 Dec 2010 11:28:11 -0000
@@ -18,7 +18,6 @@
 :- module ll_backend.llds_out.llds_out_file.
 :- interface.
 
-% :- import_module hlds.hlds_llds.
 :- import_module libs.globals.
 :- import_module ll_backend.llds.
 
@@ -73,7 +72,6 @@
 :- import_module backend_libs.rtti.
 :- import_module hlds.hlds_module.
 :- import_module hlds.hlds_pred.
-:- import_module libs.compiler_util.
 :- import_module libs.options.
 :- import_module libs.trace_params.
 :- import_module ll_backend.layout.
@@ -97,6 +95,7 @@
 :- import_module maybe.
 :- import_module multi_map.
 :- import_module pair.
+:- import_module require.
 :- import_module set.
 :- import_module set_tree234.
 :- import_module string.
Index: compiler/llds_out_global.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/llds_out_global.m,v
retrieving revision 1.2
diff -u -b -r1.2 llds_out_global.m
--- compiler/llds_out_global.m	10 Nov 2009 04:23:36 -0000	1.2
+++ compiler/llds_out_global.m	14 Dec 2010 11:28:11 -0000
@@ -54,7 +54,6 @@
 :- import_module backend_libs.name_mangle.
 :- import_module backend_libs.rtti.
 :- import_module hlds.hlds_pred.
-:- import_module libs.compiler_util.
 :- import_module ll_backend.llds_out.llds_out_data.
 :- import_module mdbcomp.prim_data.
 :- import_module parse_tree.prog_data.
@@ -64,6 +63,7 @@
 :- import_module int.
 :- import_module maybe.
 :- import_module pair.
+:- import_module require.
 :- import_module string.
 
 %----------------------------------------------------------------------------%
Index: compiler/llds_out_instr.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/llds_out_instr.m,v
retrieving revision 1.3
diff -u -b -r1.3 llds_out_instr.m
--- compiler/llds_out_instr.m	8 Nov 2010 03:43:42 -0000	1.3
+++ compiler/llds_out_instr.m	14 Dec 2010 11:28:11 -0000
@@ -60,7 +60,6 @@
 :- import_module check_hlds.type_util.
 :- import_module hlds.hlds_data.
 :- import_module hlds.hlds_pred.
-:- import_module libs.compiler_util.
 :- import_module ll_backend.layout.
 :- import_module ll_backend.layout_out.
 :- import_module ll_backend.llds_out.llds_out_code_addr.
@@ -77,6 +76,7 @@
 :- import_module int.
 :- import_module map.
 :- import_module maybe.
+:- import_module require.
 :- import_module set.
 :- import_module string.
 :- import_module term.
Index: compiler/llds_to_x86_64.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/llds_to_x86_64.m,v
retrieving revision 1.15
diff -u -b -r1.15 llds_to_x86_64.m
--- compiler/llds_to_x86_64.m	12 Nov 2010 02:21:59 -0000	1.15
+++ compiler/llds_to_x86_64.m	14 Dec 2010 11:28:11 -0000
@@ -49,7 +49,6 @@
 
 :- import_module backend_libs.builtin_ops.
 :- import_module backend_libs.name_mangle.
-:- import_module libs.compiler_util.
 :- import_module ll_backend.llds_out.
 :- import_module ll_backend.llds_out.llds_out_code_addr.
 :- import_module ll_backend.x86_64_out.
@@ -60,6 +59,7 @@
 :- import_module int.
 :- import_module io.
 :- import_module maybe.
+:- import_module require.
 :- import_module set.
 :- import_module string.
 
Index: compiler/lookup_switch.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/lookup_switch.m,v
retrieving revision 1.87
diff -u -b -r1.87 lookup_switch.m
--- compiler/lookup_switch.m	30 Nov 2010 04:06:53 -0000	1.87
+++ compiler/lookup_switch.m	14 Dec 2010 11:28:11 -0000
@@ -170,7 +170,6 @@
 :- import_module check_hlds.type_util.
 :- import_module hlds.code_model.
 :- import_module hlds.goal_form.
-:- import_module libs.compiler_util.
 :- import_module libs.globals.
 :- import_module libs.options.
 :- import_module ll_backend.continuation_info.
@@ -184,6 +183,7 @@
 :- import_module int.
 :- import_module maybe.
 :- import_module pair.
+:- import_module require.
 :- import_module std_util.
 :- import_module string.
 :- import_module svmap.
Index: compiler/lookup_util.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/lookup_util.m,v
retrieving revision 1.13
diff -u -b -r1.13 lookup_util.m
--- compiler/lookup_util.m	1 Nov 2010 04:02:56 -0000	1.13
+++ compiler/lookup_util.m	14 Dec 2010 11:28:11 -0000
@@ -82,7 +82,6 @@
 :- import_module hlds.code_model.
 :- import_module hlds.hlds_module.
 :- import_module hlds.instmap.
-:- import_module libs.compiler_util.
 :- import_module libs.globals.
 :- import_module ll_backend.code_gen.
 :- import_module ll_backend.exprn_aux.
@@ -92,6 +91,7 @@
 :- import_module int.
 :- import_module maybe.
 :- import_module pair.
+:- import_module require.
 
 figure_out_output_vars(CI, GoalInfo, OutVars) :-
     InstMapDelta = goal_info_get_instmap_delta(GoalInfo),
Index: compiler/loop_inv.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/loop_inv.m,v
retrieving revision 1.55
diff -u -b -r1.55 loop_inv.m
--- compiler/loop_inv.m	15 Sep 2010 02:28:56 -0000	1.55
+++ compiler/loop_inv.m	14 Dec 2010 11:28:11 -0000
@@ -125,7 +125,6 @@
 :- import_module hlds.hlds_goal.
 :- import_module hlds.instmap.
 :- import_module hlds.quantification.
-:- import_module libs.compiler_util.
 :- import_module mdbcomp.prim_data.
 :- import_module parse_tree.prog_data.
 :- import_module parse_tree.prog_util.
@@ -136,6 +135,7 @@
 :- import_module list.
 :- import_module maybe.
 :- import_module pair.
+:- import_module require.
 :- import_module set.
 :- import_module string.
 :- import_module term.
Index: compiler/lp.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/lp.m,v
retrieving revision 1.19
diff -u -b -r1.19 lp.m
--- compiler/lp.m	23 Nov 2007 07:35:10 -0000	1.19
+++ compiler/lp.m	14 Dec 2010 11:55:21 -0000
@@ -88,12 +88,11 @@
 
 :- implementation.
 
-:- import_module libs.compiler_util.
-
 :- import_module bool.
 :- import_module float.
 :- import_module int.
 :- import_module maybe.
+:- import_module require.
 :- import_module set.
 :- import_module solutions.
 :- import_module string.
@@ -104,15 +103,16 @@
 %-----------------------------------------------------------------------------%
 
 :- type lp_info
-    --->    lp(
-                varset  :: varset,
-                urs_map :: map(var, pair(var)),
-                            % Map from variables with URS to the
-                            % corresponding pair of variables that
-                            % represent that variable in the standard
+    --->    lp_info(
+                lpi_varset                  :: varset,
+
+                % Map from variables with URS to the corresponding pair
+                % of variables that represent that variable in the standard
                             % form (x = x' - x'', x', x'' >= 0).
-                slack_vars :: list(var),      % slack variables
-                artificial_vars :: list(var)  % artificial variables
+                lpi_urs_map                 :: map(var, pair(var)),
+
+                lpi_slack_vars              :: list(var),
+                lpi_art_vars                :: list(var)
             ).
 
 %-----------------------------------------------------------------------------%
@@ -152,7 +152,7 @@
     ),
     simplify_coeffs(Obj1, Obj2),
 
-    get_urs_vars(URS, !.Info, _),
+    get_urs_vars(!.Info, URS),
     expand_urs_vars(Obj2, URS, Obj),
     list.length(Eqns, Rows),
     collect_vars(Eqns, Obj, Vars),
@@ -160,7 +160,7 @@
     list.length(VarList, Cols),
     map.init(VarNums0),
     number_vars(VarList, 0, VarNums0, VarNums),
-    get_art_vars(ArtVars, !Info),
+    get_art_vars(!.Info, ArtVars),
     some [!Tableau] (
         init_tableau(Rows, Cols, VarNums, URS, !:Tableau),
         insert_equations(Eqns, 1, Cols, VarNums, !Tableau),
@@ -287,7 +287,7 @@
         new_slack_var(Var, !Info),
         Coeffs = [Var - 1.0 | Coeffs0],
         simplify_eq(eqn(Coeffs, (=<), Const0), Eqn1),
-        get_urs_vars(URS, !Info),
+        get_urs_vars(!.Info, URS),
         expand_urs_vars_e(Eqn1, URS, Eqn)
     ).
 
@@ -300,7 +300,7 @@
         new_art_var(Var, !Info),
         Coeffs = [Var - 1.0 | Coeffs0],
         simplify_eq(eqn(Coeffs, (=<), Const0), Eqn1),
-        get_urs_vars(URS, !Info),
+        get_urs_vars(!.Info, URS),
         expand_urs_vars_e(Eqn1, URS, Eqn)
     ).
 
@@ -314,7 +314,7 @@
         new_art_var(AVar, !Info),
         Coeffs = [SVar - (-1.0), AVar - (1.0) | Coeffs0],
         simplify_eq(eqn(Coeffs, (>=), Const0), Eqn1),
-        get_urs_vars(URS, !Info),
+        get_urs_vars(!.Info, URS),
         expand_urs_vars_e(Eqn1, URS, Eqn)
     ).
 
@@ -603,9 +603,7 @@
         )
     ),
     solutions.aggregate(all_rows(!.Tableau), BasisAgg, [], Res),
-    (
-        Res = [1.0 - Row]
-    ->
+    ( Res = [1.0 - Row] ->
         PivGoal = (pred(Col1::out) is nondet :-
             all_cols(!.Tableau, Col1),
             Col \= Col1,
@@ -630,7 +628,8 @@
 
 %-----------------------------------------------------------------------------%
 
-:- type cell ---> cell(int, int).
+:- type cell
+    --->    cell(int, int).
 
 :- pred pivot(int::in, int::in, tableau::in, tableau::out) is det.
 
@@ -832,75 +831,54 @@
     ),
     map.init(URSMap0),
     list.foldl(Introduce, URSVars, Varset0 - URSMap0, Varset - URSMap),
-    LPInfo = lp(Varset, URSMap, [], []).
+    LPInfo = lp_info(Varset, URSMap, [], []).
 
 :- pred new_slack_var(var::out, lp_info::in, lp_info::out) is det.
 
 new_slack_var(Var, !Info) :-
     some [!Varset] (
-        get_varset(!:Varset, !Info),
+        get_varset(!.Info, !:Varset),
         svvarset.new_var(Var, !Varset),
         set_varset(!.Varset, !Info)
     ),
-    get_slack_vars(Vars, !Info),
+    get_slack_vars(!.Info, Vars),
     set_slack_vars([Var | Vars], !Info).
 
 :- pred new_art_var(var::out, lp_info::in, lp_info::out) is det.
 
 new_art_var(Var, !Info) :-
     some [!Varset] (
-        get_varset(!:Varset, !Info),
+        get_varset(!.Info, !:Varset),
         svvarset.new_var(Var, !Varset),
         set_varset(!.Varset, !Info)
     ),
-    get_art_vars(Vars, !Info),
+    get_art_vars(!.Info, Vars),
     set_art_vars([Var | Vars], !Info).
 
-:- pred get_varset(varset::out, lp_info::in, lp_info::out) is det.
-
-get_varset(Varset, Info, Info) :-
-    Info = lp(Varset, _URSVars, _Slack, _Art).
+:- pred get_varset(lp_info::in, varset::out) is det.
+:- pred get_urs_vars(lp_info::in, map(var, pair(var))::out) is det.
+:- pred get_slack_vars(lp_info::in, list(var)::out) is det.
+:- pred get_art_vars(lp_info::in, list(var)::out) is det.
+
+get_varset(Info, Info ^ lpi_varset).
+get_urs_vars(Info, Info ^ lpi_urs_map).
+get_slack_vars(Info, Info ^ lpi_slack_vars).
+get_art_vars(Info, Info ^ lpi_art_vars).
 
 :- pred set_varset(varset::in, lp_info::in, lp_info::out) is det.
-
-set_varset(Varset, Info0, Info) :-
-    Info0 = lp(_Varset, URSVars, Slack, Art),
-    Info  = lp(Varset, URSVars, Slack, Art).
-
-:- pred get_urs_vars(map(var, pair(var))::out, lp_info::in, lp_info::out)
-    is det.
-
-get_urs_vars(URSVars, Info, Info) :-
-    Info = lp(_Varset, URSVars, _Slack, _Art).
-
 :- pred set_urs_vars(map(var, pair(var))::in, lp_info::in, lp_info::out)
     is det.
-
-set_urs_vars(URSVars, Info0, Info) :-
-    Info0 = lp(Varset, _URSVars, Slack, Art),
-    Info  = lp(Varset, URSVars, Slack, Art).
-
-:- pred get_slack_vars(list(var)::out, lp_info::in, lp_info::out) is det.
-
-get_slack_vars(Slack, Info, Info) :-
-    Info = lp(_Varset, _URSVars, Slack, _Art).
-
 :- pred set_slack_vars(list(var)::in, lp_info::in, lp_info::out) is det.
-
-set_slack_vars(Slack, Info0, Info) :-
-    Info0 = lp(Varset, URSVars, _Slack, Art),
-    Info  = lp(Varset, URSVars, Slack, Art).
-
-:- pred get_art_vars(list(var)::out, lp_info::in, lp_info::out) is det.
-
-get_art_vars(Art, Info, Info) :-
-    Info = lp(_Varset, _URSVars, _Slack, Art).
-
 :- pred set_art_vars(list(var)::in, lp_info::in, lp_info::out) is det.
 
-set_art_vars(Art, Info0, Info) :-
-    Info0 = lp(Varset, URSVars, Slack, _Art),
-    Info  = lp(Varset, URSVars, Slack, Art).
+set_varset(Varset, !Info) :-
+    !Info ^ lpi_varset := Varset.
+set_urs_vars(URSVars, !Info) :-
+    !Info ^ lpi_urs_map := URSVars.
+set_slack_vars(Slack, !Info) :-
+    !Info ^ lpi_slack_vars := Slack.
+set_art_vars(Art, !Info) :-
+    !Info ^ lpi_art_vars := Art.
 
 %-----------------------------------------------------------------------------%
 
Index: compiler/lp_rational.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/lp_rational.m,v
retrieving revision 1.13
diff -u -b -r1.13 lp_rational.m
--- compiler/lp_rational.m	8 Sep 2009 02:43:33 -0000	1.13
+++ compiler/lp_rational.m	14 Dec 2010 11:52:42 -0000
@@ -177,7 +177,7 @@
 
 %-----------------------------------------------------------------------------%
 %
-% Bounding boxes and other approximations
+% Bounding boxes and other approximations.
 %
     % Approximate the solution space of a set of constraints using
     % a bounding box. If the system is inconsistent then the resulting
@@ -193,7 +193,7 @@
 
 %-----------------------------------------------------------------------------%
 %
-% Linear solver
+% Linear solver.
 %
 
 :- type objective == lp_terms.
@@ -223,7 +223,7 @@
 
 %-----------------------------------------------------------------------------%
 %
-% Projection
+% Projection.
 %
 
 :- type projection_result
@@ -260,7 +260,7 @@
 
 %-----------------------------------------------------------------------------%
 %
-% Entailment
+% Entailment.
 %
 
 :- type entailment_result
@@ -291,7 +291,7 @@
 
 %-----------------------------------------------------------------------------%
 %
-% Stuff for intermodule optimization
+% Stuff for intermodule optimization.
 %
 
     % A function that converts an lp_var into a string.
@@ -306,7 +306,7 @@
 
 %-----------------------------------------------------------------------------%
 %
-% Debugging predicates
+% Debugging predicates.
 %
 
     % Print out the constraints using the names in the varset.  If the
@@ -328,11 +328,10 @@
 
 :- implementation.
 
-:- import_module libs.compiler_util.
-
 :- import_module assoc_list.
 :- import_module bool.
 :- import_module int.
+:- import_module require.
 :- import_module solutions.
 :- import_module string.
 :- import_module svmap.
@@ -340,7 +339,7 @@
 
 %-----------------------------------------------------------------------------%
 %
-% Constraints
+% Constraints.
 %
 
     % The following properties should hold for each constraint:
@@ -761,31 +760,31 @@
 % XXX Most of this came from lp.m.  We should try to remove a lot of
 % nondeterminism here.
 
-:- type lp_info
-    --->    lp(
-                varset     :: lp_varset,
-                slack_vars :: lp_vars,  % - slack variables.
-                art_vars   :: lp_vars   % - artificial variables.
+:- type lpr_info
+    --->    lpr_info(
+                lpr_varset     :: lp_varset,
+                lpr_slack_vars :: lp_vars,
+                lpr_art_vars   :: lp_vars
             ).
 
 lp_rational.solve(Constraints, Direction, Objective, Varset) = Result :-
-    Info0 = lp_info_init(Varset),
+    Info0 = lpr_info_init(Varset),
     solve_2(Constraints, Direction, Objective, Result, Info0, _).
 
-    % solve_2(Eqns, Dir, Obj, Res, LPInfo0, LPInfo) takes a list
+    % solve_2(Eqns, Dir, Obj, Res, LPRInfo0, LPRInfo) takes a list
     % of inequalities `Eqns', a direction for optimization `Dir', an
-    % objective function `Obj' and an lp_info structure `LPInfo0'.
+    % objective function `Obj' and an lpr_info structure `LPRInfo0'.
     % See inline comments for details on the algorithm.
     %
 :- pred solve_2(constraints::in, direction::in, objective::in,
-    lp_result::out, lp_info::in, lp_info::out) is det.
+    lp_result::out, lpr_info::in, lpr_info::out) is det.
 
-solve_2(!.Constraints, Direction, !.Objective, Result, !LPInfo) :-
+solve_2(!.Constraints, Direction, !.Objective, Result, !LPRInfo) :-
     % Simplify the inequalities and convert them to standard form by
     % introducing slack/artificial variables.
 
     Obj = !.Objective,
-    lp_standardize_constraints(!Constraints, !LPInfo),
+    lp_standardize_constraints(!Constraints, !LPRInfo),
 
     % If we are maximizing the objective function then we need
     % to negate all the coefficients in the objective.
@@ -801,7 +800,7 @@
     VarList = set.to_sorted_list(Vars),
     Columns = list.length(VarList),
     VarNums = number_vars(VarList, 0),
-    ArtVars = !.LPInfo ^ art_vars,
+    ArtVars = !.LPRInfo ^ lpr_art_vars,
     Tableau0 = init_tableau(Rows, Columns, VarNums),
     insert_constraints(!.Constraints, 1, Columns, VarNums, Tableau0, Tableau),
     (
@@ -880,43 +879,43 @@
 %-----------------------------------------------------------------------------%
 
 :- pred lp_standardize_constraints(constraints::in, constraints::out,
-    lp_info::in, lp_info::out) is det.
+    lpr_info::in, lpr_info::out) is det.
 
-lp_standardize_constraints(!Constraints, !LPInfo) :-
-    list.map_foldl(lp_standardize_constraint, !Constraints, !LPInfo).
+lp_standardize_constraints(!Constraints, !LPRInfo) :-
+    list.map_foldl(lp_standardize_constraint, !Constraints, !LPRInfo).
 
     % standardize_constraint performs the following operations on a
     % constraint:
-    %   - ensures the constant is >= 0
-    %       (multiplying by -1 if necessary)
+    %
+    %   - ensures the constant is >= 0 (multiplying by -1 if necessary)
     %   - introduces slack and artificial variables
     %
 :- pred lp_standardize_constraint(constraint::in, constraint::out,
-    lp_info::in, lp_info::out) is det.
+    lpr_info::in, lpr_info::out) is det.
 
-lp_standardize_constraint(Constr0 @ lte(Coeffs, Const), Constr, !LPInfo) :-
+lp_standardize_constraint(Constr0 @ lte(Coeffs, Const), Constr, !LPRInfo) :-
     ( Const < zero ->
         Constr1 = negate_constraint(Constr0),
-        lp_standardize_constraint(Constr1, Constr, !LPInfo)
+        lp_standardize_constraint(Constr1, Constr, !LPRInfo)
     ;
-        new_slack_var(Var, !LPInfo),
+        new_slack_var(Var, !LPRInfo),
         Constr = lte([Var - one | Coeffs], Const)
     ).
-lp_standardize_constraint(Eqn0 @ eq(Coeffs, Const), Eqn, !LPInfo) :-
+lp_standardize_constraint(Eqn0 @ eq(Coeffs, Const), Eqn, !LPRInfo) :-
     ( Const < zero ->
         Eqn1 = negate_constraint(Eqn0),
-        lp_standardize_constraint(Eqn1, Eqn, !LPInfo)
+        lp_standardize_constraint(Eqn1, Eqn, !LPRInfo)
     ;
-        new_art_var(Var, !LPInfo),
+        new_art_var(Var, !LPRInfo),
         Eqn = lte([Var - one | Coeffs], Const)
     ).
-lp_standardize_constraint(Eqn0 @ gte(Coeffs, Const), Eqn, !LPInfo) :-
+lp_standardize_constraint(Eqn0 @ gte(Coeffs, Const), Eqn, !LPRInfo) :-
     ( Const < zero ->
         Eqn1 = negate_constraint(Eqn0),
-        lp_standardize_constraint(Eqn1, Eqn, !LPInfo)
+        lp_standardize_constraint(Eqn1, Eqn, !LPRInfo)
     ;
-        new_slack_var(SVar, !LPInfo),
-        new_art_var(AVar, !LPInfo),
+        new_slack_var(SVar, !LPRInfo),
+        new_art_var(AVar, !LPRInfo),
         Eqn = gte([AVar - one, SVar - (-one) | Coeffs], Const)
     ).
 
@@ -1362,25 +1361,25 @@
 
 %-----------------------------------------------------------------------------%
 
-:- func lp_info_init(lp_varset) = lp_info.
+:- func lpr_info_init(lp_varset) = lpr_info.
 
-lp_info_init(Varset) = lp(Varset, [], []).
+lpr_info_init(Varset) = lpr_info(Varset, [], []).
 
-:- pred new_slack_var(lp_var::out, lp_info::in, lp_info::out) is det.
+:- pred new_slack_var(lp_var::out, lpr_info::in, lpr_info::out) is det.
 
-new_slack_var(Var, !LPInfo) :-
-    varset.new_var(!.LPInfo ^ varset, Var, Varset),
-    !:LPInfo = !.LPInfo ^ varset := Varset,
-    Vars = !.LPInfo ^ slack_vars,
-    !:LPInfo = !.LPInfo ^ slack_vars := [Var | Vars].
+new_slack_var(Var, !LPRInfo) :-
+    varset.new_var(!.LPRInfo ^ lpr_varset, Var, Varset),
+    !LPRInfo ^ lpr_varset := Varset,
+    Vars = !.LPRInfo ^ lpr_slack_vars,
+    !LPRInfo ^ lpr_slack_vars := [Var | Vars].
 
-:- pred new_art_var(lp_var::out, lp_info::in, lp_info::out) is det.
+:- pred new_art_var(lp_var::out, lpr_info::in, lpr_info::out) is det.
 
-new_art_var(Var, !LPInfo) :-
-    varset.new_var(!.LPInfo ^ varset, Var, Varset),
-    !:LPInfo = !.LPInfo ^ varset := Varset,
-    Vars = !.LPInfo ^ art_vars,
-    !:LPInfo = !.LPInfo ^ art_vars := [Var | Vars].
+new_art_var(Var, !LPRInfo) :-
+    varset.new_var(!.LPRInfo ^ lpr_varset, Var, Varset),
+    !LPRInfo ^ lpr_varset := Varset,
+    Vars = !.LPRInfo ^ lpr_art_vars,
+    !LPRInfo ^ lpr_art_vars := [Var | Vars].
 
 %-----------------------------------------------------------------------------%
 
@@ -1426,13 +1425,12 @@
 
 :- type vector
     ---> vector(
-        label :: set(int),
             % The vector's label is for redundancy checking
             % during Fourier elimination - see below.
+                label :: set(int),
 
+                % A map from each variable in the vector to its coefficient.
         terms :: map(lp_var, coefficient),
-            % A map from each variable in the vector to its
-            % coefficient
 
         const :: constant
     ).
@@ -1493,7 +1491,7 @@
 
 %-----------------------------------------------------------------------------%
 %
-% Convert each constraint into `=<' form and give each an initial label
+% Convert each constraint into `=<' form and give each an initial label.
 %
 
 :- func constraints_to_matrix(constraints) = matrix.
@@ -1959,9 +1957,10 @@
 
 collect_remaining_vars([], _) = [].
 collect_remaining_vars([Var - _ | Rest], TargetVar) = Result :-
-    ( if    Var = TargetVar
-      then  Result = collect_remaining_vars(Rest, TargetVar)
-      else  Result = [ Var | collect_remaining_vars(Rest, TargetVar) ]
+    ( if Var = TargetVar then
+        Result = collect_remaining_vars(Rest, TargetVar)
+      else
+        Result = [Var | collect_remaining_vars(Rest, TargetVar)]
     ).
 
 :- func find_max(list(pair(lp_var, int))) = lp_var.
@@ -1974,14 +1973,16 @@
 
 find_max_2([], Best) = Best.
 find_max_2([Var1 - ExpnNum1 | Vars], Var0 - ExpnNum0) =
-    ( if    ExpnNum1 < ExpnNum0
-      then  find_max_2(Vars, Var1 - ExpnNum1)
-      else  find_max_2(Vars, Var0 - ExpnNum0)
+    ( if ExpnNum1 < ExpnNum0 then
+        find_max_2(Vars, Var1 - ExpnNum1)
+      else
+        find_max_2(Vars, Var0 - ExpnNum0)
     ).
 
 :- pred relevant(pair(lp_var, int)::in) is semidet.
 
-relevant(Var) :- Var \= _ - 0.
+relevant(Var) :-
+    Var \= _ - 0.
 
     % Given a list of variables and a system of linear inequalities
     % generate the expansion number for each of the variables in the
@@ -2080,16 +2081,18 @@
 normalize_constraint(Var, Constraint0, Constraint) :-
     lp_rational.deconstruct_constraint(Constraint0, Terms0, Op0, Constant0),
     ( assoc_list.search(Terms0, Var, Coefficient) ->
-        ( if    Coefficient = zero
-          then  unexpected(this_file,
+        ( if Coefficient = zero then
+            unexpected(this_file,
                     "normalize_constraint/3: zero coefficient constraint.")
-          else  true
+          else
+            true
         ),
         Terms = list.map((func(V - C) = V - (C / Coefficient)), Terms0),
         Constant = Constant0 / Coefficient,
-        ( if    Coefficient < zero
-          then  Op = negate_operator(Op0)
-          else  Op = Op0
+        ( if Coefficient < zero then
+            Op = negate_operator(Op0)
+          else
+            Op = Op0
         )
     ;
         % In this case the the coefficient of the variable was zero
@@ -2110,13 +2113,14 @@
     ),
     AddVal = (pred(Var::in, Coeffs0::in, Coeffs::out) is det :-
         NumA = TermsA ^ det_elem(Var),
-        ( if    Coeffs0 ^ elem(Var) = Num1
-          then
-                ( if    NumA + Num1 = zero
-                  then  Coeffs = map.delete(Coeffs0, Var)
-                  else  Coeffs = map.det_update(Coeffs0, Var, NumA + Num1)
+        ( if Coeffs0 ^ elem(Var) = Num1 then
+            ( if NumA + Num1 = zero then
+                Coeffs = map.delete(Coeffs0, Var)
+              else
+                Coeffs = map.det_update(Coeffs0, Var, NumA + Num1)
                 )
-          else  Coeffs = map.det_insert(Coeffs0, Var, NumA)
+          else
+            Coeffs = map.det_insert(Coeffs0, Var, NumA)
         )
     ),
     solutions.aggregate(IsMapKey, AddVal, TermsB, Terms).
@@ -2130,8 +2134,7 @@
     % XXX It would be preferable not to use this as it can be very slow.
     %
 remove_some_entailed_constraints(Varset, Constraints0, Constraints) :-
-    remove_some_entailed_constraints_2(Varset, Constraints0, [],
-        Constraints).
+    remove_some_entailed_constraints_2(Varset, Constraints0, [], Constraints).
 
 :- pred remove_some_entailed_constraints_2(lp_varset::in, constraints::in,
     constraints::in, constraints::out) is semidet.
@@ -2161,9 +2164,10 @@
 
 restore_equalities([], []).
 restore_equalities([E0 | Es0], [E | Es])  :-
-    ( if    check_for_equalities(E0, Es0, [], E1, Es1)
-      then  E = E1, Es2 = Es1
-      else  Es2 = Es0, E = E0
+    ( if check_for_equalities(E0, Es0, [], E1, Es1) then
+        E = E1, Es2 = Es1
+      else
+        Es2 = Es0, E = E0
     ),
     restore_equalities(Es2, Es).
 
@@ -2171,9 +2175,7 @@
     constraint::out, constraints::out) is semidet.
 
 check_for_equalities(Eqn0, [Eqn | Eqns], SoFar, NewEqn, NewEqnSet) :-
-    (
-        opposing_inequalities(Eqn0 @ lte(Coeffs, Constant), Eqn)
-    ->
+    ( opposing_inequalities(Eqn0 @ lte(Coeffs, Constant), Eqn) ->
         NewEqn = standardize_constraint(eq(Coeffs, Constant)),
         NewEqnSet = SoFar ++ Eqns
     ;
@@ -2200,7 +2202,7 @@
 %-----------------------------------------------------------------------------%
 %-----------------------------------------------------------------------------%
 %
-% Entailment test
+% Entailment test.
 %
 
 entailed(Varset, Constraints, lte(Objective, Constant)) = Result :-
@@ -2281,16 +2283,18 @@
 :- pred write_term(lp_varset::in, lp_term::in, io::di, io::uo) is det.
 
 write_term(Varset, Var - Coefficient, !IO) :-
-    ( if    Coefficient > zero
-      then  io.write_char('+', !IO)
-      else  io.write_char('-', !IO)
+    ( if Coefficient > zero then
+        io.write_char('+', !IO)
+      else
+        io.write_char('-', !IO)
     ),
     io.write_string(" (", !IO),
     Num = abs(numer(Coefficient)),
     io.write_string(int_to_string(Num), !IO),
-    ( if    denom(Coefficient) \= 1
-      then  io.format("/%s", [s(int_to_string(denom(Coefficient)))], !IO)
-      else  true
+    ( if denom(Coefficient) = 1 then
+        true
+      else
+        io.format("/%s", [s(int_to_string(denom(Coefficient)))], !IO)
     ),
     io.write_char(')', !IO),
     io.write_string(varset.lookup_name(Varset, Var), !IO).
@@ -2309,8 +2313,8 @@
     deconstruct_constraint(Constr, Coeffs, Operator, Constant),
     io.write_char('\t', !IO),
     list.foldl(write_constr_term(Varset), Coeffs, !IO),
-    io.format("%s %s\n", [s(operator_to_string(Operator)),
-        s(rat.to_string(Constant))], !IO).
+    io.format("%s %s\n",
+        [s(operator_to_string(Operator)), s(rat.to_string(Constant))], !IO).
 
 :- pred write_constr_term(lp_varset::in, lp_term::in, io::di, io::uo) is det.
 
@@ -2348,9 +2352,8 @@
 
 var_to_string(Varset, Var) = varset.lookup_name(Varset, Var, "Unnamed").
 
-    % Write out the matrix used during fourier elimination.  If
-    % `Labels' is `yes' then write out the label for each vector
-    % as well.
+    % Write out the matrix used during fourier elimination.
+    % If `Labels' is `yes' then write out the label for each vector as well.
     %
 :- pred write_matrix(lp_varset::in, bool::in, matrix::in, io::di, io::uo)
     is det.
Index: compiler/make.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/make.m,v
retrieving revision 1.65
diff -u -b -r1.65 make.m
--- compiler/make.m	30 Sep 2010 07:23:31 -0000	1.65
+++ compiler/make.m	14 Dec 2010 11:28:12 -0000
@@ -65,7 +65,6 @@
 :- import_module backend_libs.compile_target_code.
 :- import_module hlds.
 :- import_module libs.
-:- import_module libs.compiler_util.
 :- import_module libs.handle_options.
 :- import_module libs.md4.
 :- import_module libs.options.
@@ -88,6 +87,7 @@
 :- import_module map.
 :- import_module maybe.
 :- import_module pair.
+:- import_module require.
 :- import_module set.
 :- import_module solutions.
 :- import_module string.
Index: compiler/make.module_target.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/make.module_target.m,v
retrieving revision 1.77
diff -u -b -r1.77 make.module_target.m
--- compiler/make.module_target.m	10 Dec 2010 02:41:52 -0000	1.77
+++ compiler/make.module_target.m	14 Dec 2010 11:28:12 -0000
@@ -50,13 +50,13 @@
     --->    foreign_code_file(
                 foreign_language    :: foreign_language,
 
+                % Name of the file produced by the Mercury compiler,
+                % e.g. module_c_code.c.
                 target_file         :: file_name,
-                                    % Name of the file produced by the Mercury
-                                    % compiler, e.g. module_c_code.c.
 
+                % Name of the file produced by the foreign language compiler,
+                % e.g. module_c_code.o.
                 object_file         :: file_name
-                                    % Name of the file produced by the foreign
-                                    % language compiler, e.g. module_c_code.o.
             ).
 
     % Find the foreign code files generated when a module is processed.
@@ -72,7 +72,6 @@
 :- implementation.
 
 :- import_module analysis.
-:- import_module libs.compiler_util.
 :- import_module libs.process_util.
 :- import_module parse_tree.file_names.
 :- import_module parse_tree.module_cmds.
@@ -84,6 +83,7 @@
 
 :- import_module dir.
 :- import_module float.
+:- import_module require.
 :- import_module svmap.
 
 %-----------------------------------------------------------------------------%
Index: compiler/make.program_target.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/make.program_target.m,v
retrieving revision 1.108
diff -u -b -r1.108 make.program_target.m
--- compiler/make.program_target.m	30 Sep 2010 07:23:31 -0000	1.108
+++ compiler/make.program_target.m	14 Dec 2010 11:28:12 -0000
@@ -40,7 +40,6 @@
 :- implementation.
 
 :- import_module analysis.
-:- import_module libs.compiler_util.
 :- import_module libs.handle_options.
 :- import_module libs.process_util.
 :- import_module parse_tree.file_names.
@@ -56,6 +55,7 @@
 :- import_module digraph.
 :- import_module dir.
 :- import_module getopt_io.
+:- import_module require.
 :- import_module svmap.
 
 %-----------------------------------------------------------------------------%
Index: compiler/make.util.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/make.util.m,v
retrieving revision 1.81
diff -u -b -r1.81 make.util.m
--- compiler/make.util.m	28 Oct 2010 23:59:08 -0000	1.81
+++ compiler/make.util.m	14 Dec 2010 11:28:12 -0000
@@ -336,7 +336,6 @@
 :- implementation.
 
 :- import_module analysis.
-:- import_module libs.compiler_util.
 :- import_module libs.handle_options.
 :- import_module libs.process_util.
 :- import_module parse_tree.file_names.
@@ -350,6 +349,7 @@
 :- import_module exception.
 :- import_module getopt_io.
 :- import_module maybe.
+:- import_module require.
 :- import_module set.
 :- import_module thread.
 :- import_module thread.channel.
Index: compiler/make_hlds_passes.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/make_hlds_passes.m,v
retrieving revision 1.105
diff -u -b -r1.105 make_hlds_passes.m
--- compiler/make_hlds_passes.m	28 Oct 2010 04:03:17 -0000	1.105
+++ compiler/make_hlds_passes.m	14 Dec 2010 11:28:12 -0000
@@ -114,7 +114,6 @@
 :- import_module hlds.make_hlds.qual_info.
 :- import_module hlds.pred_table.
 :- import_module hlds.special_pred.
-:- import_module libs.compiler_util.
 :- import_module libs.file_util.
 :- import_module libs.globals.
 :- import_module libs.options.
@@ -129,6 +128,7 @@
 
 :- import_module map.
 :- import_module pair.
+:- import_module require.
 :- import_module set.
 :- import_module solutions.
 :- import_module string.
Index: compiler/make_tags.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/make_tags.m,v
retrieving revision 1.60
diff -u -b -r1.60 make_tags.m
--- compiler/make_tags.m	11 Jun 2009 07:00:11 -0000	1.60
+++ compiler/make_tags.m	14 Dec 2010 11:28:12 -0000
@@ -85,7 +85,6 @@
 
 :- implementation.
 
-:- import_module libs.compiler_util.
 :- import_module libs.globals.
 :- import_module libs.options.
 :- import_module parse_tree.prog_type.
@@ -94,6 +93,7 @@
 :- import_module bool.
 :- import_module int.
 :- import_module map.
+:- import_module require.
 :- import_module svmap.
 
 %-----------------------------------------------------------------------------%
Index: compiler/mark_static_terms.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/mark_static_terms.m,v
retrieving revision 1.33
diff -u -b -r1.33 mark_static_terms.m
--- compiler/mark_static_terms.m	14 Oct 2009 05:28:37 -0000	1.33
+++ compiler/mark_static_terms.m	14 Dec 2010 11:28:12 -0000
@@ -37,12 +37,12 @@
 :- implementation.
 
 :- import_module hlds.hlds_goal.
-:- import_module libs.compiler_util.
 :- import_module parse_tree.prog_data.
 
 :- import_module list.
 :- import_module map.
 :- import_module pair.
+:- import_module require.
 :- import_module set_tree234.
 :- import_module svmap.
 
Index: compiler/matching.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/matching.m,v
retrieving revision 1.13
diff -u -b -r1.13 matching.m
--- compiler/matching.m	23 Nov 2007 07:35:11 -0000	1.13
+++ compiler/matching.m	14 Dec 2010 11:28:12 -0000
@@ -85,12 +85,6 @@
 
 :- implementation.
 
-% Uncomment if you want to dump performance information into the .err file.
-% :- import_module unsafe.
-
-:- import_module libs.
-:- import_module libs.compiler_util.
-
 :- import_module assoc_list.
 :- import_module int.
 :- import_module io.
@@ -98,6 +92,7 @@
 :- import_module maybe.
 :- import_module pair.
 :- import_module queue.
+:- import_module require.
 :- import_module string.
 :- import_module term.
 :- import_module svmap.
Index: compiler/mcsolver.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/mcsolver.m,v
retrieving revision 1.9
diff -u -b -r1.9 mcsolver.m
--- compiler/mcsolver.m	4 Jun 2009 04:39:20 -0000	1.9
+++ compiler/mcsolver.m	14 Dec 2010 11:41:59 -0000
@@ -123,14 +123,12 @@
 
 :- implementation.
 
-:- import_module libs.
-:- import_module libs.compiler_util.
-
 :- import_module eqvclass.
 :- import_module io.
 :- import_module list.
 :- import_module map.
 :- import_module multi_map.
+:- import_module require.
 :- import_module set.
 :- import_module string.
 :- import_module term.
@@ -264,7 +262,7 @@
         ->
             disjunction_of_assignments(DisjOfAssgts, !PCs)
         ;
-            compiler_util.sorry(this_file,
+            sorry(this_file,
                 "Disjuction of constraints - general case.")
         )
     ).
@@ -277,19 +275,14 @@
 
 prepare_var_constraint(equiv_bool(Var, Value), !PCs) :-
     assign(Var, Value, !PCs).
-
 prepare_var_constraint(equivalent(Vars), !PCs) :-
     equivalent(Vars, !PCs).
-
 prepare_var_constraint(implies(Var1, Var2), !PCs) :-
     implies(Var1, Var2, !PCs).
-
 prepare_var_constraint(equiv_disj(X, Ys), !PCs) :-
     equivalent_to_disjunction(X, Ys, !PCs).
-
 prepare_var_constraint(at_most_one(Vars), !PCs) :-
     at_most_one(Vars, !PCs).
-
 prepare_var_constraint(exactly_one(Vars), !PCs) :-
     exactly_one(Vars, !PCs).
 
Index: compiler/mercury_compile.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/mercury_compile.m,v
retrieving revision 1.510
diff -u -b -r1.510 mercury_compile.m
--- compiler/mercury_compile.m	16 Sep 2010 00:39:04 -0000	1.510
+++ compiler/mercury_compile.m	14 Dec 2010 11:40:24 -0000
@@ -95,12 +95,12 @@
 :- import_module map.
 :- import_module maybe.
 :- import_module pair.
+:- import_module require.
 :- import_module set.
 :- import_module string.
 :- import_module svmap.
 :- import_module unit.
 
-
 %-----------------------------------------------------------------------------%
 
 real_main(!IO) :-
Index: compiler/mercury_compile_front_end.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/mercury_compile_front_end.m,v
retrieving revision 1.6
diff -u -b -r1.6 mercury_compile_front_end.m
--- compiler/mercury_compile_front_end.m	14 Oct 2010 02:45:04 -0000	1.6
+++ compiler/mercury_compile_front_end.m	14 Dec 2010 11:28:12 -0000
@@ -87,7 +87,6 @@
 :- import_module check_hlds.unused_imports.
 :- import_module hlds.hlds_error_util.
 :- import_module hlds.hlds_statistics.
-:- import_module libs.compiler_util.
 :- import_module libs.file_util.
 :- import_module libs.globals.
 :- import_module libs.options.
@@ -102,6 +101,7 @@
 :- import_module int.
 :- import_module maybe.
 :- import_module pair.
+:- import_module require.
 :- import_module set.
 :- import_module string.
 
Index: compiler/mercury_compile_llds_back_end.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/mercury_compile_llds_back_end.m,v
retrieving revision 1.8
diff -u -b -r1.8 mercury_compile_llds_back_end.m
--- compiler/mercury_compile_llds_back_end.m	23 Aug 2010 07:38:28 -0000	1.8
+++ compiler/mercury_compile_llds_back_end.m	14 Dec 2010 11:28:12 -0000
@@ -58,7 +58,6 @@
 :- import_module hlds.hlds_out.hlds_out_util.
 :- import_module hlds.hlds_pred.
 :- import_module hlds.mark_tail_calls.
-:- import_module libs.compiler_util.
 :- import_module libs.file_util.
 :- import_module libs.globals.
 :- import_module libs.options.
@@ -94,6 +93,7 @@
 :- import_module map.
 :- import_module maybe.
 :- import_module pair.
+:- import_module require.
 :- import_module string.
 :- import_module term.
 
Index: compiler/mercury_compile_middle_passes.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/mercury_compile_middle_passes.m,v
retrieving revision 1.8
diff -u -b -r1.8 mercury_compile_middle_passes.m
--- compiler/mercury_compile_middle_passes.m	16 Sep 2010 00:39:04 -0000	1.8
+++ compiler/mercury_compile_middle_passes.m	14 Dec 2010 11:28:12 -0000
@@ -47,7 +47,6 @@
 :- import_module bytecode_backend.bytecode_gen.
 :- import_module check_hlds.det_analysis.
 :- import_module hlds.hlds_module.
-:- import_module libs.compiler_util.
 :- import_module libs.file_util.
 :- import_module libs.globals.
 :- import_module libs.options.
@@ -100,6 +99,7 @@
 :- import_module list.
 :- import_module maybe.
 :- import_module pair.
+:- import_module require.
 :- import_module set.
 :- import_module string.
 :- import_module univ.
Index: compiler/mercury_compile_mlds_back_end.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/mercury_compile_mlds_back_end.m,v
retrieving revision 1.5
diff -u -b -r1.5 mercury_compile_mlds_back_end.m
--- compiler/mercury_compile_mlds_back_end.m	16 Sep 2010 00:39:04 -0000	1.5
+++ compiler/mercury_compile_mlds_back_end.m	14 Dec 2010 11:28:13 -0000
@@ -59,7 +59,6 @@
 :- import_module backend_libs.type_ctor_info.
 :- import_module hlds.arg_info.
 :- import_module hlds.mark_static_terms.            % HLDS -> HLDS
-:- import_module libs.compiler_util.
 :- import_module libs.file_util.
 :- import_module libs.globals.
 :- import_module libs.options.
@@ -86,6 +85,7 @@
 :- import_module getopt_io.
 :- import_module list.
 :- import_module pprint.
+:- import_module require.
 :- import_module string.
 
 %-----------------------------------------------------------------------------%
Index: compiler/mercury_to_mercury.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/mercury_to_mercury.m,v
retrieving revision 1.343
diff -u -b -r1.343 mercury_to_mercury.m
--- compiler/mercury_to_mercury.m	16 Sep 2010 00:39:04 -0000	1.343
+++ compiler/mercury_to_mercury.m	14 Dec 2010 11:28:13 -0000
@@ -414,7 +414,6 @@
 
 :- implementation.
 
-:- import_module libs.compiler_util.
 :- import_module libs.globals.
 :- import_module libs.options.
 :- import_module libs.rat.
@@ -430,6 +429,7 @@
 :- import_module map.
 :- import_module pair.
 :- import_module ops.
+:- import_module require.
 :- import_module set.
 :- import_module string.
 :- import_module term.
Index: compiler/middle_rec.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/middle_rec.m,v
retrieving revision 1.139
diff -u -b -r1.139 middle_rec.m
--- compiler/middle_rec.m	21 Oct 2009 06:36:20 -0000	1.139
+++ compiler/middle_rec.m	14 Dec 2010 11:28:13 -0000
@@ -34,7 +34,6 @@
 :- import_module hlds.code_model.
 :- import_module hlds.hlds_data.
 :- import_module hlds.hlds_llds.
-:- import_module libs.compiler_util.
 :- import_module ll_backend.code_gen.
 :- import_module ll_backend.code_util.
 :- import_module ll_backend.llds_out.
@@ -50,6 +49,7 @@
 :- import_module list.
 :- import_module maybe.
 :- import_module pair.
+:- import_module require.
 :- import_module set.
 :- import_module string.
 
Index: compiler/ml_call_gen.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/ml_call_gen.m,v
retrieving revision 1.87
diff -u -b -r1.87 ml_call_gen.m
--- compiler/ml_call_gen.m	3 Jun 2010 06:01:11 -0000	1.87
+++ compiler/ml_call_gen.m	14 Dec 2010 11:28:13 -0000
@@ -92,7 +92,6 @@
 :- import_module check_hlds.mode_util.
 :- import_module check_hlds.type_util.
 :- import_module hlds.hlds_module.
-:- import_module libs.compiler_util.
 :- import_module libs.globals.
 :- import_module libs.options.
 :- import_module mdbcomp.prim_data.
@@ -105,6 +104,7 @@
 :- import_module int.
 :- import_module map.
 :- import_module maybe.
+:- import_module require.
 :- import_module string.
 :- import_module term.
 
Index: compiler/ml_closure_gen.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/ml_closure_gen.m,v
retrieving revision 1.64
diff -u -b -r1.64 ml_closure_gen.m
--- compiler/ml_closure_gen.m	25 Sep 2009 05:13:03 -0000	1.64
+++ compiler/ml_closure_gen.m	14 Dec 2010 11:28:13 -0000
@@ -77,7 +77,6 @@
 :- import_module check_hlds.type_util.
 :- import_module hlds.code_model.
 :- import_module hlds.hlds_module.
-:- import_module libs.compiler_util.
 :- import_module libs.globals.
 :- import_module libs.options.
 :- import_module ll_backend.
@@ -100,6 +99,7 @@
 :- import_module map.
 :- import_module maybe.
 :- import_module pair.
+:- import_module require.
 :- import_module set.
 :- import_module set_tree234.
 :- import_module string.
Index: compiler/ml_code_gen.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/ml_code_gen.m,v
retrieving revision 1.228
diff -u -b -r1.228 ml_code_gen.m
--- compiler/ml_code_gen.m	10 Sep 2010 05:14:58 -0000	1.228
+++ compiler/ml_code_gen.m	14 Dec 2010 11:28:13 -0000
@@ -520,7 +520,6 @@
 :- import_module hlds.goal_form.
 :- import_module hlds.hlds_module.
 :- import_module hlds.hlds_pred.
-:- import_module libs.compiler_util.
 :- import_module libs.globals.
 :- import_module libs.options.
 :- import_module ml_backend.ml_call_gen.
@@ -541,6 +540,7 @@
 :- import_module map.
 :- import_module maybe.
 :- import_module pair.
+:- import_module require.
 :- import_module set.
 :- import_module string.
 
Index: compiler/ml_code_util.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/ml_code_util.m,v
retrieving revision 1.153
diff -u -b -r1.153 ml_code_util.m
--- compiler/ml_code_util.m	23 Sep 2010 05:31:56 -0000	1.153
+++ compiler/ml_code_util.m	14 Dec 2010 11:28:13 -0000
@@ -556,7 +556,6 @@
 :- import_module check_hlds.polymorphism.
 :- import_module check_hlds.type_util.
 :- import_module hlds.instmap.
-:- import_module libs.compiler_util.
 :- import_module libs.globals.
 :- import_module libs.options.
 :- import_module mdbcomp.program_representation.
@@ -573,6 +572,7 @@
 :- import_module int.
 :- import_module map.
 :- import_module pair.
+:- import_module require.
 :- import_module set.
 :- import_module stack.
 :- import_module string.
Index: compiler/ml_disj_gen.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/ml_disj_gen.m,v
retrieving revision 1.5
diff -u -b -r1.5 ml_disj_gen.m
--- compiler/ml_disj_gen.m	16 Sep 2010 00:39:04 -0000	1.5
+++ compiler/ml_disj_gen.m	14 Dec 2010 11:28:13 -0000
@@ -123,7 +123,6 @@
 :- import_module backend_libs.builtin_ops.
 :- import_module hlds.goal_form.
 :- import_module hlds.hlds_module.
-:- import_module libs.compiler_util.
 :- import_module libs.globals.
 :- import_module libs.options.
 :- import_module ml_backend.ml_code_gen.
@@ -135,6 +134,7 @@
 :- import_module bool.
 :- import_module map.
 :- import_module maybe.
+:- import_module require.
 :- import_module set.
 
 ml_gen_disj(Disjuncts, GoalInfo, CodeModel, Context, Statements, !Info) :-
Index: compiler/ml_elim_nested.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/ml_elim_nested.m,v
retrieving revision 1.114
diff -u -b -r1.114 ml_elim_nested.m
--- compiler/ml_elim_nested.m	23 Sep 2010 05:31:56 -0000	1.114
+++ compiler/ml_elim_nested.m	14 Dec 2010 11:28:13 -0000
@@ -442,7 +442,6 @@
 
 :- import_module hlds.hlds_data.
 :- import_module hlds.hlds_pred.
-:- import_module libs.compiler_util.
 :- import_module libs.options.
 :- import_module mdbcomp.prim_data.
 :- import_module ml_backend.ml_code_util.
@@ -453,6 +452,7 @@
 :- import_module int.
 :- import_module list.
 :- import_module maybe.
+:- import_module require.
 :- import_module set.
 :- import_module solutions.
 :- import_module string.
Index: compiler/ml_foreign_proc_gen.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/ml_foreign_proc_gen.m,v
retrieving revision 1.5
diff -u -b -r1.5 ml_foreign_proc_gen.m
--- compiler/ml_foreign_proc_gen.m	28 Oct 2010 02:56:08 -0000	1.5
+++ compiler/ml_foreign_proc_gen.m	14 Dec 2010 11:28:13 -0000
@@ -53,7 +53,6 @@
 :- import_module check_hlds.mode_util.
 :- import_module check_hlds.type_util.
 :- import_module hlds.hlds_module.
-:- import_module libs.compiler_util.
 :- import_module libs.globals.
 :- import_module libs.options.
 :- import_module ml_backend.ml_code_util.
@@ -62,6 +61,7 @@
 :- import_module bool.
 :- import_module map.
 :- import_module pair.
+:- import_module require.
 :- import_module string.
 
 %-----------------------------------------------------------------------------%
Index: compiler/ml_global_data.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/ml_global_data.m,v
retrieving revision 1.6
diff -u -b -r1.6 ml_global_data.m
--- compiler/ml_global_data.m	23 Sep 2010 05:31:56 -0000	1.6
+++ compiler/ml_global_data.m	14 Dec 2010 11:28:13 -0000
@@ -185,11 +185,11 @@
 
 :- implementation.
 
-:- import_module libs.compiler_util.
 :- import_module ml_backend.ml_type_gen.
 
 :- import_module int.
 :- import_module maybe.
+:- import_module require.
 :- import_module string.
 :- import_module svmap.
 
Index: compiler/ml_lookup_switch.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/ml_lookup_switch.m,v
retrieving revision 1.5
diff -u -b -r1.5 ml_lookup_switch.m
--- compiler/ml_lookup_switch.m	1 Nov 2010 04:02:57 -0000	1.5
+++ compiler/ml_lookup_switch.m	14 Dec 2010 11:28:13 -0000
@@ -49,7 +49,6 @@
 :- import_module hlds.goal_form.
 :- import_module hlds.hlds_data.
 :- import_module hlds.hlds_module.
-:- import_module libs.compiler_util.
 :- import_module libs.globals.
 :- import_module ml_backend.ml_code_gen.
 :- import_module ml_backend.ml_code_util.
@@ -62,6 +61,7 @@
 :- import_module map.
 :- import_module maybe.
 :- import_module pair.
+:- import_module require.
 :- import_module svmap.
 
 %-----------------------------------------------------------------------------%
Index: compiler/ml_optimize.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/ml_optimize.m,v
retrieving revision 1.66
diff -u -b -r1.66 ml_optimize.m
--- compiler/ml_optimize.m	16 Sep 2010 00:39:05 -0000	1.66
+++ compiler/ml_optimize.m	14 Dec 2010 11:28:13 -0000
@@ -44,7 +44,6 @@
 
 :- implementation.
 
-:- import_module libs.compiler_util.
 :- import_module libs.options.
 :- import_module mdbcomp.prim_data.
 :- import_module ml_backend.ml_code_util.
@@ -55,6 +54,7 @@
 :- import_module list.
 :- import_module maybe.
 :- import_module pair.
+:- import_module require.
 :- import_module std_util.
 :- import_module string.
 
Index: compiler/ml_proc_gen.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/ml_proc_gen.m,v
retrieving revision 1.8
diff -u -b -r1.8 ml_proc_gen.m
--- compiler/ml_proc_gen.m	14 Oct 2010 05:29:32 -0000	1.8
+++ compiler/ml_proc_gen.m	14 Dec 2010 11:28:13 -0000
@@ -39,7 +39,6 @@
 :- import_module hlds.passes_aux.
 :- import_module hlds.pred_table.
 :- import_module hlds.quantification.
-:- import_module libs.compiler_util.
 :- import_module libs.globals.
 :- import_module libs.options.
 :- import_module mdbcomp.prim_data.
@@ -60,6 +59,7 @@
 :- import_module map.
 :- import_module maybe.
 :- import_module pair.
+:- import_module require.
 :- import_module set.
 :- import_module std_util.
 
Index: compiler/ml_simplify_switch.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/ml_simplify_switch.m,v
retrieving revision 1.30
diff -u -b -r1.30 ml_simplify_switch.m
--- compiler/ml_simplify_switch.m	25 Sep 2009 05:13:03 -0000	1.30
+++ compiler/ml_simplify_switch.m	14 Dec 2010 11:28:13 -0000
@@ -38,7 +38,6 @@
 
 :- import_module backend_libs.builtin_ops.
 :- import_module backend_libs.switch_util.
-:- import_module libs.compiler_util.
 :- import_module libs.globals.
 :- import_module libs.options.
 :- import_module ml_backend.ml_code_util.
@@ -51,6 +50,7 @@
 :- import_module list.
 :- import_module map.
 :- import_module maybe.
+:- import_module require.
 
 %-----------------------------------------------------------------------------%
 
Index: compiler/ml_string_switch.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/ml_string_switch.m,v
retrieving revision 1.46
diff -u -b -r1.46 ml_string_switch.m
--- compiler/ml_string_switch.m	12 Nov 2010 02:21:59 -0000	1.46
+++ compiler/ml_string_switch.m	14 Dec 2010 11:28:13 -0000
@@ -42,7 +42,6 @@
 :- import_module backend_libs.switch_util.
 :- import_module hlds.hlds_data.
 :- import_module hlds.hlds_module.
-:- import_module libs.compiler_util.
 :- import_module ml_backend.ml_code_gen.
 :- import_module ml_backend.ml_code_util.
 :- import_module ml_backend.ml_global_data.
@@ -55,6 +54,7 @@
 :- import_module map.
 :- import_module maybe.
 :- import_module pair.
+:- import_module require.
 :- import_module string.
 :- import_module svmap.
 :- import_module unit.
Index: compiler/ml_switch_gen.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/ml_switch_gen.m,v
retrieving revision 1.51
diff -u -b -r1.51 ml_switch_gen.m
--- compiler/ml_switch_gen.m	1 Nov 2010 04:02:57 -0000	1.51
+++ compiler/ml_switch_gen.m	14 Dec 2010 11:28:13 -0000
@@ -105,7 +105,6 @@
 :- import_module check_hlds.type_util.
 :- import_module hlds.hlds_data.
 :- import_module hlds.hlds_module.
-:- import_module libs.compiler_util.
 :- import_module libs.options.
 :- import_module ml_backend.ml_code_gen.
 :- import_module ml_backend.ml_code_util.
@@ -122,6 +121,7 @@
 :- import_module map.
 :- import_module maybe.
 :- import_module pair.
+:- import_module require.
 
 %-----------------------------------------------------------------------------%
 
Index: compiler/ml_tag_switch.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/ml_tag_switch.m,v
retrieving revision 1.33
diff -u -b -r1.33 ml_tag_switch.m
--- compiler/ml_tag_switch.m	25 Sep 2009 05:13:04 -0000	1.33
+++ compiler/ml_tag_switch.m	14 Dec 2010 11:28:13 -0000
@@ -42,7 +42,6 @@
 :- import_module backend_libs.rtti.
 :- import_module backend_libs.switch_util.
 :- import_module hlds.hlds_data.
-:- import_module libs.compiler_util.
 :- import_module ml_backend.ml_code_gen.
 :- import_module ml_backend.ml_code_util.
 :- import_module ml_backend.ml_simplify_switch.
@@ -53,6 +52,7 @@
 :- import_module int.
 :- import_module map.
 :- import_module pair.
+:- import_module require.
 :- import_module set.
 :- import_module svmap.
 :- import_module unit.
Index: compiler/ml_type_gen.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/ml_type_gen.m,v
retrieving revision 1.96
diff -u -b -r1.96 ml_type_gen.m
--- compiler/ml_type_gen.m	29 Nov 2010 00:44:43 -0000	1.96
+++ compiler/ml_type_gen.m	14 Dec 2010 11:28:14 -0000
@@ -117,7 +117,6 @@
 
 :- import_module check_hlds.polymorphism.
 :- import_module hlds.hlds_pred.
-:- import_module libs.compiler_util.
 :- import_module libs.options.
 :- import_module ml_backend.ml_code_util.
 :- import_module ml_backend.ml_util.
@@ -131,6 +130,7 @@
 :- import_module list.
 :- import_module map.
 :- import_module pair.
+:- import_module require.
 :- import_module set.
 :- import_module string.
 :- import_module term.
Index: compiler/ml_unify_gen.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/ml_unify_gen.m,v
retrieving revision 1.151
diff -u -b -r1.151 ml_unify_gen.m
--- compiler/ml_unify_gen.m	23 Sep 2010 05:31:56 -0000	1.151
+++ compiler/ml_unify_gen.m	14 Dec 2010 11:28:14 -0000
@@ -128,7 +128,6 @@
 :- import_module hlds.hlds_out.
 :- import_module hlds.hlds_out.hlds_out_util.
 :- import_module hlds.hlds_pred.
-:- import_module libs.compiler_util.
 :- import_module libs.globals.
 :- import_module libs.options.
 :- import_module mdbcomp.prim_data.
@@ -147,6 +146,7 @@
 :- import_module int.
 :- import_module map.
 :- import_module pair.
+:- import_module require.
 :- import_module set.
 :- import_module string.
 :- import_module svmap.
Index: compiler/mlds.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/mlds.m,v
retrieving revision 1.186
diff -u -b -r1.186 mlds.m
--- compiler/mlds.m	14 Oct 2010 05:00:05 -0000	1.186
+++ compiler/mlds.m	14 Dec 2010 11:28:14 -0000
@@ -1847,7 +1847,6 @@
 :- import_module backend_libs.foreign.
 :- import_module check_hlds.type_util.
 :- import_module hlds.hlds_data.
-:- import_module libs.compiler_util.
 :- import_module libs.globals.
 :- import_module parse_tree.file_names.
 :- import_module parse_tree.prog_type.
@@ -1856,6 +1855,7 @@
 
 :- import_module char.
 :- import_module int.
+:- import_module require.
 :- import_module string.
 :- import_module term.
 
Index: compiler/mlds_to_c.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/mlds_to_c.m,v
retrieving revision 1.251
diff -u -b -r1.251 mlds_to_c.m
--- compiler/mlds_to_c.m	23 Sep 2010 05:31:57 -0000	1.251
+++ compiler/mlds_to_c.m	14 Dec 2010 11:28:14 -0000
@@ -78,7 +78,6 @@
 :- import_module hlds.code_model.
 :- import_module hlds.hlds_data.
 :- import_module hlds.hlds_pred.         % for pred_proc_id.
-:- import_module libs.compiler_util.
 :- import_module libs.file_util.
 :- import_module libs.options.
 :- import_module mdbcomp.prim_data.
@@ -107,6 +106,7 @@
 :- import_module map.
 :- import_module maybe.
 :- import_module pair.
+:- import_module require.
 :- import_module set.
 :- import_module solutions.
 :- import_module string.
Index: compiler/mlds_to_cs.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/mlds_to_cs.m,v
retrieving revision 1.11
diff -u -b -r1.11 mlds_to_cs.m
--- compiler/mlds_to_cs.m	9 Nov 2010 03:46:31 -0000	1.11
+++ compiler/mlds_to_cs.m	14 Dec 2010 11:28:14 -0000
@@ -50,7 +50,6 @@
 :- import_module backend_libs.c_util.
 :- import_module backend_libs.rtti.
 :- import_module hlds.hlds_pred.           % for pred_proc_id.
-:- import_module libs.compiler_util.
 :- import_module libs.file_util.
 :- import_module libs.globals.
 :- import_module libs.options.
@@ -79,6 +78,7 @@
 :- import_module map.
 :- import_module maybe.
 :- import_module pair.
+:- import_module require.
 :- import_module set.
 :- import_module string.
 :- import_module svmap.
Index: compiler/mlds_to_gcc.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/mlds_to_gcc.m,v
retrieving revision 1.154
diff -u -b -r1.154 mlds_to_gcc.m
--- compiler/mlds_to_gcc.m	12 Nov 2010 02:21:59 -0000	1.154
+++ compiler/mlds_to_gcc.m	14 Dec 2010 11:28:14 -0000
@@ -159,7 +159,6 @@
 :- import_module backend_libs.rtti. % for rtti.addr_to_string.
 :- import_module hlds.code_model.
 :- import_module hlds.hlds_pred.    % for proc_id_to_int and invalid_pred_id
-:- import_module libs.compiler_util.
 :- import_module libs.file_util.
 :- import_module libs.options.
 :- import_module mdbcomp.prim_data.
@@ -180,6 +179,7 @@
 :- import_module map.
 :- import_module maybe.
 :- import_module pair.
+:- import_module require.
 :- import_module set.
 :- import_module solutions.
 :- import_module string.
Index: compiler/mlds_to_il.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/mlds_to_il.m,v
retrieving revision 1.218
diff -u -b -r1.218 mlds_to_il.m
--- compiler/mlds_to_il.m	12 Nov 2010 02:22:00 -0000	1.218
+++ compiler/mlds_to_il.m	14 Dec 2010 11:28:14 -0000
@@ -149,7 +149,6 @@
 :- import_module backend_libs.foreign.
 :- import_module backend_libs.rtti.
 :- import_module hlds.code_model.
-:- import_module libs.compiler_util.
 :- import_module libs.options.
 :- import_module mdbcomp.prim_data.
 :- import_module ml_backend.ml_code_util.
@@ -169,6 +168,7 @@
 :- import_module int.
 :- import_module map.
 :- import_module pair.
+:- import_module require.
 :- import_module string.
 :- import_module term.
 
Index: compiler/mlds_to_ilasm.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/mlds_to_ilasm.m,v
retrieving revision 1.42
diff -u -b -r1.42 mlds_to_ilasm.m
--- compiler/mlds_to_ilasm.m	14 Oct 2009 05:28:39 -0000	1.42
+++ compiler/mlds_to_ilasm.m	14 Dec 2010 11:28:14 -0000
@@ -34,8 +34,6 @@
 
 :- implementation.
 
-% :- import_module hlds.passes_aux.
-:- import_module libs.compiler_util.
 :- import_module libs.file_util.
 :- import_module libs.options.
 :- import_module ml_backend.ilasm.
@@ -48,6 +46,7 @@
 :- import_module bool.
 :- import_module list.
 :- import_module maybe.
+:- import_module require.
 :- import_module set.
 :- import_module string.
 
Index: compiler/mlds_to_java.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/mlds_to_java.m,v
retrieving revision 1.163
diff -u -b -r1.163 mlds_to_java.m
--- compiler/mlds_to_java.m	23 Sep 2010 05:31:57 -0000	1.163
+++ compiler/mlds_to_java.m	14 Dec 2010 11:28:14 -0000
@@ -89,7 +89,6 @@
 :- import_module backend_libs.rtti.
 :- import_module check_hlds.type_util.
 :- import_module hlds.hlds_pred.           % for pred_proc_id.
-:- import_module libs.compiler_util.
 :- import_module libs.file_util.
 :- import_module libs.globals.
 :- import_module libs.options.
@@ -122,6 +121,7 @@
 :- import_module maybe.
 :- import_module multi_map.
 :- import_module pair.
+:- import_module require.
 :- import_module set.
 :- import_module string.
 :- import_module svmap.
Index: compiler/mlds_to_managed.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/mlds_to_managed.m,v
retrieving revision 1.54
diff -u -b -r1.54 mlds_to_managed.m
--- compiler/mlds_to_managed.m	14 Oct 2009 05:28:40 -0000	1.54
+++ compiler/mlds_to_managed.m	14 Dec 2010 11:28:14 -0000
@@ -41,7 +41,6 @@
 :- implementation.
 
 :- import_module backend_libs.c_util.
-:- import_module libs.compiler_util.
 :- import_module libs.options.
 :- import_module mdbcomp.prim_data.
 :- import_module ml_backend.ilds.
@@ -59,6 +58,7 @@
 :- import_module list.
 :- import_module map.
 :- import_module maybe.
+:- import_module require.
 :- import_module set.
 :- import_module string.
 :- import_module term.
Index: compiler/mmc_analysis.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/mmc_analysis.m,v
retrieving revision 1.28
diff -u -b -r1.28 mmc_analysis.m
--- compiler/mmc_analysis.m	14 Oct 2009 05:28:40 -0000	1.28
+++ compiler/mmc_analysis.m	14 Dec 2010 11:28:14 -0000
@@ -44,7 +44,6 @@
 :- implementation.
 
 :- import_module hlds.pred_table.
-:- import_module libs.compiler_util.
 :- import_module libs.file_util.
 :- import_module libs.globals.
 :- import_module libs.options.
@@ -64,6 +63,7 @@
 :- import_module bool.
 :- import_module list.
 :- import_module maybe.
+:- import_module require.
 :- import_module string.
 :- import_module io.
 :- import_module unit.
Index: compiler/mode_constraints.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/mode_constraints.m,v
retrieving revision 1.55
diff -u -b -r1.55 mode_constraints.m
--- compiler/mode_constraints.m	30 Jul 2010 05:16:13 -0000	1.55
+++ compiler/mode_constraints.m	14 Dec 2010 11:28:14 -0000
@@ -62,7 +62,6 @@
 :- import_module hlds.passes_aux.
 :- import_module hlds.quantification.
 :- import_module libs.
-:- import_module libs.compiler_util.
 :- import_module libs.globals.
 :- import_module libs.options.
 :- import_module mdbcomp.
@@ -87,6 +86,7 @@
 :- import_module maybe.
 :- import_module multi_map.
 :- import_module pair.
+:- import_module require.
 :- import_module robdd.
 :- import_module set.
 :- import_module solutions.
Index: compiler/mode_errors.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/mode_errors.m,v
retrieving revision 1.131
diff -u -b -r1.131 mode_errors.m
--- compiler/mode_errors.m	4 Nov 2009 03:44:49 -0000	1.131
+++ compiler/mode_errors.m	14 Dec 2010 11:28:14 -0000
@@ -247,7 +247,6 @@
 :- import_module hlds.hlds_out.hlds_out_mode.
 :- import_module hlds.hlds_out.hlds_out_util.
 :- import_module libs.
-:- import_module libs.compiler_util.
 :- import_module libs.globals.
 :- import_module libs.options.
 :- import_module parse_tree.mercury_to_mercury.
@@ -261,6 +260,7 @@
 :- import_module map.
 :- import_module maybe.
 :- import_module pair.
+:- import_module require.
 :- import_module string.
 :- import_module term.
 :- import_module varset.
Index: compiler/mode_info.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/mode_info.m,v
retrieving revision 1.100
diff -u -b -r1.100 mode_info.m
--- compiler/mode_info.m	30 Jul 2010 05:16:13 -0000	1.100
+++ compiler/mode_info.m	14 Dec 2010 11:28:15 -0000
@@ -336,13 +336,13 @@
 :- import_module check_hlds.mode_errors.
 :- import_module hlds.hlds_clauses.
 :- import_module libs.
-:- import_module libs.compiler_util.
 :- import_module libs.globals.
 :- import_module libs.options.
 
 :- import_module int.
 :- import_module map.
 :- import_module pair.
+:- import_module require.
 :- import_module string.
 :- import_module svbag.
 :- import_module term.
Index: compiler/mode_ordering.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/mode_ordering.m,v
retrieving revision 1.30
diff -u -b -r1.30 mode_ordering.m
--- compiler/mode_ordering.m	11 Jun 2009 07:00:15 -0000	1.30
+++ compiler/mode_ordering.m	14 Dec 2010 11:28:15 -0000
@@ -51,8 +51,6 @@
 % :- import_module mode_robdd.check.
 % :- import_module mode_robdd.tfeir.
 :- import_module mode_robdd.tfeirn.
-:- import_module libs.
-:- import_module libs.compiler_util.
 :- import_module mdbcomp.
 :- import_module mdbcomp.program_representation.
 :- import_module parse_tree.
@@ -62,6 +60,7 @@
 :- import_module cord.
 :- import_module digraph.
 :- import_module pair.
+:- import_module require.
 :- import_module set.
 :- import_module solutions.
 :- import_module stack.
Index: compiler/mode_util.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/mode_util.m,v
retrieving revision 1.215
diff -u -b -r1.215 mode_util.m
--- compiler/mode_util.m	18 Aug 2010 00:58:55 -0000	1.215
+++ compiler/mode_util.m	14 Dec 2010 11:28:15 -0000
@@ -201,8 +201,6 @@
 :- import_module check_hlds.inst_util.
 :- import_module check_hlds.type_util.
 :- import_module hlds.hlds_data.
-:- import_module libs.
-:- import_module libs.compiler_util.
 :- import_module mdbcomp.
 :- import_module mdbcomp.prim_data.
 :- import_module parse_tree.prog_mode.
@@ -212,6 +210,7 @@
 :- import_module int.
 :- import_module maybe.
 :- import_module pair.
+:- import_module require.
 :- import_module set.
 :- import_module string.
 :- import_module term.
Index: compiler/modecheck_call.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/modecheck_call.m,v
retrieving revision 1.86
diff -u -b -r1.86 modecheck_call.m
--- compiler/modecheck_call.m	30 Jul 2010 05:16:13 -0000	1.86
+++ compiler/modecheck_call.m	14 Dec 2010 11:28:15 -0000
@@ -88,14 +88,13 @@
 :- import_module check_hlds.modes.
 :- import_module check_hlds.unify_proc.
 :- import_module hlds.instmap.
-:- import_module libs.
-:- import_module libs.compiler_util.
 :- import_module parse_tree.prog_data.
 :- import_module parse_tree.prog_mode.
 :- import_module parse_tree.prog_type.
 
 :- import_module bool.
 :- import_module map.
+:- import_module require.
 :- import_module set.
 :- import_module term.
 
Index: compiler/modecheck_conj.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/modecheck_conj.m,v
retrieving revision 1.1
diff -u -b -r1.1 modecheck_conj.m
--- compiler/modecheck_conj.m	25 Sep 2009 05:13:04 -0000	1.1
+++ compiler/modecheck_conj.m	14 Dec 2010 11:28:15 -0000
@@ -41,8 +41,6 @@
 :- import_module hlds.hlds_module.
 :- import_module hlds.hlds_pred.
 :- import_module hlds.instmap.
-:- import_module libs.
-:- import_module libs.compiler_util.
 :- import_module parse_tree.
 :- import_module parse_tree.prog_data.
 
@@ -53,6 +51,7 @@
 :- import_module map.
 :- import_module maybe.
 :- import_module pair.
+:- import_module require.
 :- import_module set.
 
 %-----------------------------------------------------------------------------%
Index: compiler/modecheck_goal.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/modecheck_goal.m,v
retrieving revision 1.2
diff -u -b -r1.2 modecheck_goal.m
--- compiler/modecheck_goal.m	14 Sep 2010 09:08:27 -0000	1.2
+++ compiler/modecheck_goal.m	14 Dec 2010 11:28:15 -0000
@@ -132,8 +132,6 @@
 :- import_module hlds.hlds_pred.
 :- import_module hlds.instmap.
 :- import_module hlds.pred_table.
-:- import_module libs.
-:- import_module libs.compiler_util.
 :- import_module mdbcomp.
 :- import_module mdbcomp.prim_data.
 :- import_module parse_tree.
@@ -149,6 +147,7 @@
 :- import_module map.
 :- import_module maybe.
 :- import_module pair.
+:- import_module require.
 :- import_module set.
 :- import_module string.
 :- import_module svmap.
Index: compiler/modecheck_unify.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/modecheck_unify.m,v
retrieving revision 1.135
diff -u -b -r1.135 modecheck_unify.m
--- compiler/modecheck_unify.m	14 Sep 2010 09:08:27 -0000	1.135
+++ compiler/modecheck_unify.m	14 Dec 2010 11:28:15 -0000
@@ -62,7 +62,6 @@
 :- import_module hlds.hlds_pred.
 :- import_module hlds.instmap.
 :- import_module libs.
-:- import_module libs.compiler_util.
 :- import_module libs.globals.
 :- import_module libs.options.
 :- import_module mdbcomp.
@@ -79,6 +78,7 @@
 :- import_module map.
 :- import_module maybe.
 :- import_module pair.
+:- import_module require.
 :- import_module set.
 :- import_module string.
 :- import_module term.
Index: compiler/modecheck_util.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/modecheck_util.m,v
retrieving revision 1.1
diff -u -b -r1.1 modecheck_util.m
--- compiler/modecheck_util.m	25 Sep 2009 05:13:05 -0000	1.1
+++ compiler/modecheck_util.m	14 Dec 2010 11:28:15 -0000
@@ -206,7 +206,6 @@
 :- import_module hlds.quantification.
 :- import_module hlds.special_pred.
 :- import_module libs.
-:- import_module libs.compiler_util.
 :- import_module libs.file_util.
 :- import_module libs.globals.
 :- import_module libs.options.
@@ -229,6 +228,7 @@
 :- import_module map.
 :- import_module pair.
 :- import_module queue.
+:- import_module require.
 :- import_module set.
 :- import_module string.
 :- import_module svmap.
Index: compiler/modes.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/modes.m,v
retrieving revision 1.391
diff -u -b -r1.391 modes.m
--- compiler/modes.m	23 Aug 2010 04:16:10 -0000	1.391
+++ compiler/modes.m	14 Dec 2010 11:28:15 -0000
@@ -152,7 +152,6 @@
 :- import_module hlds.pred_table.
 :- import_module hlds.quantification.
 :- import_module libs.
-:- import_module libs.compiler_util.
 :- import_module libs.file_util.
 :- import_module libs.globals.
 :- import_module libs.options.
@@ -167,6 +166,7 @@
 :- import_module map.
 :- import_module maybe.
 :- import_module queue.
+:- import_module require.
 :- import_module set.
 :- import_module string.
 :- import_module svmap.
Index: compiler/module_cmds.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/module_cmds.m,v
retrieving revision 1.13
diff -u -b -r1.13 module_cmds.m
--- compiler/module_cmds.m	30 Sep 2010 07:23:31 -0000	1.13
+++ compiler/module_cmds.m	14 Dec 2010 11:28:15 -0000
@@ -192,7 +192,6 @@
 
 :- implementation.
 
-:- import_module libs.compiler_util.
 :- import_module libs.process_util.
 :- import_module libs.handle_options.   % for grade_directory_component
 :- import_module libs.options.
@@ -204,6 +203,7 @@
 :- import_module dir.
 :- import_module getopt_io.
 :- import_module int.
+:- import_module require.
 :- import_module set.
 :- import_module string.
 
Index: compiler/module_imports.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/module_imports.m,v
retrieving revision 1.7
diff -u -b -r1.7 module_imports.m
--- compiler/module_imports.m	17 May 2010 01:09:21 -0000	1.7
+++ compiler/module_imports.m	14 Dec 2010 11:28:15 -0000
@@ -251,12 +251,12 @@
 
 :- implementation.
 
-:- import_module libs.compiler_util.
 :- import_module libs.options.
 :- import_module parse_tree.modules.    % undesirable dependency
 
 :- import_module bool.
 :- import_module dir.
+:- import_module require.
 :- import_module set.
 :- import_module svset.
 :- import_module term.
Index: compiler/module_qual.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/module_qual.m,v
retrieving revision 1.178
diff -u -b -r1.178 module_qual.m
--- compiler/module_qual.m	10 Sep 2010 05:14:58 -0000	1.178
+++ compiler/module_qual.m	14 Dec 2010 11:28:15 -0000
@@ -128,7 +128,6 @@
 
 :- implementation.
 
-:- import_module libs.compiler_util.
 :- import_module libs.options.
 :- import_module parse_tree.module_imports.
 :- import_module parse_tree.prog_io_sym_name.
@@ -138,6 +137,7 @@
 :- import_module assoc_list.
 :- import_module map.
 :- import_module pair.
+:- import_module require.
 :- import_module set.
 :- import_module solutions.
 :- import_module svmap.
Index: compiler/modules.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/modules.m,v
retrieving revision 1.460
diff -u -b -r1.460 modules.m
--- compiler/modules.m	16 Sep 2010 00:39:05 -0000	1.460
+++ compiler/modules.m	14 Dec 2010 11:28:15 -0000
@@ -367,7 +367,6 @@
 :- implementation.
 
 :- import_module hlds.passes_aux.
-:- import_module libs.compiler_util.
 :- import_module libs.handle_options.
 :- import_module libs.options.
 :- import_module make.              % XXX undesirable dependency
@@ -395,6 +394,7 @@
 :- import_module map.
 :- import_module multi_map.
 :- import_module pair.
+:- import_module require.
 :- import_module set.
 :- import_module solutions.
 :- import_module sparse_bitset.
Index: compiler/opt_util.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/opt_util.m,v
retrieving revision 1.171
diff -u -b -r1.171 opt_util.m
--- compiler/opt_util.m	21 Oct 2009 06:36:21 -0000	1.171
+++ compiler/opt_util.m	14 Dec 2010 11:28:16 -0000
@@ -323,12 +323,12 @@
 :- import_module backend_libs.builtin_ops.
 :- import_module check_hlds.type_util.
 :- import_module hlds.special_pred.
-:- import_module libs.compiler_util.
 :- import_module ll_backend.exprn_aux.
 :- import_module parse_tree.prog_data.
 
 :- import_module int.
 :- import_module pair.
+:- import_module require.
 :- import_module set.
 :- import_module string.
 
Index: compiler/optimize.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/optimize.m,v
retrieving revision 1.70
diff -u -b -r1.70 optimize.m
--- compiler/optimize.m	10 Sep 2010 04:02:26 -0000	1.70
+++ compiler/optimize.m	14 Dec 2010 11:28:16 -0000
@@ -37,7 +37,6 @@
 
 :- import_module hlds.code_model.
 :- import_module hlds.hlds_pred.
-:- import_module libs.compiler_util.
 :- import_module libs.file_util.
 :- import_module libs.options.
 :- import_module ll_backend.continuation_info.
@@ -63,6 +62,7 @@
 :- import_module io.
 :- import_module map.
 :- import_module maybe.
+:- import_module require.
 :- import_module set.
 :- import_module string.
 
Index: compiler/options.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/options.m,v
retrieving revision 1.681
diff -u -b -r1.681 options.m
--- compiler/options.m	23 Nov 2010 04:37:15 -0000	1.681
+++ compiler/options.m	14 Dec 2010 11:28:16 -0000
@@ -985,7 +985,6 @@
 
 :- implementation.
 
-:- import_module libs.compiler_util.
 :- import_module libs.handle_options.
 
 :- import_module assoc_list.
@@ -996,6 +995,7 @@
 :- import_module map.
 :- import_module maybe.
 :- import_module pair.
+:- import_module require.
 :- import_module string.
 :- import_module svmap.
 
Index: compiler/options_file.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/options_file.m,v
retrieving revision 1.54
diff -u -b -r1.54 options_file.m
--- compiler/options_file.m	30 Sep 2010 07:23:31 -0000	1.54
+++ compiler/options_file.m	14 Dec 2010 11:28:16 -0000
@@ -78,7 +78,6 @@
 
 :- implementation.
 
-:- import_module libs.compiler_util.
 :- import_module libs.globals.
 :- import_module libs.options.
 :- import_module parse_tree.error_util.
@@ -90,6 +89,7 @@
 :- import_module dir.
 :- import_module exception.
 :- import_module map.
+:- import_module require.
 :- import_module std_util.
 :- import_module string.
 :- import_module svmap.
Index: compiler/ordering_mode_constraints.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/ordering_mode_constraints.m,v
retrieving revision 1.25
diff -u -b -r1.25 ordering_mode_constraints.m
--- compiler/ordering_mode_constraints.m	30 Mar 2010 23:57:25 -0000	1.25
+++ compiler/ordering_mode_constraints.m	14 Dec 2010 11:28:16 -0000
@@ -107,7 +107,6 @@
 :- import_module hlds.hlds_error_util.
 :- import_module hlds.hlds_goal.
 :- import_module libs.
-:- import_module libs.compiler_util.
 :- import_module libs.globals.
 :- import_module mdbcomp.
 :- import_module mdbcomp.program_representation.
@@ -123,6 +122,7 @@
 :- import_module maybe.
 :- import_module multi_map.
 :- import_module pair.
+:- import_module require.
 :- import_module string.
 :- import_module svset.
 
Index: compiler/par_conj_gen.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/par_conj_gen.m,v
retrieving revision 1.40
diff -u -b -r1.40 par_conj_gen.m
--- compiler/par_conj_gen.m	3 Sep 2009 23:07:28 -0000	1.40
+++ compiler/par_conj_gen.m	14 Dec 2010 11:28:16 -0000
@@ -109,7 +109,6 @@
 :- import_module hlds.hlds_llds.
 :- import_module hlds.hlds_module.
 :- import_module hlds.instmap.
-:- import_module libs.compiler_util.
 :- import_module libs.globals.
 :- import_module libs.options.
 :- import_module ll_backend.code_gen.
@@ -124,6 +123,7 @@
 :- import_module map.
 :- import_module maybe.
 :- import_module pair.
+:- import_module require.
 :- import_module set.
 :- import_module unit.
 
Index: compiler/parallel_to_plain_conj.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/parallel_to_plain_conj.m,v
retrieving revision 1.2
diff -u -b -r1.2 parallel_to_plain_conj.m
--- compiler/parallel_to_plain_conj.m	23 Dec 2008 01:37:38 -0000	1.2
+++ compiler/parallel_to_plain_conj.m	14 Dec 2010 11:28:16 -0000
@@ -33,10 +33,10 @@
 :- implementation.
 
 :- import_module hlds.hlds_goal.
-:- import_module libs.compiler_util.
 
 :- import_module bool.
 :- import_module list.
+:- import_module require.
 
 %-----------------------------------------------------------------------------%
 
Index: compiler/passes_aux.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/passes_aux.m,v
retrieving revision 1.100
diff -u -b -r1.100 passes_aux.m
--- compiler/passes_aux.m	8 Nov 2010 03:43:42 -0000	1.100
+++ compiler/passes_aux.m	14 Dec 2010 11:28:16 -0000
@@ -207,7 +207,6 @@
 :- import_module hlds.hlds_out.
 :- import_module hlds.hlds_out.hlds_out_module.
 :- import_module hlds.hlds_out.hlds_out_util.
-:- import_module libs.compiler_util.
 :- import_module libs.file_util.
 :- import_module libs.globals.
 :- import_module libs.options.
@@ -223,6 +222,7 @@
 :- import_module int.
 :- import_module map.
 :- import_module pair.
+:- import_module require.
 :- import_module set_tree234.
 :- import_module string.
 :- import_module varset.
Index: compiler/pd_cost.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/pd_cost.m,v
retrieving revision 1.37
diff -u -b -r1.37 pd_cost.m
--- compiler/pd_cost.m	23 Dec 2008 01:37:38 -0000	1.37
+++ compiler/pd_cost.m	14 Dec 2010 11:28:16 -0000
@@ -42,12 +42,12 @@
 
 :- implementation.
 
-:- import_module libs.compiler_util.
 :- import_module parse_tree.prog_data.
 
 :- import_module int.
 :- import_module list.
 :- import_module pair.
+:- import_module require.
 :- import_module set.
 
 %-----------------------------------------------------------------------------%
Index: compiler/pd_info.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/pd_info.m,v
retrieving revision 1.41
diff -u -b -r1.41 pd_info.m
--- compiler/pd_info.m	5 Aug 2010 03:07:09 -0000	1.41
+++ compiler/pd_info.m	14 Dec 2010 11:28:16 -0000
@@ -119,7 +119,6 @@
 :- import_module check_hlds.inst_match.
 :- import_module hlds.hlds_goal.
 :- import_module hlds.hlds_pred.
-:- import_module libs.compiler_util.
 :- import_module mdbcomp.prim_data.
 :- import_module parse_tree.prog_data.
 :- import_module parse_tree.prog_util.
@@ -129,6 +128,7 @@
 :- import_module bool.
 :- import_module int.
 :- import_module io.
+:- import_module require.
 :- import_module term.
 
 %-----------------------------------------------------------------------------%
Index: compiler/pd_term.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/pd_term.m,v
retrieving revision 1.19
diff -u -b -r1.19 pd_term.m
--- compiler/pd_term.m	23 Dec 2008 01:37:38 -0000	1.19
+++ compiler/pd_term.m	14 Dec 2010 11:28:16 -0000
@@ -103,7 +103,6 @@
 :- implementation.
 
 :- import_module hlds.hlds_pred.
-:- import_module libs.compiler_util.
 :- import_module parse_tree.prog_data.
 :- import_module transform_hlds.pd_util.
 
@@ -111,6 +110,7 @@
 :- import_module bool.
 :- import_module int.
 :- import_module map.
+:- import_module require.
 
 %-----------------------------------------------------------------------------%
 
Index: compiler/pd_util.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/pd_util.m,v
retrieving revision 1.77
diff -u -b -r1.77 pd_util.m
--- compiler/pd_util.m	23 Aug 2010 07:38:29 -0000	1.77
+++ compiler/pd_util.m	14 Dec 2010 11:28:16 -0000
@@ -164,7 +164,6 @@
 :- import_module hlds.goal_util.
 :- import_module hlds.instmap.
 :- import_module hlds.quantification.
-:- import_module libs.compiler_util.
 :- import_module libs.globals.
 :- import_module libs.options.
 :- import_module parse_tree.error_util.
@@ -176,6 +175,7 @@
 :- import_module int.
 :- import_module io.
 :- import_module pair.
+:- import_module require.
 :- import_module set.
 :- import_module term.
 :- import_module svmap.
Index: compiler/pickle.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/pickle.m,v
retrieving revision 1.2
diff -u -b -r1.2 pickle.m
--- compiler/pickle.m	21 Nov 2008 03:22:39 -0000	1.2
+++ compiler/pickle.m	14 Dec 2010 11:28:16 -0000
@@ -94,8 +94,6 @@
 
 :- implementation.
 
-:- import_module libs.compiler_util.
-
 :- import_module bitmap.
 :- import_module bool.
 :- import_module char.
@@ -106,6 +104,7 @@
 :- import_module io.
 :- import_module list.
 :- import_module map.
+:- import_module require.
 :- import_module string.
 
 %-----------------------------------------------------------------------------%
Index: compiler/polyhedron.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/polyhedron.m,v
retrieving revision 1.7
diff -u -b -r1.7 polyhedron.m
--- compiler/polyhedron.m	8 Sep 2009 02:43:35 -0000	1.7
+++ compiler/polyhedron.m	14 Dec 2010 11:28:16 -0000
@@ -184,10 +184,10 @@
 
 :- implementation.
 
-:- import_module libs.compiler_util.
 :- import_module libs.rat.
 
 :- import_module pair.
+:- import_module require.
 :- import_module svmap.
 :- import_module svvarset.
 :- import_module varset.
Index: compiler/polymorphism.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/polymorphism.m,v
retrieving revision 1.352
diff -u -b -r1.352 polymorphism.m
--- compiler/polymorphism.m	15 Sep 2010 04:24:47 -0000	1.352
+++ compiler/polymorphism.m	14 Dec 2010 11:28:16 -0000
@@ -400,7 +400,6 @@
 :- import_module hlds.special_pred.
 :- import_module libs.
 :- import_module libs.compiler_util.
-:- import_module libs.compiler_util.
 :- import_module libs.globals.
 :- import_module libs.options.
 :- import_module mdbcomp.prim_data.
@@ -418,6 +417,7 @@
 :- import_module io.
 :- import_module map.
 :- import_module pair.
+:- import_module require.
 :- import_module set.
 :- import_module solutions.
 :- import_module string.
Index: compiler/post_term_analysis.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/post_term_analysis.m,v
retrieving revision 1.21
diff -u -b -r1.21 post_term_analysis.m
--- compiler/post_term_analysis.m	4 Nov 2009 03:44:50 -0000	1.21
+++ compiler/post_term_analysis.m	14 Dec 2010 11:28:16 -0000
@@ -42,7 +42,6 @@
 :- import_module hlds.hlds_out.hlds_out_util.
 :- import_module hlds.hlds_pred.
 :- import_module hlds.special_pred.
-:- import_module libs.compiler_util.
 :- import_module libs.globals.
 :- import_module libs.options.
 :- import_module mdbcomp.prim_data.
@@ -55,6 +54,7 @@
 :- import_module map.
 :- import_module maybe.
 :- import_module pair.
+:- import_module require.
 :- import_module string.
 
 %----------------------------------------------------------------------------%
Index: compiler/post_typecheck.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/post_typecheck.m,v
retrieving revision 1.141
diff -u -b -r1.141 post_typecheck.m
--- compiler/post_typecheck.m	8 Nov 2010 03:43:42 -0000	1.141
+++ compiler/post_typecheck.m	14 Dec 2010 11:28:16 -0000
@@ -135,7 +135,6 @@
 :- import_module hlds.hlds_out.hlds_out_util.
 :- import_module hlds.pred_table.
 :- import_module libs.
-:- import_module libs.compiler_util.
 :- import_module libs.globals.
 :- import_module libs.options.
 :- import_module mdbcomp.program_representation.
@@ -151,6 +150,7 @@
 :- import_module map.
 :- import_module maybe.
 :- import_module pair.
+:- import_module require.
 :- import_module set.
 :- import_module solutions.
 :- import_module string.
Index: compiler/pred_table.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/pred_table.m,v
retrieving revision 1.15
diff -u -b -r1.15 pred_table.m
--- compiler/pred_table.m	30 Jul 2010 05:16:14 -0000	1.15
+++ compiler/pred_table.m	14 Dec 2010 11:28:17 -0000
@@ -30,7 +30,6 @@
 
 :- implementation.
 
-:- import_module libs.compiler_util.
 :- import_module parse_tree.error_util.
 :- import_module parse_tree.prog_out.
 :- import_module parse_tree.prog_type.
@@ -39,6 +38,7 @@
 :- import_module int.
 :- import_module multi_map.
 :- import_module pair.
+:- import_module require.
 :- import_module string.
 :- import_module svmap.
 :- import_module svmulti_map.
Index: compiler/proc_gen.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/proc_gen.m,v
retrieving revision 1.39
diff -u -b -r1.39 proc_gen.m
--- compiler/proc_gen.m	1 Nov 2010 04:02:58 -0000	1.39
+++ compiler/proc_gen.m	14 Dec 2010 11:28:17 -0000
@@ -83,7 +83,6 @@
 :- import_module hlds.hlds_out.hlds_out_util.
 :- import_module hlds.hlds_rtti.
 :- import_module hlds.instmap.
-:- import_module libs.compiler_util.
 :- import_module libs.file_util.
 :- import_module libs.globals.
 :- import_module libs.options.
@@ -111,6 +110,7 @@
 :- import_module map.
 :- import_module maybe.
 :- import_module pair.
+:- import_module require.
 :- import_module set.
 :- import_module solutions.
 :- import_module string.
Index: compiler/proc_label.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/proc_label.m,v
retrieving revision 1.25
diff -u -b -r1.25 proc_label.m
--- compiler/proc_label.m	3 Nov 2008 03:08:02 -0000	1.25
+++ compiler/proc_label.m	14 Dec 2010 11:28:17 -0000
@@ -47,13 +47,12 @@
 :- implementation.
 
 :- import_module backend_libs.rtti.
-:- import_module libs.
-:- import_module libs.compiler_util.
 :- import_module parse_tree.prog_type.
 
 :- import_module bool.
 :- import_module list.
 :- import_module pair.
+:- import_module require.
 :- import_module string.
 
 make_proc_label_from_rtti(RttiProcLabel) = ProcLabel :-
Index: compiler/prog_ctgc.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/prog_ctgc.m,v
retrieving revision 1.25
diff -u -b -r1.25 prog_ctgc.m
--- compiler/prog_ctgc.m	8 Sep 2009 02:43:36 -0000	1.25
+++ compiler/prog_ctgc.m	14 Dec 2010 11:28:17 -0000
@@ -171,7 +171,6 @@
 
 :- implementation.
 
-:- import_module libs.compiler_util.
 :- import_module parse_tree.mercury_to_mercury.
 :- import_module parse_tree.prog_io_sym_name.
 :- import_module parse_tree.prog_io_util.
@@ -182,6 +181,7 @@
 
 :- import_module int.
 :- import_module pair.
+:- import_module require.
 :- import_module set.
 :- import_module string.
 :- import_module varset.
Index: compiler/prog_data.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/prog_data.m,v
retrieving revision 1.224
diff -u -b -r1.224 prog_data.m
--- compiler/prog_data.m	16 Sep 2010 00:39:06 -0000	1.224
+++ compiler/prog_data.m	14 Dec 2010 11:28:17 -0000
@@ -43,8 +43,7 @@
 :- implementation.
 
 :- import_module library.
-:- import_module libs.compiler_util.
-
+:- import_module require.
 :- import_module string.
 
 %-----------------------------------------------------------------------------%
Index: compiler/prog_event.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/prog_event.m,v
retrieving revision 1.16
diff -u -b -r1.16 prog_event.m
--- compiler/prog_event.m	11 Jun 2009 07:00:17 -0000	1.16
+++ compiler/prog_event.m	14 Dec 2010 11:28:17 -0000
@@ -59,7 +59,6 @@
 
 :- implementation.
 
-:- import_module libs.compiler_util.
 :- import_module mdbcomp.prim_data.
 :- import_module parse_tree.builtin_lib_types.
 :- import_module parse_tree.prog_mode.
@@ -74,6 +73,7 @@
 :- import_module map.
 :- import_module maybe.
 :- import_module pair.
+:- import_module require.
 :- import_module set.
 :- import_module string.
 :- import_module svbimap.
Index: compiler/prog_foreign.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/prog_foreign.m,v
retrieving revision 1.19
diff -u -b -r1.19 prog_foreign.m
--- compiler/prog_foreign.m	16 Sep 2010 00:39:06 -0000	1.19
+++ compiler/prog_foreign.m	14 Dec 2010 11:28:17 -0000
@@ -27,6 +27,7 @@
 :- module parse_tree.prog_foreign.
 :- interface.
 
+:- import_module libs.
 :- import_module libs.globals.
 :- import_module parse_tree.prog_data.
 :- import_module mdbcomp.prim_data.
Index: compiler/prog_io.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/prog_io.m,v
retrieving revision 1.302
diff -u -b -r1.302 prog_io.m
--- compiler/prog_io.m	5 Nov 2009 06:34:41 -0000	1.302
+++ compiler/prog_io.m	14 Dec 2010 11:28:17 -0000
@@ -184,7 +184,6 @@
 
 :- implementation.
 
-:- import_module libs.compiler_util.
 :- import_module libs.options.
 :- import_module parse_tree.file_names.
 :- import_module parse_tree.mercury_to_mercury.
@@ -212,6 +211,7 @@
 :- import_module map.
 :- import_module pair.
 :- import_module parser.
+:- import_module require.
 :- import_module set.
 :- import_module string.
 :- import_module term_io.
Index: compiler/prog_io_pragma.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/prog_io_pragma.m,v
retrieving revision 1.142
diff -u -b -r1.142 prog_io_pragma.m
--- compiler/prog_io_pragma.m	16 Sep 2010 00:39:06 -0000	1.142
+++ compiler/prog_io_pragma.m	14 Dec 2010 11:28:17 -0000
@@ -43,7 +43,6 @@
 
 :- implementation.
 
-:- import_module libs.compiler_util.
 :- import_module libs.rat.
 :- import_module parse_tree.error_util.
 :- import_module parse_tree.mercury_to_mercury.
@@ -59,6 +58,7 @@
 :- import_module int.
 :- import_module maybe.
 :- import_module pair.
+:- import_module require.
 :- import_module set.
 :- import_module string.
 :- import_module unit.
Index: compiler/prog_io_type_defn.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/prog_io_type_defn.m,v
retrieving revision 1.3
diff -u -b -r1.3 prog_io_type_defn.m
--- compiler/prog_io_type_defn.m	25 Sep 2009 05:13:05 -0000	1.3
+++ compiler/prog_io_type_defn.m	14 Dec 2010 11:28:17 -0000
@@ -53,7 +53,6 @@
 
 :- implementation.
 
-:- import_module libs.compiler_util.
 :- import_module libs.globals.
 :- import_module parse_tree.error_util.
 :- import_module parse_tree.mercury_to_mercury.
@@ -65,6 +64,7 @@
 
 :- import_module bool.
 :- import_module pair.
+:- import_module require.
 :- import_module set.
 :- import_module string.
 :- import_module unit.
Index: compiler/prog_io_typeclass.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/prog_io_typeclass.m,v
retrieving revision 1.66
diff -u -b -r1.66 prog_io_typeclass.m
--- compiler/prog_io_typeclass.m	8 Sep 2009 02:43:37 -0000	1.66
+++ compiler/prog_io_typeclass.m	14 Dec 2010 11:28:17 -0000
@@ -58,7 +58,6 @@
 
 :- implementation.
 
-:- import_module libs.compiler_util.
 :- import_module parse_tree.error_util.
 :- import_module parse_tree.mercury_to_mercury.
 :- import_module parse_tree.prog_io.
@@ -72,6 +71,7 @@
 :- import_module map.
 :- import_module maybe.
 :- import_module pair.
+:- import_module require.
 :- import_module solutions.
 :- import_module string.
 :- import_module term.
Index: compiler/prog_io_util.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/prog_io_util.m,v
retrieving revision 1.68
diff -u -b -r1.68 prog_io_util.m
--- compiler/prog_io_util.m	8 Sep 2009 02:43:37 -0000	1.68
+++ compiler/prog_io_util.m	14 Dec 2010 11:28:17 -0000
@@ -232,12 +232,12 @@
 
 :- implementation.
 
-:- import_module libs.compiler_util.
 :- import_module parse_tree.mercury_to_mercury.
 :- import_module parse_tree.prog_io_sym_name.
 :- import_module parse_tree.prog_out.
 :- import_module parse_tree.prog_util.
 
+:- import_module require.
 :- import_module set.
 :- import_module term.
 
Index: compiler/prog_mode.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/prog_mode.m,v
retrieving revision 1.22
diff -u -b -r1.22 prog_mode.m
--- compiler/prog_mode.m	11 Jun 2009 07:00:17 -0000	1.22
+++ compiler/prog_mode.m	14 Dec 2010 11:28:17 -0000
@@ -133,10 +133,10 @@
 
 :- implementation.
 
-:- import_module libs.compiler_util.
 :- import_module mdbcomp.prim_data.
 
 :- import_module map.
+:- import_module require.
 :- import_module set.
 :- import_module term.
 :- import_module varset.
Index: compiler/prog_out.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/prog_out.m,v
retrieving revision 1.88
diff -u -b -r1.88 prog_out.m
--- compiler/prog_out.m	4 Nov 2009 03:44:50 -0000	1.88
+++ compiler/prog_out.m	14 Dec 2010 11:28:17 -0000
@@ -152,12 +152,12 @@
 
 :- implementation.
 
-:- import_module libs.compiler_util.
 :- import_module mdbcomp.prim_data.
 :- import_module parse_tree.error_util.
 :- import_module parse_tree.prog_util.
 
 :- import_module pair.
+:- import_module require.
 :- import_module string.
 :- import_module term.
 :- import_module term_io.
Index: compiler/prog_rep.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/prog_rep.m,v
retrieving revision 1.70
diff -u -b -r1.70 prog_rep.m
--- compiler/prog_rep.m	11 Oct 2010 00:49:21 -0000	1.70
+++ compiler/prog_rep.m	14 Dec 2010 11:28:17 -0000
@@ -85,13 +85,13 @@
 :- import_module hlds.code_model.
 :- import_module hlds.hlds_data.
 :- import_module hlds.hlds_pred.
-:- import_module libs.compiler_util.
 :- import_module mdbcomp.
 :- import_module mdbcomp.prim_data.
 :- import_module parse_tree.prog_util.
 
 :- import_module int.
 :- import_module maybe.
+:- import_module require.
 :- import_module set.
 :- import_module std_util.
 :- import_module string.
Index: compiler/prog_type.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/prog_type.m,v
retrieving revision 1.51
diff -u -b -r1.51 prog_type.m
--- compiler/prog_type.m	4 Sep 2009 02:27:54 -0000	1.51
+++ compiler/prog_type.m	14 Dec 2010 11:28:17 -0000
@@ -405,11 +405,11 @@
 :- implementation.
 
 :- import_module libs.options.
-:- import_module libs.compiler_util.
 :- import_module parse_tree.prog_out.
 :- import_module parse_tree.prog_util.
 :- import_module parse_tree.prog_type_subst.
 
+:- import_module require.
 :- import_module string.
 :- import_module svmap.
 
Index: compiler/prog_type_subst.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/prog_type_subst.m,v
retrieving revision 1.7
diff -u -b -r1.7 prog_type_subst.m
--- compiler/prog_type_subst.m	14 Sep 2009 03:30:30 -0000	1.7
+++ compiler/prog_type_subst.m	14 Dec 2010 11:28:18 -0000
@@ -121,10 +121,9 @@
 
 :- implementation.
 
-:- import_module libs.compiler_util.
-
 :- import_module map.
 :- import_module maybe.
+:- import_module require.
 :- import_module svmap.
 
 %-----------------------------------------------------------------------------%
Index: compiler/prog_util.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/prog_util.m,v
retrieving revision 1.109
diff -u -b -r1.109 prog_util.m
--- compiler/prog_util.m	11 Jun 2009 07:00:17 -0000	1.109
+++ compiler/prog_util.m	14 Dec 2010 11:28:18 -0000
@@ -189,7 +189,6 @@
 
 :- implementation.
 
-:- import_module libs.compiler_util.
 :- import_module parse_tree.mercury_to_mercury.
 :- import_module parse_tree.prog_out.
 
@@ -197,6 +196,7 @@
 :- import_module int.
 :- import_module map.
 :- import_module pair.
+:- import_module require.
 :- import_module string.
 :- import_module svmap.
 :- import_module term_io.
Index: compiler/prop_mode_constraints.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/prop_mode_constraints.m,v
retrieving revision 1.26
diff -u -b -r1.26 prop_mode_constraints.m
--- compiler/prop_mode_constraints.m	30 Mar 2010 23:57:25 -0000	1.26
+++ compiler/prop_mode_constraints.m	14 Dec 2010 11:28:18 -0000
@@ -83,14 +83,13 @@
 :- import_module hlds.hlds_clauses.
 :- import_module hlds.hlds_error_util.
 :- import_module hlds.hlds_goal.
-:- import_module libs.
-:- import_module libs.compiler_util.
 :- import_module parse_tree.
 :- import_module parse_tree.error_util.
 :- import_module parse_tree.prog_data.
 
 :- import_module bool.
 :- import_module pair.
+:- import_module require.
 :- import_module set.
 :- import_module string.
 :- import_module svmap.
Index: compiler/pseudo_type_info.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/pseudo_type_info.m,v
retrieving revision 1.32
diff -u -b -r1.32 pseudo_type_info.m
--- compiler/pseudo_type_info.m	4 Sep 2009 01:17:05 -0000	1.32
+++ compiler/pseudo_type_info.m	14 Dec 2010 11:28:18 -0000
@@ -63,14 +63,13 @@
 
 :- implementation.
 
-:- import_module libs.
-:- import_module libs.compiler_util.
 :- import_module mdbcomp.
 :- import_module mdbcomp.prim_data.
 :- import_module parse_tree.prog_type.
 
 :- import_module int.
 :- import_module list.
+:- import_module require.
 :- import_module term.
 
 %---------------------------------------------------------------------------%
Index: compiler/purity.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/purity.m,v
retrieving revision 1.138
diff -u -b -r1.138 purity.m
--- compiler/purity.m	30 Jul 2010 05:16:14 -0000	1.138
+++ compiler/purity.m	14 Dec 2010 11:28:18 -0000
@@ -177,7 +177,6 @@
 :- import_module hlds.pred_table.
 :- import_module hlds.quantification.
 :- import_module libs.
-:- import_module libs.compiler_util.
 :- import_module libs.file_util.
 :- import_module libs.globals.
 :- import_module libs.options.
@@ -190,17 +189,18 @@
 :- import_module parse_tree.prog_out.
 :- import_module parse_tree.prog_type.
 
+:- import_module assoc_list.
 :- import_module bool.
 :- import_module int.
 :- import_module list.
 :- import_module map.
 :- import_module maybe.
 :- import_module pair.
+:- import_module require.
 :- import_module set.
 :- import_module string.
 :- import_module term.
 :- import_module varset.
-:- import_module assoc_list.
 
 %-----------------------------------------------------------------------------%
 
Index: compiler/quantification.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/quantification.m,v
retrieving revision 1.139
diff -u -b -r1.139 quantification.m
--- compiler/quantification.m	1 Oct 2010 08:09:05 -0000	1.139
+++ compiler/quantification.m	14 Dec 2010 11:28:18 -0000
@@ -105,13 +105,13 @@
 
 :- import_module hlds.goal_util.
 :- import_module hlds.instmap.
-:- import_module libs.compiler_util.
 
 :- import_module assoc_list.
 :- import_module bool.
 :- import_module map.
 :- import_module maybe.
 :- import_module pair.
+:- import_module require.
 :- import_module string.
 :- import_module tree_bitset.
 :- import_module term.
Index: compiler/rat.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/rat.m,v
retrieving revision 1.7
diff -u -b -r1.7 rat.m
--- compiler/rat.m	1 Dec 2006 15:04:18 -0000	1.7
+++ compiler/rat.m	14 Dec 2010 11:28:18 -0000
@@ -79,9 +79,8 @@
 
 :- implementation.
 
-:- import_module libs.compiler_util.
-
 :- import_module int.
+:- import_module require.
 :- import_module string.
 
 %-----------------------------------------------------------------------------%
@@ -245,4 +244,3 @@
 %-----------------------------------------------------------------------------%
 :- end_module rat.
 %-----------------------------------------------------------------------------%
-%-----------------------------------------------------------------------------%
Index: compiler/rbmm.add_rbmm_goal_infos.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/rbmm.add_rbmm_goal_infos.m,v
retrieving revision 1.9
diff -u -b -r1.9 rbmm.add_rbmm_goal_infos.m
--- compiler/rbmm.add_rbmm_goal_infos.m	28 Nov 2009 01:58:00 -0000	1.9
+++ compiler/rbmm.add_rbmm_goal_infos.m	14 Dec 2010 11:28:18 -0000
@@ -62,7 +62,6 @@
 :- import_module hlds.hlds_goal.
 :- import_module hlds.hlds_pred.
 :- import_module libs.
-:- import_module libs.compiler_util.
 :- import_module libs.globals.
 :- import_module libs.options.
 :- import_module mdbcomp.
@@ -78,6 +77,7 @@
 :- import_module list.
 :- import_module map.
 :- import_module maybe.
+:- import_module require.
 :- import_module set.
 :- import_module string.
 
Index: compiler/rbmm.condition_renaming.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/rbmm.condition_renaming.m,v
retrieving revision 1.12
diff -u -b -r1.12 rbmm.condition_renaming.m
--- compiler/rbmm.condition_renaming.m	30 Jul 2010 05:16:15 -0000	1.12
+++ compiler/rbmm.condition_renaming.m	14 Dec 2010 11:28:18 -0000
@@ -132,8 +132,6 @@
 :- import_module check_hlds.
 :- import_module check_hlds.goal_path.
 :- import_module hlds.hlds_goal.
-:- import_module libs.
-:- import_module libs.compiler_util.
 :- import_module transform_hlds.rbmm.points_to_graph.
 :- import_module transform_hlds.smm_common.
 
@@ -141,6 +139,7 @@
 :- import_module int.
 :- import_module list.
 :- import_module pair.
+:- import_module require.
 :- import_module set.
 :- import_module svmap.
 :- import_module svset.
Index: compiler/rbmm.execution_path.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/rbmm.execution_path.m,v
retrieving revision 1.11
diff -u -b -r1.11 rbmm.execution_path.m
--- compiler/rbmm.execution_path.m	30 Jul 2010 05:16:15 -0000	1.11
+++ compiler/rbmm.execution_path.m	14 Dec 2010 11:28:18 -0000
@@ -35,13 +35,12 @@
 :- import_module hlds.hlds_data.
 :- import_module hlds.hlds_goal.
 :- import_module hlds.hlds_pred.
-:- import_module libs.
-:- import_module libs.compiler_util.
 :- import_module parse_tree.
 :- import_module parse_tree.prog_data.
 :- import_module transform_hlds.smm_common.
 
 :- import_module pair.
+:- import_module require.
 :- import_module string.
 :- import_module svmap.
 :- import_module list.
Index: compiler/rbmm.interproc_region_lifetime.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/rbmm.interproc_region_lifetime.m,v
retrieving revision 1.5
diff -u -b -r1.5 rbmm.interproc_region_lifetime.m
--- compiler/rbmm.interproc_region_lifetime.m	28 Nov 2009 01:58:00 -0000	1.5
+++ compiler/rbmm.interproc_region_lifetime.m	14 Dec 2010 11:28:18 -0000
@@ -64,8 +64,6 @@
 :- import_module hlds.arg_info.
 :- import_module hlds.hlds_goal.
 :- import_module hlds.hlds_pred.
-:- import_module libs.
-:- import_module libs.compiler_util.
 :- import_module parse_tree.
 :- import_module parse_tree.mercury_to_mercury.
 :- import_module parse_tree.prog_data.
@@ -80,6 +78,7 @@
 :- import_module map.
 :- import_module maybe.
 :- import_module pair.
+:- import_module require.
 :- import_module set.
 :- import_module solutions.
 :- import_module string.
Index: compiler/rbmm.live_region_analysis.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/rbmm.live_region_analysis.m,v
retrieving revision 1.5
diff -u -b -r1.5 rbmm.live_region_analysis.m
--- compiler/rbmm.live_region_analysis.m	30 Jul 2010 05:16:15 -0000	1.5
+++ compiler/rbmm.live_region_analysis.m	14 Dec 2010 11:28:18 -0000
@@ -45,8 +45,6 @@
 :- import_module hlds.arg_info.
 :- import_module hlds.hlds_goal.
 :- import_module hlds.hlds_pred.
-:- import_module libs.
-:- import_module libs.compiler_util.
 :- import_module parse_tree.
 :- import_module parse_tree.mercury_to_mercury.
 :- import_module parse_tree.prog_data.
@@ -58,6 +56,7 @@
 :- import_module list.
 :- import_module map.
 :- import_module pair.
+:- import_module require.
 :- import_module set.
 :- import_module string.
 :- import_module svmap.
Index: compiler/rbmm.live_variable_analysis.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/rbmm.live_variable_analysis.m,v
retrieving revision 1.4
diff -u -b -r1.4 rbmm.live_variable_analysis.m
--- compiler/rbmm.live_variable_analysis.m	30 Jul 2010 05:16:15 -0000	1.4
+++ compiler/rbmm.live_variable_analysis.m	14 Dec 2010 11:28:18 -0000
@@ -37,8 +37,6 @@
 :- import_module hlds.arg_info.
 :- import_module hlds.hlds_goal.
 :- import_module hlds.hlds_pred.
-:- import_module libs.
-:- import_module libs.compiler_util.
 :- import_module parse_tree.
 :- import_module parse_tree.mercury_to_mercury.
 :- import_module parse_tree.prog_data.
@@ -49,6 +47,7 @@
 :- import_module list.
 :- import_module map.
 :- import_module pair.
+:- import_module require.
 :- import_module set.
 :- import_module string.
 :- import_module svmap.
Index: compiler/rbmm.points_to_analysis.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/rbmm.points_to_analysis.m,v
retrieving revision 1.14
diff -u -b -r1.14 rbmm.points_to_analysis.m
--- compiler/rbmm.points_to_analysis.m	30 Jul 2010 05:16:15 -0000	1.14
+++ compiler/rbmm.points_to_analysis.m	14 Dec 2010 11:28:18 -0000
@@ -52,8 +52,6 @@
 :- import_module hlds.hlds_data.
 :- import_module hlds.hlds_goal.
 :- import_module hlds.hlds_pred.
-:- import_module libs.
-:- import_module libs.compiler_util.
 :- import_module parse_tree.
 :- import_module parse_tree.prog_data.
 :- import_module transform_hlds.dependency_graph.
@@ -67,6 +65,7 @@
 :- import_module list.
 :- import_module map.
 :- import_module maybe.
+:- import_module require.
 :- import_module set.
 :- import_module string.
 :- import_module svmap.
Index: compiler/rbmm.points_to_graph.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/rbmm.points_to_graph.m,v
retrieving revision 1.5
diff -u -b -r1.5 rbmm.points_to_graph.m
--- compiler/rbmm.points_to_graph.m	28 Nov 2009 01:58:00 -0000	1.5
+++ compiler/rbmm.points_to_graph.m	14 Dec 2010 11:28:18 -0000
@@ -269,13 +269,12 @@
 
 :- implementation.
 
-:- import_module libs.
-:- import_module libs.compiler_util.
 :- import_module transform_hlds.smm_common.
 
 :- import_module assoc_list.
 :- import_module counter.
 :- import_module pair.
+:- import_module require.
 :- import_module solutions.
 :- import_module svmap.
 :- import_module svset.
Index: compiler/rbmm.region_arguments.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/rbmm.region_arguments.m,v
retrieving revision 1.3
diff -u -b -r1.3 rbmm.region_arguments.m
--- compiler/rbmm.region_arguments.m	30 Jul 2010 05:16:15 -0000	1.3
+++ compiler/rbmm.region_arguments.m	14 Dec 2010 11:28:18 -0000
@@ -73,11 +73,11 @@
 :- import_module check_hlds.goal_path.
 :- import_module hlds.hlds_goal.
 :- import_module libs.
-:- import_module libs.compiler_util.
 :- import_module libs.globals.
 :- import_module libs.options.
 
 :- import_module bool.
+:- import_module require.
 :- import_module set.
 :- import_module string.
 :- import_module svmap.
Index: compiler/rbmm.region_instruction.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/rbmm.region_instruction.m,v
retrieving revision 1.9
diff -u -b -r1.9 rbmm.region_instruction.m
--- compiler/rbmm.region_instruction.m	30 Jul 2010 05:16:15 -0000	1.9
+++ compiler/rbmm.region_instruction.m	14 Dec 2010 11:28:18 -0000
@@ -113,12 +113,11 @@
 :- import_module hlds.hlds_data.
 :- import_module hlds.hlds_goal.
 :- import_module hlds.hlds_llds.
-:- import_module libs.
-:- import_module libs.compiler_util.
 :- import_module transform_hlds.rbmm.points_to_graph.
 
 :- import_module bool.
 :- import_module pair.
+:- import_module require.
 :- import_module set.
 :- import_module svmap.
 :- import_module svset.
Index: compiler/rbmm.region_resurrection_renaming.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/rbmm.region_resurrection_renaming.m,v
retrieving revision 1.7
diff -u -b -r1.7 rbmm.region_resurrection_renaming.m
--- compiler/rbmm.region_resurrection_renaming.m	23 Apr 2009 10:00:24 -0000	1.7
+++ compiler/rbmm.region_resurrection_renaming.m	14 Dec 2010 11:28:18 -0000
@@ -152,8 +152,6 @@
 :- implementation.
 
 :- import_module hlds.hlds_goal.
-:- import_module libs.
-:- import_module libs.compiler_util.
 :- import_module transform_hlds.rbmm.points_to_graph.
 
 :- import_module assoc_list.
@@ -161,6 +159,7 @@
 :- import_module counter.
 :- import_module int.
 :- import_module pair.
+:- import_module require.
 :- import_module set.
 :- import_module svmap.
 :- import_module svset.
Index: compiler/rbmm.region_transformation.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/rbmm.region_transformation.m,v
retrieving revision 1.13
diff -u -b -r1.13 rbmm.region_transformation.m
--- compiler/rbmm.region_transformation.m	28 Nov 2009 01:58:01 -0000	1.13
+++ compiler/rbmm.region_transformation.m	14 Dec 2010 11:28:18 -0000
@@ -83,8 +83,6 @@
 :- import_module hlds.instmap.
 :- import_module hlds.pred_table.
 :- import_module hlds.quantification.
-:- import_module libs.
-:- import_module libs.compiler_util.
 :- import_module mdbcomp.prim_data.
 :- import_module parse_tree.builtin_lib_types.
 :- import_module parse_tree.prog_mode.
@@ -96,6 +94,7 @@
 :- import_module int.
 :- import_module list.
 :- import_module pair.
+:- import_module require.
 :- import_module set.
 :- import_module svmap.
 :- import_module svvarset.
Index: compiler/reassign.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/reassign.m,v
retrieving revision 1.30
diff -u -b -r1.30 reassign.m
--- compiler/reassign.m	21 Oct 2009 06:36:21 -0000	1.30
+++ compiler/reassign.m	14 Dec 2010 11:28:19 -0000
@@ -111,12 +111,12 @@
 
 :- implementation.
 
-:- import_module libs.compiler_util.
 :- import_module ll_backend.code_util.
 
 :- import_module int.
 :- import_module map.
 :- import_module pair.
+:- import_module require.
 :- import_module set.
 :- import_module svmap.
 
Index: compiler/recompilation.check.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/recompilation.check.m,v
retrieving revision 1.51
diff -u -b -r1.51 recompilation.check.m
--- compiler/recompilation.check.m	5 Nov 2009 06:34:41 -0000	1.51
+++ compiler/recompilation.check.m	14 Dec 2010 11:28:19 -0000
@@ -66,7 +66,6 @@
 :- 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.compiler_util.
 :- import_module libs.options.
 :- import_module libs.timestamp.
 :- import_module parse_tree.error_util.
@@ -89,6 +88,7 @@
 :- import_module map.
 :- import_module maybe.
 :- import_module parser.
+:- import_module require.
 :- import_module set.
 :- import_module string.
 :- import_module svmap.
Index: compiler/recompilation.usage.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/recompilation.usage.m,v
retrieving revision 1.52
diff -u -b -r1.52 recompilation.usage.m
--- compiler/recompilation.usage.m	14 Oct 2009 05:28:43 -0000	1.52
+++ compiler/recompilation.usage.m	14 Dec 2010 11:28:19 -0000
@@ -86,7 +86,6 @@
 :- import_module hlds.hlds_pred.
 :- import_module hlds.passes_aux.
 :- import_module hlds.pred_table.
-:- import_module libs.compiler_util.
 :- import_module libs.file_util.
 :- import_module libs.globals.
 :- import_module libs.options.
@@ -105,6 +104,7 @@
 :- import_module bool.
 :- import_module int.
 :- import_module queue.
+:- import_module require.
 :- import_module solutions.
 :- import_module string.
 :- import_module svmap.
Index: compiler/recompilation.version.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/recompilation.version.m,v
retrieving revision 1.72
diff -u -b -r1.72 recompilation.version.m
--- compiler/recompilation.version.m	10 Sep 2010 05:14:59 -0000	1.72
+++ compiler/recompilation.version.m	14 Dec 2010 11:28:19 -0000
@@ -48,7 +48,6 @@
 
 :- import_module hlds.hlds_out.
 :- import_module hlds.hlds_out.hlds_out_mode.
-:- import_module libs.compiler_util.
 :- import_module parse_tree.error_util.
 :- import_module parse_tree.mercury_to_mercury.
 :- import_module parse_tree.prog_io_sym_name.
@@ -59,6 +58,7 @@
 :- import_module bool.
 :- import_module list.
 :- import_module map.
+:- import_module require.
 :- import_module string.
 :- import_module varset.
 
Index: compiler/rtti.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/rtti.m,v
retrieving revision 1.94
diff -u -b -r1.94 rtti.m
--- compiler/rtti.m	16 Sep 2010 00:39:06 -0000	1.94
+++ compiler/rtti.m	14 Dec 2010 11:28:19 -0000
@@ -30,6 +30,7 @@
 :- import_module hlds.hlds_data.
 :- import_module hlds.hlds_pred.
 :- import_module hlds.hlds_rtti.
+:- import_module libs.
 :- import_module libs.globals.
 :- import_module mdbcomp.
 :- import_module mdbcomp.prim_data.
@@ -958,13 +959,12 @@
 :- import_module check_hlds.        % needed for type_util, mode_util
 :- import_module check_hlds.mode_util.
 :- import_module hlds.hlds_data.
-:- import_module libs.
-:- import_module libs.compiler_util.
 :- import_module parse_tree.prog_foreign.
 :- import_module parse_tree.prog_type.
 
 :- import_module int.
 :- import_module pair.
+:- import_module require.
 :- import_module string.
 :- import_module table_builtin.
 :- import_module varset.
Index: compiler/rtti_out.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/rtti_out.m,v
retrieving revision 1.82
diff -u -b -r1.82 rtti_out.m
--- compiler/rtti_out.m	4 Nov 2009 03:44:50 -0000	1.82
+++ compiler/rtti_out.m	14 Dec 2010 11:28:19 -0000
@@ -107,7 +107,6 @@
 :- import_module backend_libs.type_ctor_info.
 :- import_module hlds.hlds_data.
 :- import_module hlds.hlds_rtti.
-:- import_module libs.compiler_util.
 :- import_module libs.globals.
 :- import_module ll_backend.code_util.
 :- import_module ll_backend.layout_out.
@@ -125,6 +124,7 @@
 :- import_module maybe.
 :- import_module multi_map.
 :- import_module pair.
+:- import_module require.
 :- import_module string.
 :- import_module svmulti_map.
 :- import_module univ.
Index: compiler/rtti_to_mlds.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/rtti_to_mlds.m,v
retrieving revision 1.96
diff -u -b -r1.96 rtti_to_mlds.m
--- compiler/rtti_to_mlds.m	23 Sep 2010 05:31:57 -0000	1.96
+++ compiler/rtti_to_mlds.m	14 Dec 2010 11:28:19 -0000
@@ -54,7 +54,6 @@
 :- import_module backend_libs.type_ctor_info.
 :- import_module hlds.hlds_data.
 :- import_module hlds.hlds_rtti.
-:- import_module libs.compiler_util.
 :- import_module libs.globals.
 :- import_module mdbcomp.prim_data.
 :- import_module ml_backend.ml_closure_gen.
@@ -73,6 +72,7 @@
 :- import_module map.
 :- import_module maybe.
 :- import_module pair.
+:- import_module require.
 :- import_module set.
 :- import_module svmap.
 :- import_module term.
Index: compiler/saved_vars.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/saved_vars.m,v
retrieving revision 1.85
diff -u -b -r1.85 saved_vars.m
--- compiler/saved_vars.m	5 Aug 2010 03:07:09 -0000	1.85
+++ compiler/saved_vars.m	14 Dec 2010 11:28:19 -0000
@@ -50,7 +50,6 @@
 :- import_module hlds.hlds_rtti.
 :- import_module hlds.passes_aux.
 :- import_module hlds.quantification.
-:- import_module libs.compiler_util.
 :- import_module parse_tree.prog_data.
 
 :- import_module bool.
@@ -58,6 +57,7 @@
 :- import_module list.
 :- import_module map.
 :- import_module pair.
+:- import_module require.
 :- import_module set.
 :- import_module term.
 :- import_module varset.
Index: compiler/simplify.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/simplify.m,v
retrieving revision 1.252
diff -u -b -r1.252 simplify.m
--- compiler/simplify.m	16 Sep 2010 00:39:06 -0000	1.252
+++ compiler/simplify.m	14 Dec 2010 11:28:19 -0000
@@ -139,7 +139,6 @@
 :- import_module hlds.pred_table.
 :- import_module hlds.quantification.
 :- import_module hlds.special_pred.
-:- import_module libs.compiler_util.
 :- import_module libs.file_util.
 :- import_module libs.options.
 :- import_module libs.trace_params.
@@ -161,6 +160,7 @@
 :- import_module map.
 :- import_module maybe.
 :- import_module pair.
+:- import_module require.
 :- import_module set.
 :- import_module string.
 :- import_module svvarset.
Index: compiler/size_prof.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/size_prof.m,v
retrieving revision 1.65
diff -u -b -r1.65 size_prof.m
--- compiler/size_prof.m	5 Aug 2010 03:07:09 -0000	1.65
+++ compiler/size_prof.m	14 Dec 2010 11:28:19 -0000
@@ -119,7 +119,6 @@
 :- import_module hlds.passes_aux.
 :- import_module hlds.pred_table.
 :- import_module hlds.quantification.
-:- import_module libs.compiler_util.
 :- import_module libs.globals.
 :- import_module libs.options.
 :- import_module mdbcomp.prim_data.
@@ -136,6 +135,7 @@
 :- import_module map.
 :- import_module maybe.
 :- import_module pair.
+:- import_module require.
 :- import_module set.
 :- import_module string.
 :- import_module svmap.
Index: compiler/special_pred.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/special_pred.m,v
retrieving revision 1.75
diff -u -b -r1.75 special_pred.m
--- compiler/special_pred.m	16 Sep 2010 00:39:06 -0000	1.75
+++ compiler/special_pred.m	14 Dec 2010 11:28:19 -0000
@@ -111,7 +111,6 @@
 :- implementation.
 
 :- import_module check_hlds.type_util.
-:- import_module libs.compiler_util.
 :- import_module libs.globals.
 :- import_module libs.options.
 :- import_module parse_tree.builtin_lib_types.
@@ -120,6 +119,7 @@
 
 :- import_module bool.
 :- import_module maybe.
+:- import_module require.
 :- import_module string.
 
 %-----------------------------------------------------------------------------%
Index: compiler/ssdebug.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/ssdebug.m,v
retrieving revision 1.32
diff -u -b -r1.32 ssdebug.m
--- compiler/ssdebug.m	23 Aug 2010 07:38:29 -0000	1.32
+++ compiler/ssdebug.m	14 Dec 2010 11:28:20 -0000
@@ -201,7 +201,6 @@
 :- import_module hlds.passes_aux.
 :- import_module hlds.pred_table.
 :- import_module hlds.quantification.
-:- import_module libs.compiler_util.
 :- import_module mdbcomp.prim_data.
 :- import_module parse_tree.builtin_lib_types.
 :- import_module parse_tree.file_names.
@@ -213,6 +212,7 @@
 :- import_module list.
 :- import_module map.
 :- import_module maybe.
+:- import_module require.
 :- import_module string.
 :- import_module svmap.
 :- import_module svvarset.
Index: compiler/stack_layout.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/stack_layout.m,v
retrieving revision 1.151
diff -u -b -r1.151 stack_layout.m
--- compiler/stack_layout.m	4 Jul 2010 10:24:08 -0000	1.151
+++ compiler/stack_layout.m	14 Dec 2010 11:28:20 -0000
@@ -107,7 +107,6 @@
 :- import_module hlds.hlds_pred.
 :- import_module hlds.hlds_rtti.
 :- import_module hlds.instmap.
-:- import_module libs.compiler_util.
 :- import_module libs.globals.
 :- import_module libs.options.
 :- import_module libs.trace_params.
@@ -123,6 +122,7 @@
 :- import_module int.
 :- import_module map.
 :- import_module pair.
+:- import_module require.
 :- import_module set.
 :- import_module string.
 :- import_module svmap.
Index: compiler/stack_opt.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/stack_opt.m,v
retrieving revision 1.44
diff -u -b -r1.44 stack_opt.m
--- compiler/stack_opt.m	5 Aug 2010 03:07:09 -0000	1.44
+++ compiler/stack_opt.m	14 Dec 2010 11:28:20 -0000
@@ -97,7 +97,6 @@
 :- import_module hlds.hlds_out.hlds_out_goal.
 :- import_module hlds.hlds_out.hlds_out_util.
 :- import_module hlds.quantification.
-:- import_module libs.compiler_util.
 :- import_module libs.globals.
 :- import_module libs.options.
 :- import_module ll_backend.live_vars.
@@ -116,6 +115,7 @@
 :- import_module map.
 :- import_module maybe.
 :- import_module pair.
+:- import_module require.
 :- import_module set.
 :- import_module svmap.
 :- import_module svset.
Index: compiler/state_var.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/state_var.m,v
retrieving revision 1.31
diff -u -b -r1.31 state_var.m
--- compiler/state_var.m	12 Nov 2009 04:06:22 -0000	1.31
+++ compiler/state_var.m	14 Dec 2010 11:28:20 -0000
@@ -348,13 +348,13 @@
 
 :- implementation.
 
-:- import_module libs.compiler_util.
 :- import_module parse_tree.prog_util.
 
 :- import_module char.
 :- import_module int.
 :- import_module io.
 :- import_module pair.
+:- import_module require.
 :- import_module string.
 :- import_module svmap.
 :- import_module term.
Index: compiler/stdlabel.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/stdlabel.m,v
retrieving revision 1.5
diff -u -b -r1.5 stdlabel.m
--- compiler/stdlabel.m	31 Jul 2007 01:56:41 -0000	1.5
+++ compiler/stdlabel.m	14 Dec 2010 11:28:20 -0000
@@ -40,13 +40,13 @@
 
 :- implementation.
 
-:- import_module libs.compiler_util.
 :- import_module ll_backend.opt_util.
 :- import_module mdbcomp.prim_data.
 
 :- import_module bool.
 :- import_module map.
 :- import_module pair.
+:- import_module require.
 :- import_module svmap.
 
 %-----------------------------------------------------------------------------%
Index: compiler/stm_expand.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/stm_expand.m,v
retrieving revision 1.12
diff -u -b -r1.12 stm_expand.m
--- compiler/stm_expand.m	15 Sep 2010 04:35:29 -0000	1.12
+++ compiler/stm_expand.m	14 Dec 2010 11:28:20 -0000
@@ -184,7 +184,6 @@
 :- import_module hlds.instmap.
 :- import_module hlds.pred_table.
 :- import_module hlds.quantification.
-:- import_module libs.compiler_util.
 :- import_module mdbcomp.prim_data.
 :- import_module parse_tree.builtin_lib_types.
 :- import_module parse_tree.prog_data.
@@ -199,6 +198,7 @@
 :- import_module map.
 :- import_module maybe.
 :- import_module pair.
+:- import_module require.
 :- import_module set.
 :- import_module string.
 :- import_module svmap.
Index: compiler/store_alloc.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/store_alloc.m,v
retrieving revision 1.111
diff -u -b -r1.111 store_alloc.m
--- compiler/store_alloc.m	5 Aug 2010 03:07:09 -0000	1.111
+++ compiler/store_alloc.m	14 Dec 2010 11:28:20 -0000
@@ -49,7 +49,6 @@
 :- import_module hlds.hlds_goal.
 :- import_module hlds.hlds_llds.
 :- import_module hlds.instmap.
-:- import_module libs.compiler_util.
 :- import_module libs.globals.
 :- import_module libs.trace_params.
 :- import_module ll_backend.code_util.
@@ -66,6 +65,7 @@
 :- import_module map.
 :- import_module maybe.
 :- import_module pair.
+:- import_module require.
 :- import_module set.
 
 %-----------------------------------------------------------------------------%
Index: compiler/stratify.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/stratify.m,v
retrieving revision 1.74
diff -u -b -r1.74 stratify.m
--- compiler/stratify.m	30 Jul 2010 05:16:16 -0000	1.74
+++ compiler/stratify.m	14 Dec 2010 11:28:20 -0000
@@ -58,7 +58,6 @@
 :- import_module hlds.hlds_module.
 :- import_module hlds.hlds_pred.
 :- import_module libs.
-:- import_module libs.compiler_util.
 :- import_module libs.globals.
 :- import_module libs.options.
 :- import_module mdbcomp.
@@ -73,6 +72,7 @@
 :- import_module digraph.
 :- import_module map.
 :- import_module pair.
+:- import_module require.
 :- import_module set.
 :- import_module string.
 
Index: compiler/string_switch.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/string_switch.m,v
retrieving revision 1.69
diff -u -b -r1.69 string_switch.m
--- compiler/string_switch.m	30 Nov 2010 04:06:54 -0000	1.69
+++ compiler/string_switch.m	14 Dec 2010 11:28:20 -0000
@@ -75,7 +75,6 @@
 :- import_module hlds.hlds_data.
 :- import_module hlds.hlds_goal.
 :- import_module hlds.hlds_llds.
-:- import_module libs.compiler_util.
 :- import_module ll_backend.code_gen.
 :- import_module ll_backend.lookup_util.
 :- import_module ll_backend.switch_case.
@@ -88,6 +87,7 @@
 :- import_module map.
 :- import_module maybe.
 :- import_module pair.
+:- import_module require.
 :- import_module set.
 :- import_module std_util.
 :- import_module string.
Index: compiler/structure_reuse.analysis.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/structure_reuse.analysis.m,v
retrieving revision 1.25
diff -u -b -r1.25 structure_reuse.analysis.m
--- compiler/structure_reuse.analysis.m	23 Aug 2010 07:38:29 -0000	1.25
+++ compiler/structure_reuse.analysis.m	14 Dec 2010 11:28:20 -0000
@@ -102,7 +102,6 @@
 :- import_module hlds.hlds_out.hlds_out_util.
 :- import_module hlds.passes_aux.
 :- import_module hlds.pred_table.
-:- import_module libs.compiler_util.
 :- import_module libs.file_util.
 :- import_module libs.globals.
 :- import_module libs.options.
@@ -129,6 +128,7 @@
 :- import_module list.
 :- import_module map.
 :- import_module maybe.
+:- import_module require.
 :- import_module set.
 :- import_module string.
 :- import_module svmap.
Index: compiler/structure_reuse.direct.choose_reuse.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/structure_reuse.direct.choose_reuse.m,v
retrieving revision 1.23
diff -u -b -r1.23 structure_reuse.direct.choose_reuse.m
--- compiler/structure_reuse.direct.choose_reuse.m	14 Oct 2009 05:28:44 -0000	1.23
+++ compiler/structure_reuse.direct.choose_reuse.m	14 Dec 2010 11:28:20 -0000
@@ -112,7 +112,6 @@
 
 :- import_module check_hlds.type_util.
 :- import_module hlds.hlds_data.
-:- import_module libs.compiler_util.
 :- import_module parse_tree.prog_data.
 
 :- import_module float.
@@ -120,6 +119,7 @@
 :- import_module maybe.
 :- import_module multi_map.
 :- import_module pair.
+:- import_module require.
 :- import_module set.
 :- import_module string.
 :- import_module svmulti_map.
Index: compiler/structure_reuse.direct.detect_garbage.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/structure_reuse.direct.detect_garbage.m,v
retrieving revision 1.22
diff -u -b -r1.22 structure_reuse.direct.detect_garbage.m
--- compiler/structure_reuse.direct.detect_garbage.m	11 Jun 2009 07:00:19 -0000	1.22
+++ compiler/structure_reuse.direct.detect_garbage.m	14 Dec 2010 11:28:20 -0000
@@ -37,7 +37,6 @@
 :- implementation.
 
 :- import_module check_hlds.type_util.
-:- import_module libs.compiler_util.
 :- import_module parse_tree.prog_data.
 :- import_module parse_tree.prog_out.
 :- import_module transform_hlds.ctgc.datastruct.
@@ -46,6 +45,7 @@
 :- import_module bool.
 :- import_module io.
 :- import_module pair.
+:- import_module require.
 :- import_module set.
 :- import_module string.
 
Index: compiler/structure_reuse.domain.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/structure_reuse.domain.m,v
retrieving revision 1.22
diff -u -b -r1.22 structure_reuse.domain.m
--- compiler/structure_reuse.domain.m	30 Jul 2010 05:16:16 -0000	1.22
+++ compiler/structure_reuse.domain.m	14 Dec 2010 11:28:20 -0000
@@ -271,13 +271,13 @@
 
 :- import_module hlds.hlds_out.
 :- import_module hlds.hlds_out.hlds_out_util.
-:- import_module libs.compiler_util.
 :- import_module parse_tree.prog_ctgc.
 :- import_module transform_hlds.ctgc.datastruct.
 :- import_module transform_hlds.ctgc.util.
 
 :- import_module maybe.
 :- import_module pair.
+:- import_module require.
 :- import_module set.
 :- import_module solutions.
 :- import_module string.
Index: compiler/structure_reuse.indirect.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/structure_reuse.indirect.m,v
retrieving revision 1.36
diff -u -b -r1.36 structure_reuse.indirect.m
--- compiler/structure_reuse.indirect.m	4 Nov 2009 03:44:51 -0000	1.36
+++ compiler/structure_reuse.indirect.m	14 Dec 2010 11:28:20 -0000
@@ -73,7 +73,6 @@
 :- import_module hlds.hlds_goal.
 :- import_module hlds.hlds_out.
 :- import_module hlds.hlds_out.hlds_out_util.
-:- import_module libs.compiler_util.
 :- import_module libs.globals.
 :- import_module libs.options.
 :- import_module parse_tree.mercury_to_mercury.
@@ -93,6 +92,7 @@
 :- import_module list.
 :- import_module map.
 :- import_module maybe.
+:- import_module require.
 :- import_module solutions.
 :- import_module string.
 
Index: compiler/structure_reuse.lbu.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/structure_reuse.lbu.m,v
retrieving revision 1.12
diff -u -b -r1.12 structure_reuse.lbu.m
--- compiler/structure_reuse.lbu.m	23 Dec 2008 01:37:41 -0000	1.12
+++ compiler/structure_reuse.lbu.m	14 Dec 2010 11:28:20 -0000
@@ -41,12 +41,12 @@
 
 :- import_module hlds.hlds_goal.
 :- import_module hlds.hlds_llds.
-:- import_module libs.compiler_util.
 :- import_module parse_tree.prog_data.
 :- import_module parse_tree.prog_type.
 
 :- import_module list.
 :- import_module pair.
+:- import_module require.
 :- import_module set.
 
 %-----------------------------------------------------------------------------%
Index: compiler/structure_reuse.lfu.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/structure_reuse.lfu.m,v
retrieving revision 1.14
diff -u -b -r1.14 structure_reuse.lfu.m
--- compiler/structure_reuse.lfu.m	10 Mar 2009 05:00:30 -0000	1.14
+++ compiler/structure_reuse.lfu.m	14 Dec 2010 11:28:20 -0000
@@ -45,12 +45,12 @@
 :- import_module hlds.hlds_goal.
 :- import_module hlds.hlds_llds.
 :- import_module hlds.hlds_pred.
-:- import_module libs.compiler_util.
 :- import_module parse_tree.prog_type.
 
 :- import_module list.
 :- import_module map.
 :- import_module pair.
+:- import_module require.
 
 %-----------------------------------------------------------------------------%
 
Index: compiler/structure_reuse.versions.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/structure_reuse.versions.m,v
retrieving revision 1.20
diff -u -b -r1.20 structure_reuse.versions.m
--- compiler/structure_reuse.versions.m	8 Sep 2009 02:43:39 -0000	1.20
+++ compiler/structure_reuse.versions.m	14 Dec 2010 11:28:20 -0000
@@ -65,7 +65,6 @@
 :- import_module hlds.passes_aux.
 :- import_module hlds.pred_table.
 :- import_module hlds.quantification.
-:- import_module libs.compiler_util.
 :- import_module libs.globals.
 :- import_module libs.options.
 :- import_module mdbcomp.
@@ -78,6 +77,7 @@
 :- import_module list.
 :- import_module map.
 :- import_module maybe.
+:- import_module require.
 :- import_module set.
 :- import_module string.
 
Index: compiler/structure_sharing.analysis.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/structure_sharing.analysis.m,v
retrieving revision 1.49
diff -u -b -r1.49 structure_sharing.analysis.m
--- compiler/structure_sharing.analysis.m	23 Aug 2010 07:38:29 -0000	1.49
+++ compiler/structure_sharing.analysis.m	14 Dec 2010 11:28:20 -0000
@@ -70,7 +70,6 @@
 :- import_module hlds.hlds_out.
 :- import_module hlds.hlds_out.hlds_out_util.
 :- import_module hlds.passes_aux.
-:- import_module libs.compiler_util.
 :- import_module libs.file_util.
 :- import_module libs.globals.
 :- import_module libs.options.
@@ -95,6 +94,7 @@
 :- import_module list.
 :- import_module map.
 :- import_module maybe.
+:- import_module require.
 :- import_module set.
 :- import_module string.
 :- import_module svmap.
Index: compiler/structure_sharing.domain.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/structure_sharing.domain.m,v
retrieving revision 1.41
diff -u -b -r1.41 structure_sharing.domain.m
--- compiler/structure_sharing.domain.m	30 Jul 2010 05:16:16 -0000	1.41
+++ compiler/structure_sharing.domain.m	14 Dec 2010 11:28:21 -0000
@@ -303,7 +303,6 @@
 :- import_module check_hlds.mode_util.
 :- import_module check_hlds.type_util.
 :- import_module hlds.hlds_llds.
-:- import_module libs.compiler_util.
 :- import_module mdbcomp.prim_data.
 :- import_module parse_tree.prog_ctgc.
 :- import_module parse_tree.prog_out.
@@ -317,6 +316,7 @@
 :- import_module int.
 :- import_module maybe.
 :- import_module pair.
+:- import_module require.
 :- import_module solutions.
 :- import_module string.
 :- import_module svmap.
Index: compiler/superhomogeneous.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/superhomogeneous.m,v
retrieving revision 1.37
diff -u -b -r1.37 superhomogeneous.m
--- compiler/superhomogeneous.m	14 Oct 2009 05:28:44 -0000	1.37
+++ compiler/superhomogeneous.m	14 Dec 2010 11:28:21 -0000
@@ -118,7 +118,6 @@
 :- import_module hlds.make_hlds.add_clause.
 :- import_module hlds.make_hlds.field_access.
 :- import_module hlds.make_hlds.qual_info.
-:- import_module libs.compiler_util.
 :- import_module libs.globals.  % for get_maybe_from_ground_term_threshold
 :- import_module parse_tree.mercury_to_mercury.
 :- import_module parse_tree.module_qual.
@@ -132,6 +131,7 @@
 :- import_module int.
 :- import_module map.
 :- import_module pair.
+:- import_module require.
 :- import_module set.
 :- import_module svvarset.
 :- import_module svset.
Index: compiler/switch_detection.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/switch_detection.m,v
retrieving revision 1.151
diff -u -b -r1.151 switch_detection.m
--- compiler/switch_detection.m	8 Nov 2010 03:43:42 -0000	1.151
+++ compiler/switch_detection.m	14 Dec 2010 11:28:21 -0000
@@ -76,7 +76,6 @@
 :- import_module hlds.passes_aux.
 :- import_module hlds.quantification.
 :- import_module libs.
-:- import_module libs.compiler_util.
 :- import_module libs.globals.
 :- import_module libs.options.
 :- import_module parse_tree.prog_data.
@@ -90,6 +89,7 @@
 :- import_module map.
 :- import_module maybe.
 :- import_module pair.
+:- import_module require.
 :- import_module set.
 :- import_module set_tree234.
 :- import_module string.
Index: compiler/switch_util.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/switch_util.m,v
retrieving revision 1.48
diff -u -b -r1.48 switch_util.m
--- compiler/switch_util.m	12 Nov 2010 02:22:01 -0000	1.48
+++ compiler/switch_util.m	14 Dec 2010 11:28:21 -0000
@@ -343,7 +343,6 @@
 :- import_module hlds.hlds_data.
 :- import_module hlds.hlds_code_util.
 :- import_module hlds.hlds_out.
-:- import_module libs.compiler_util.
 :- import_module libs.options.
 :- import_module parse_tree.prog_type.
 
@@ -351,6 +350,7 @@
 :- import_module cord.
 :- import_module int.
 :- import_module io.
+:- import_module require.
 :- import_module string.
 :- import_module svmap.
 
Index: compiler/table_gen.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/table_gen.m,v
retrieving revision 1.155
diff -u -b -r1.155 table_gen.m
--- compiler/table_gen.m	15 Sep 2010 04:35:29 -0000	1.155
+++ compiler/table_gen.m	14 Dec 2010 11:28:21 -0000
@@ -67,7 +67,6 @@
 :- import_module hlds.hlds_rtti.
 :- import_module hlds.instmap.
 :- import_module hlds.pred_table.
-:- import_module libs.compiler_util.
 :- import_module libs.globals.
 :- import_module libs.options.
 :- import_module ll_backend.
@@ -85,6 +84,7 @@
 :- import_module map.
 :- import_module maybe.
 :- import_module pair.
+:- import_module require.
 :- import_module set.
 :- import_module solutions.
 :- import_module string.
Index: compiler/tabling_analysis.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/tabling_analysis.m,v
retrieving revision 1.21
diff -u -b -r1.21 tabling_analysis.m
--- compiler/tabling_analysis.m	30 Jul 2010 05:16:17 -0000	1.21
+++ compiler/tabling_analysis.m	14 Dec 2010 11:28:21 -0000
@@ -89,7 +89,6 @@
 :- import_module hlds.hlds_error_util.
 :- import_module hlds.hlds_goal.
 :- import_module hlds.hlds_pred.
-:- import_module libs.compiler_util.
 :- import_module libs.file_util.
 :- import_module libs.globals.
 :- import_module libs.options.
@@ -106,6 +105,7 @@
 :- import_module map.
 :- import_module maybe.
 :- import_module pair.
+:- import_module require.
 :- import_module set.
 :- import_module string.
 :- import_module term.
Index: compiler/tag_switch.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/tag_switch.m,v
retrieving revision 1.84
diff -u -b -r1.84 tag_switch.m
--- compiler/tag_switch.m	10 Sep 2010 04:02:27 -0000	1.84
+++ compiler/tag_switch.m	14 Dec 2010 11:28:21 -0000
@@ -45,7 +45,6 @@
 :- import_module hlds.hlds_llds.
 :- import_module hlds.hlds_out.
 :- import_module hlds.hlds_pred.
-:- import_module libs.compiler_util.
 :- import_module libs.globals.
 :- import_module libs.options.
 :- import_module ll_backend.code_gen.
@@ -59,6 +58,7 @@
 :- import_module map.
 :- import_module maybe.
 :- import_module pair.
+:- import_module require.
 :- import_module string.
 :- import_module svmap.
 
Index: compiler/term_constr_build.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/term_constr_build.m,v
retrieving revision 1.27
diff -u -b -r1.27 term_constr_build.m
--- compiler/term_constr_build.m	30 Jul 2010 05:16:17 -0000	1.27
+++ compiler/term_constr_build.m	14 Dec 2010 11:28:21 -0000
@@ -67,7 +67,6 @@
 :- import_module hlds.hlds_out.
 :- import_module hlds.hlds_out.hlds_out_util.
 :- import_module hlds.quantification.
-:- import_module libs.compiler_util.
 :- import_module libs.lp_rational.
 :- import_module libs.polyhedron.
 :- import_module libs.rat.
@@ -83,6 +82,7 @@
 :- import_module map.
 :- import_module maybe.
 :- import_module pair.
+:- import_module require.
 :- import_module set.
 :- import_module std_util.
 :- import_module string.
Index: compiler/term_constr_data.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/term_constr_data.m,v
retrieving revision 1.12
diff -u -b -r1.12 term_constr_data.m
--- compiler/term_constr_data.m	4 Nov 2009 03:44:51 -0000	1.12
+++ compiler/term_constr_data.m	14 Dec 2010 11:28:21 -0000
@@ -384,10 +384,10 @@
 :- import_module hlds.hlds_pred.
 :- import_module hlds.hlds_out.
 :- import_module hlds.hlds_out.hlds_out_util.
-:- import_module libs.compiler_util.
 :- import_module parse_tree.prog_data.
 
 :- import_module int.
+:- import_module require.
 :- import_module std_util.
 :- import_module string.
 :- import_module varset.
Index: compiler/term_constr_errors.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/term_constr_errors.m,v
retrieving revision 1.10
diff -u -b -r1.10 term_constr_errors.m
--- compiler/term_constr_errors.m	30 Mar 2010 23:57:25 -0000	1.10
+++ compiler/term_constr_errors.m	14 Dec 2010 11:28:21 -0000
@@ -73,7 +73,6 @@
 :- implementation.
 
 :- import_module hlds.hlds_error_util.
-:- import_module libs.compiler_util.
 :- import_module libs.globals.
 :- import_module libs.options.
 :- import_module parse_tree.error_util.
@@ -82,6 +81,7 @@
 :- import_module bool.
 :- import_module int.
 :- import_module maybe.
+:- import_module require.
 :- import_module string.
 
 %-----------------------------------------------------------------------------%
Index: compiler/term_constr_fixpoint.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/term_constr_fixpoint.m,v
retrieving revision 1.10
diff -u -b -r1.10 term_constr_fixpoint.m
--- compiler/term_constr_fixpoint.m	4 Nov 2009 03:44:51 -0000	1.10
+++ compiler/term_constr_fixpoint.m	14 Dec 2010 11:28:21 -0000
@@ -56,7 +56,6 @@
 
 :- import_module hlds.hlds_out.
 :- import_module hlds.hlds_out.hlds_out_util.
-:- import_module libs.compiler_util.
 :- import_module libs.globals.
 :- import_module libs.lp_rational.
 :- import_module libs.options.
@@ -70,6 +69,7 @@
 :- import_module int.
 :- import_module io.
 :- import_module maybe.
+:- import_module require.
 :- import_module set.
 :- import_module string.
 :- import_module term.
Index: compiler/term_constr_initial.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/term_constr_initial.m,v
retrieving revision 1.28
diff -u -b -r1.28 term_constr_initial.m
--- compiler/term_constr_initial.m	30 Jul 2010 05:16:17 -0000	1.28
+++ compiler/term_constr_initial.m	14 Dec 2010 11:28:21 -0000
@@ -57,7 +57,6 @@
 
 :- import_module hlds.hlds_pred.
 :- import_module hlds.passes_aux.
-:- import_module libs.compiler_util.
 :- import_module libs.globals.
 :- import_module libs.lp_rational.
 :- import_module libs.options.
@@ -78,6 +77,7 @@
 :- import_module map.
 :- import_module maybe.
 :- import_module pair.
+:- import_module require.
 :- import_module set.
 :- import_module std_util.
 :- import_module string.
Index: compiler/term_constr_pass2.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/term_constr_pass2.m,v
retrieving revision 1.13
diff -u -b -r1.13 term_constr_pass2.m
--- compiler/term_constr_pass2.m	4 Nov 2009 03:44:51 -0000	1.13
+++ compiler/term_constr_pass2.m	14 Dec 2010 11:28:22 -0000
@@ -53,7 +53,6 @@
 :- import_module hlds.hlds_out.
 :- import_module hlds.hlds_out.hlds_out_util.
 :- import_module hlds.hlds_pred.
-:- import_module libs.compiler_util.
 :- import_module libs.lp_rational.
 :- import_module libs.polyhedron.
 :- import_module libs.rat.
@@ -69,6 +68,7 @@
 :- import_module map.
 :- import_module maybe.
 :- import_module pair.
+:- import_module require.
 :- import_module set.
 :- import_module term.
 :- import_module varset.
Index: compiler/term_constr_util.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/term_constr_util.m,v
retrieving revision 1.18
diff -u -b -r1.18 term_constr_util.m
--- compiler/term_constr_util.m	30 Jul 2010 05:16:17 -0000	1.18
+++ compiler/term_constr_util.m	14 Dec 2010 11:28:22 -0000
@@ -193,7 +193,6 @@
 :- import_module hlds.hlds_out.
 :- import_module hlds.hlds_out.hlds_out_util.
 :- import_module hlds.hlds_pred.
-:- import_module libs.compiler_util.
 :- import_module libs.globals.
 :- import_module libs.options.
 :- import_module libs.rat.
@@ -201,6 +200,7 @@
 :- import_module transform_hlds.term_norm.
 
 :- import_module pair.
+:- import_module require.
 :- import_module set.
 :- import_module std_util.
 :- import_module string.
Index: compiler/term_errors.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/term_errors.m,v
retrieving revision 1.43
diff -u -b -r1.43 term_errors.m
--- compiler/term_errors.m	30 Mar 2010 23:57:25 -0000	1.43
+++ compiler/term_errors.m	14 Dec 2010 11:28:22 -0000
@@ -165,7 +165,6 @@
 :- implementation.
 
 :- import_module hlds.hlds_error_util.
-:- import_module libs.compiler_util.
 :- import_module parse_tree.error_util.
 :- import_module transform_hlds.term_util.
 
@@ -174,6 +173,7 @@
 :- import_module int.
 :- import_module maybe.
 :- import_module pair.
+:- import_module require.
 :- import_module string.
 :- import_module term.
 :- import_module varset.
Index: compiler/term_norm.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/term_norm.m,v
retrieving revision 1.31
diff -u -b -r1.31 term_norm.m
--- compiler/term_norm.m	8 Sep 2009 02:43:40 -0000	1.31
+++ compiler/term_norm.m	14 Dec 2010 11:28:22 -0000
@@ -72,13 +72,13 @@
 
 :- import_module check_hlds.type_util.
 :- import_module hlds.hlds_data.
-:- import_module libs.compiler_util.
 :- import_module parse_tree.prog_type.
 
 :- import_module bool.
 :- import_module int.
 :- import_module map.
 :- import_module pair.
+:- import_module require.
 :- import_module svmap.
 
 %-----------------------------------------------------------------------------%
Index: compiler/term_pass1.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/term_pass1.m,v
retrieving revision 1.41
diff -u -b -r1.41 term_pass1.m
--- compiler/term_pass1.m	23 Dec 2008 01:37:41 -0000	1.41
+++ compiler/term_pass1.m	14 Dec 2010 11:28:22 -0000
@@ -57,7 +57,6 @@
 
 :- import_module hlds.goal_util.
 :- import_module hlds.hlds_goal.
-:- import_module libs.compiler_util.
 :- import_module libs.lp.
 :- import_module parse_tree.prog_data.
 :- import_module transform_hlds.term_traversal.
@@ -67,6 +66,7 @@
 :- import_module float.
 :- import_module map.
 :- import_module maybe.
+:- import_module require.
 :- import_module set.
 :- import_module svmap.
 :- import_module svset.
@@ -78,15 +78,16 @@
 
 :- type pass1_result
     --->    term_pass1_ok(
+                % One entry for each path through the code.
                 list(term_path_info),
-                        % One entry for each path through the
-                        % code.
-                used_args,
+
                         % The next output_supplier map.
+                used_args,
+
+                % There is an entry in this list for each procedure in the SCC
+                % in which the set of active vars is not a subset of the
+                % input arguments.
                 list(termination_error_context)
-                        % There is an entry in this list for each procedure in
-                        % the SCC in which the set of active vars is not a
-                        % subset of the input arguments.
             )
     ;       term_pass1_error(
                 list(termination_error_context)
Index: compiler/term_pass2.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/term_pass2.m,v
retrieving revision 1.33
diff -u -b -r1.33 term_pass2.m
--- compiler/term_pass2.m	29 Jan 2008 04:59:44 -0000	1.33
+++ compiler/term_pass2.m	14 Dec 2010 11:28:22 -0000
@@ -42,7 +42,6 @@
 
 :- import_module check_hlds.mode_util.
 :- import_module hlds.goal_util.
-:- import_module libs.compiler_util.
 :- import_module parse_tree.prog_data.
 :- import_module transform_hlds.term_errors.
 :- import_module transform_hlds.term_traversal.
@@ -54,6 +53,7 @@
 :- import_module map.
 :- import_module maybe.
 :- import_module pair.
+:- import_module require.
 :- import_module set.
 :- import_module term.
 :- import_module unit.
Index: compiler/term_traversal.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/term_traversal.m,v
retrieving revision 1.62
diff -u -b -r1.62 term_traversal.m
--- compiler/term_traversal.m	8 Sep 2009 02:43:40 -0000	1.62
+++ compiler/term_traversal.m	14 Dec 2010 11:28:22 -0000
@@ -108,13 +108,13 @@
 
 :- implementation.
 
-:- import_module libs.compiler_util.
 :- import_module parse_tree.prog_type.
 
 :- import_module assoc_list.
 :- import_module bool.
 :- import_module int.
 :- import_module map.
+:- import_module require.
 :- import_module svset.
 
 %-----------------------------------------------------------------------------%
Index: compiler/term_util.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/term_util.m,v
retrieving revision 1.59
diff -u -b -r1.59 term_util.m
--- compiler/term_util.m	30 Jul 2010 05:16:17 -0000	1.59
+++ compiler/term_util.m	14 Dec 2010 11:28:22 -0000
@@ -173,10 +173,10 @@
 
 :- import_module check_hlds.inst_match.
 :- import_module check_hlds.mode_util.
-:- import_module libs.compiler_util.
 :- import_module parse_tree.prog_type.
 
 :- import_module pair.
+:- import_module require.
 
 %-----------------------------------------------------------------------------%
 %-----------------------------------------------------------------------------%
Index: compiler/termination.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/termination.m,v
retrieving revision 1.84
diff -u -b -r1.84 termination.m
--- compiler/termination.m	30 Jul 2010 05:16:17 -0000	1.84
+++ compiler/termination.m	14 Dec 2010 11:28:22 -0000
@@ -61,7 +61,6 @@
 :- import_module hlds.hlds_error_util.
 :- import_module hlds.hlds_goal.
 :- import_module hlds.passes_aux.
-:- import_module libs.compiler_util.
 :- import_module libs.file_util.
 :- import_module libs.globals.
 :- import_module libs.options.
@@ -81,6 +80,7 @@
 :- import_module map.
 :- import_module maybe.
 :- import_module pair.
+:- import_module require.
 :- import_module set.
 :- import_module string.
 :- import_module svmap.
Index: compiler/trace_gen.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/trace_gen.m,v
retrieving revision 1.29
diff -u -b -r1.29 trace_gen.m
--- compiler/trace_gen.m	21 Oct 2009 06:36:22 -0000	1.29
+++ compiler/trace_gen.m	14 Dec 2010 11:28:22 -0000
@@ -249,7 +249,6 @@
 :- import_module hlds.code_model.
 :- import_module hlds.hlds_llds.
 :- import_module hlds.instmap.
-:- import_module libs.compiler_util.
 :- import_module libs.options.
 :- import_module libs.trace_params.
 :- import_module ll_backend.code_util.
@@ -262,6 +261,7 @@
 :- import_module cord.
 :- import_module int.
 :- import_module list.
+:- import_module require.
 :- import_module string.
 :- import_module term.
 :- import_module varset.
Index: compiler/trailing_analysis.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/trailing_analysis.m,v
retrieving revision 1.40
diff -u -b -r1.40 trailing_analysis.m
--- compiler/trailing_analysis.m	30 Jul 2010 05:16:18 -0000	1.40
+++ compiler/trailing_analysis.m	14 Dec 2010 11:28:22 -0000
@@ -89,7 +89,6 @@
 :- import_module hlds.hlds_error_util.
 :- import_module hlds.hlds_goal.
 :- import_module hlds.hlds_pred.
-:- import_module libs.compiler_util.
 :- import_module libs.file_util.
 :- import_module libs.globals.
 :- import_module libs.options.
@@ -107,6 +106,7 @@
 :- import_module map.
 :- import_module maybe.
 :- import_module pair.
+:- import_module require.
 :- import_module set.
 :- import_module string.
 :- import_module term.
Index: compiler/transform_llds.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/transform_llds.m,v
retrieving revision 1.34
diff -u -b -r1.34 transform_llds.m
--- compiler/transform_llds.m	14 Oct 2009 05:28:44 -0000	1.34
+++ compiler/transform_llds.m	14 Dec 2010 11:28:22 -0000
@@ -38,7 +38,6 @@
 :- import_module hlds.hlds_pred.
 :- import_module backend_libs.builtin_ops.
 :- import_module hlds.code_model.
-:- import_module libs.compiler_util.
 :- import_module libs.options.
 :- import_module mdbcomp.prim_data.
 
@@ -47,6 +46,7 @@
 :- import_module list.
 :- import_module maybe.
 :- import_module pair.
+:- import_module require.
 :- import_module set.
 :- import_module string.
 
Index: compiler/try_expand.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/try_expand.m,v
retrieving revision 1.11
diff -u -b -r1.11 try_expand.m
--- compiler/try_expand.m	30 Jul 2010 05:16:18 -0000	1.11
+++ compiler/try_expand.m	14 Dec 2010 11:28:22 -0000
@@ -227,8 +227,6 @@
 :- import_module hlds.passes_aux.
 :- import_module hlds.pred_table.
 :- import_module hlds.quantification.
-:- import_module libs.
-:- import_module libs.compiler_util.
 :- import_module mdbcomp.
 :- import_module mdbcomp.prim_data.
 :- import_module parse_tree.
@@ -241,6 +239,7 @@
 :- import_module map.
 :- import_module maybe.
 :- import_module pair.
+:- import_module require.
 :- import_module set.
 :- import_module string.
 :- import_module term.
Index: compiler/tupling.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/tupling.m,v
retrieving revision 1.52
diff -u -b -r1.52 tupling.m
--- compiler/tupling.m	5 Aug 2010 03:07:09 -0000	1.52
+++ compiler/tupling.m	14 Dec 2010 11:40:38 -0000
@@ -114,11 +114,11 @@
 :- import_module libs.options.
 :- import_module ll_backend.
 :- import_module ll_backend.call_gen.
-:- import_module ll_backend.liveness.
 :- import_module ll_backend.live_vars.
+:- import_module ll_backend.liveness.
 :- import_module mdbcomp.prim_data.
-:- import_module mdbcomp.trace_counts.
 :- import_module mdbcomp.program_representation.
+:- import_module mdbcomp.trace_counts.
 :- import_module parse_tree.prog_data.
 :- import_module parse_tree.prog_mode.
 :- import_module parse_tree.prog_type.
@@ -137,6 +137,7 @@
 :- import_module maybe.
 :- import_module multi_map.
 :- import_module pair.
+:- import_module require.
 :- import_module set.
 :- import_module string.
 :- import_module svmap.
Index: compiler/type_class_info.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/type_class_info.m,v
retrieving revision 1.23
diff -u -b -r1.23 type_class_info.m
--- compiler/type_class_info.m	13 Oct 2006 04:52:26 -0000	1.23
+++ compiler/type_class_info.m	14 Dec 2010 11:28:23 -0000
@@ -49,14 +49,13 @@
 :- import_module hlds.hlds_data.
 :- import_module hlds.hlds_pred.
 :- import_module hlds.hlds_rtti.
-:- import_module libs.
-:- import_module libs.compiler_util.
 :- import_module mdbcomp.
 :- import_module mdbcomp.prim_data.
 
 :- import_module map.
 :- import_module maybe.
 :- import_module pair.
+:- import_module require.
 :- import_module term.
 :- import_module varset.
 
Index: compiler/type_ctor_info.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/type_ctor_info.m,v
retrieving revision 1.101
diff -u -b -r1.101 type_ctor_info.m
--- compiler/type_ctor_info.m	25 Sep 2009 05:13:06 -0000	1.101
+++ compiler/type_ctor_info.m	14 Dec 2010 11:28:23 -0000
@@ -77,7 +77,6 @@
 :- import_module hlds.pred_table.
 :- import_module hlds.special_pred.
 :- import_module libs.
-:- import_module libs.compiler_util.
 :- import_module libs.globals.
 :- import_module libs.options.
 :- import_module mdbcomp.
@@ -93,6 +92,7 @@
 :- import_module map.
 :- import_module maybe.
 :- import_module pair.
+:- import_module require.
 :- import_module set.
 :- import_module string.
 :- import_module svmap.
Index: compiler/type_util.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/type_util.m,v
retrieving revision 1.203
diff -u -b -r1.203 type_util.m
--- compiler/type_util.m	25 Sep 2009 05:13:06 -0000	1.203
+++ compiler/type_util.m	14 Dec 2010 11:28:23 -0000
@@ -349,7 +349,6 @@
 :- import_module backend_libs.
 :- import_module backend_libs.foreign.
 :- import_module libs.
-:- import_module libs.compiler_util.
 :- import_module libs.globals.
 :- import_module libs.options.
 :- import_module parse_tree.builtin_lib_types.
@@ -361,6 +360,7 @@
 :- import_module char.
 :- import_module int.
 :- import_module map.
+:- import_module require.
 :- import_module set.
 :- import_module svset.
 :- import_module term.
Index: compiler/typecheck.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/typecheck.m,v
retrieving revision 1.448
diff -u -b -r1.448 typecheck.m
--- compiler/typecheck.m	8 Nov 2010 03:43:42 -0000	1.448
+++ compiler/typecheck.m	14 Dec 2010 11:28:23 -0000
@@ -116,7 +116,6 @@
 :- import_module hlds.pred_table.
 :- import_module hlds.special_pred.
 :- import_module libs.
-:- import_module libs.compiler_util.
 :- import_module libs.globals.
 :- import_module libs.options.
 :- import_module mdbcomp.
@@ -136,6 +135,7 @@
 :- import_module map.
 :- import_module maybe.
 :- import_module pair.
+:- import_module require.
 :- import_module set.
 :- import_module set_tree234.
 :- import_module std_util.
Index: compiler/typecheck_errors.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/typecheck_errors.m,v
retrieving revision 1.47
diff -u -b -r1.47 typecheck_errors.m
--- compiler/typecheck_errors.m	4 Nov 2009 03:44:51 -0000	1.47
+++ compiler/typecheck_errors.m	14 Dec 2010 11:28:23 -0000
@@ -106,7 +106,6 @@
 :- import_module hlds.hlds_out.hlds_out_util.
 :- import_module hlds.pred_table.
 :- import_module libs.
-:- import_module libs.compiler_util.
 :- import_module libs.options.
 :- import_module parse_tree.mercury_to_mercury.
 :- import_module parse_tree.modules.
@@ -122,6 +121,7 @@
 :- import_module map.
 :- import_module maybe.
 :- import_module pair.
+:- import_module require.
 :- import_module set.
 :- import_module solutions.
 :- import_module string.
Index: compiler/typecheck_info.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/typecheck_info.m,v
retrieving revision 1.31
diff -u -b -r1.31 typecheck_info.m
--- compiler/typecheck_info.m	12 Jan 2010 03:12:36 -0000	1.31
+++ compiler/typecheck_info.m	14 Dec 2010 11:28:23 -0000
@@ -370,7 +370,6 @@
 
 :- import_module check_hlds.type_util.
 :- import_module libs.
-:- import_module libs.compiler_util.
 :- import_module libs.file_util.
 :- import_module libs.globals.
 :- import_module libs.options.
@@ -381,6 +380,7 @@
 :- import_module assoc_list.
 :- import_module int.
 :- import_module pair.
+:- import_module require.
 :- import_module string.
 :- import_module set.
 :- import_module svmap.
Index: compiler/unify_gen.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/unify_gen.m,v
retrieving revision 1.198
diff -u -b -r1.198 unify_gen.m
--- compiler/unify_gen.m	1 Nov 2010 04:03:00 -0000	1.198
+++ compiler/unify_gen.m	14 Dec 2010 11:28:23 -0000
@@ -69,7 +69,6 @@
 :- import_module hlds.hlds_out.hlds_out_util.
 :- import_module hlds.hlds_pred.
 :- import_module hlds.hlds_rtti.
-:- import_module libs.compiler_util.
 :- import_module libs.globals.
 :- import_module libs.options.
 :- import_module ll_backend.code_util.
@@ -89,6 +88,7 @@
 :- import_module map.
 :- import_module maybe.
 :- import_module pair.
+:- import_module require.
 :- import_module set.
 :- import_module string.
 :- import_module svmap.
Index: compiler/unify_proc.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/unify_proc.m,v
retrieving revision 1.213
diff -u -b -r1.213 unify_proc.m
--- compiler/unify_proc.m	15 Sep 2010 04:35:29 -0000	1.213
+++ compiler/unify_proc.m	14 Dec 2010 11:28:23 -0000
@@ -147,7 +147,6 @@
 :- import_module hlds.quantification.
 :- import_module hlds.special_pred.
 :- import_module libs.
-:- import_module libs.compiler_util.
 :- import_module libs.globals.
 :- import_module libs.options.
 :- import_module mdbcomp.prim_data.
@@ -161,6 +160,7 @@
 :- import_module int.
 :- import_module map.
 :- import_module pair.
+:- import_module require.
 :- import_module set.
 :- import_module string.
 :- import_module svmap.
Index: compiler/unique_modes.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/unique_modes.m,v
retrieving revision 1.134
diff -u -b -r1.134 unique_modes.m
--- compiler/unique_modes.m	14 Sep 2010 09:08:28 -0000	1.134
+++ compiler/unique_modes.m	14 Dec 2010 11:28:23 -0000
@@ -91,8 +91,6 @@
 :- import_module check_hlds.modecheck_util.
 :- import_module check_hlds.modes.
 :- import_module hlds.instmap.
-:- import_module libs.
-:- import_module libs.compiler_util.
 :- import_module mdbcomp.
 :- import_module mdbcomp.prim_data.
 :- import_module parse_tree.prog_mode.
@@ -103,6 +101,7 @@
 :- import_module map.
 :- import_module maybe.
 :- import_module pair.
+:- import_module require.
 :- import_module string.
 :- import_module term.
 
Index: compiler/unneeded_code.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/unneeded_code.m,v
retrieving revision 1.54
diff -u -b -r1.54 unneeded_code.m
--- compiler/unneeded_code.m	5 Aug 2010 03:07:09 -0000	1.54
+++ compiler/unneeded_code.m	14 Dec 2010 11:28:23 -0000
@@ -83,7 +83,6 @@
 :- import_module hlds.instmap.
 :- import_module hlds.passes_aux.
 :- import_module hlds.quantification.
-:- import_module libs.compiler_util.
 :- import_module libs.globals.
 :- import_module libs.options.
 :- import_module mdbcomp.program_representation.
@@ -98,6 +97,7 @@
 :- import_module map.
 :- import_module maybe.
 :- import_module pair.
+:- import_module require.
 :- import_module set.
 :- import_module string.
 :- import_module svmap.
Index: compiler/untupling.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/untupling.m,v
retrieving revision 1.36
diff -u -b -r1.36 untupling.m
--- compiler/untupling.m	30 Jul 2010 05:16:19 -0000	1.36
+++ compiler/untupling.m	14 Dec 2010 11:28:23 -0000
@@ -107,7 +107,6 @@
 :- import_module hlds.hlds_goal.
 :- import_module hlds.hlds_pred.
 :- import_module hlds.quantification.
-:- import_module libs.compiler_util.
 :- import_module mdbcomp.prim_data.
 :- import_module parse_tree.prog_data.
 :- import_module parse_tree.prog_mode.
@@ -121,6 +120,7 @@
 :- import_module map.
 :- import_module maybe.
 :- import_module pair.
+:- import_module require.
 :- import_module string.
 :- import_module svmap.
 :- import_module svvarset.
Index: compiler/unused_args.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/unused_args.m,v
retrieving revision 1.164
diff -u -b -r1.164 unused_args.m
--- compiler/unused_args.m	30 Jul 2010 05:16:19 -0000	1.164
+++ compiler/unused_args.m	14 Dec 2010 11:28:23 -0000
@@ -97,7 +97,6 @@
 :- import_module hlds.instmap.
 :- import_module hlds.pred_table.
 :- import_module hlds.quantification.
-:- import_module libs.compiler_util.
 :- import_module libs.globals.
 :- import_module libs.options.
 :- import_module mdbcomp.prim_data.
@@ -114,6 +113,7 @@
 :- import_module map.
 :- import_module maybe.
 :- import_module pair.
+:- import_module require.
 :- import_module set.
 :- import_module string.
 :- import_module svmap.
Index: compiler/use_local_vars.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/use_local_vars.m,v
retrieving revision 1.40
diff -u -b -r1.40 use_local_vars.m
--- compiler/use_local_vars.m	21 Oct 2009 06:36:22 -0000	1.40
+++ compiler/use_local_vars.m	14 Dec 2010 11:28:24 -0000
@@ -82,7 +82,6 @@
 
 :- implementation.
 
-:- import_module libs.compiler_util.
 :- import_module ll_backend.basic_block.
 :- import_module ll_backend.code_util.
 :- import_module ll_backend.exprn_aux.
@@ -95,6 +94,7 @@
 :- import_module map.
 :- import_module maybe.
 :- import_module pair.
+:- import_module require.
 :- import_module set.
 :- import_module string.
 
Index: compiler/var_locn.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/var_locn.m,v
retrieving revision 1.70
diff -u -b -r1.70 var_locn.m
--- compiler/var_locn.m	30 Nov 2010 04:06:54 -0000	1.70
+++ compiler/var_locn.m	14 Dec 2010 11:28:24 -0000
@@ -371,7 +371,6 @@
 
 :- import_module backend_libs.builtin_ops.
 :- import_module check_hlds.type_util.
-:- import_module libs.compiler_util.
 :- import_module libs.options.
 :- import_module ll_backend.code_util.
 :- import_module ll_backend.exprn_aux.
@@ -380,6 +379,7 @@
 :- import_module getopt_io.
 :- import_module int.
 :- import_module pair.
+:- import_module require.
 :- import_module string.
 :- import_module svmap.
 :- import_module term.
Index: compiler/wrap_blocks.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/wrap_blocks.m,v
retrieving revision 1.17
diff -u -b -r1.17 wrap_blocks.m
--- compiler/wrap_blocks.m	23 Nov 2007 07:35:33 -0000	1.17
+++ compiler/wrap_blocks.m	14 Dec 2010 11:28:24 -0000
@@ -34,12 +34,12 @@
 
 :- implementation.
 
-:- import_module libs.compiler_util.
 :- import_module ll_backend.opt_util.
 
 :- import_module bool.
 :- import_module int.
 :- import_module pair.
+:- import_module require.
 
 %-----------------------------------------------------------------------------%
 
Index: compiler/write_deps_file.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/write_deps_file.m,v
retrieving revision 1.11
diff -u -b -r1.11 write_deps_file.m
--- compiler/write_deps_file.m	21 Sep 2010 07:43:18 -0000	1.11
+++ compiler/write_deps_file.m	14 Dec 2010 11:28:24 -0000
@@ -81,7 +81,6 @@
 
 :- implementation.
 
-:- import_module libs.compiler_util.
 :- import_module libs.options.
 :- import_module make.                      % undesirable dependency
 :- import_module parse_tree.file_names.
@@ -97,8 +96,9 @@
 :- import_module dir.
 :- import_module library.
 :- import_module map.
-:- import_module string.
 :- import_module pair.
+:- import_module require.
+:- import_module string.
 
 %-----------------------------------------------------------------------------%
 
Index: compiler/x86_64_out.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/x86_64_out.m,v
retrieving revision 1.5
diff -u -b -r1.5 x86_64_out.m
--- compiler/x86_64_out.m	23 Nov 2007 07:35:33 -0000	1.5
+++ compiler/x86_64_out.m	14 Dec 2010 11:28:24 -0000
@@ -43,7 +43,6 @@
 
 :- implementation.
 
-:- import_module libs.compiler_util.
 :- import_module ll_backend.x86_64_regs.
 
 :- import_module bool.
@@ -51,6 +50,7 @@
 :- import_module int.
 :- import_module list.
 :- import_module maybe.
+:- import_module require.
 :- import_module stream.string_writer.
 :- import_module string.
 :- import_module type_desc.
Index: compiler/x86_64_regs.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/x86_64_regs.m,v
retrieving revision 1.2
diff -u -b -r1.2 x86_64_regs.m
--- compiler/x86_64_regs.m	23 Nov 2007 07:35:33 -0000	1.2
+++ compiler/x86_64_regs.m	14 Dec 2010 11:28:24 -0000
@@ -51,7 +51,8 @@
     % Create an association list of lvals and reg_lcons. This is identical to 
     % the one defined in runtime/machdeps/x86_64_regs.h.
     %
-:- pred default_x86_64_reg_mapping(assoc_list(llds.lval, reg_locn)::out) is det. 
+:- pred default_x86_64_reg_mapping(assoc_list(llds.lval, reg_locn)::out)
+    is det. 
 
     % Create a reg_map given an association list of lvals and reg_locns.
     % Throws an exception if an l-value in the association list does not
@@ -89,16 +90,14 @@
 
 :- implementation.
 
-:- import_module libs.compiler_util.
-
 :- import_module bool.
+:- import_module io.
 :- import_module list. 
 :- import_module map.
 :- import_module pair. 
+:- import_module require.
 :- import_module string. 
 
-:- import_module io.
-
 %----------------------------------------------------------------------------%
 % 
 % LLDS -> x86_64 register mapping. 
@@ -106,10 +105,11 @@
 
 :- type reg_map
 	--->	reg_map(
-				scratch_reg_info        :: list(x86_64_reg), 
                 % A list of unused scratch registers.
-				map(llds.lval, reg_locn)
+                scratch_reg_info        :: list(x86_64_reg), 
+
 			    % Mapping lval to an actual or virtual register. 
+                lval_reg_map            :: map(llds.lval, reg_locn)
             ).
 
 %----------------------------------------------------------------------------%
cvs diff: Diffing compiler/notes
cvs diff: Diffing deep_profiler
Index: deep_profiler/analysis_utils.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/deep_profiler/analysis_utils.m,v
retrieving revision 1.2
diff -u -b -r1.2 analysis_utils.m
--- deep_profiler/analysis_utils.m	10 Oct 2010 04:19:53 -0000	1.2
+++ deep_profiler/analysis_utils.m	14 Dec 2010 12:00:01 -0000
@@ -222,7 +222,8 @@
             DepthI = recursion_depth_to_int(Depth)
         ;
             MaybeDepth = no,
-            error(this_file ++ "Expected valid depth for known recursion type")
+            unexpected($module,
+                "Expected valid depth for known recursion type")
         ),
     
         get_recursive_calls_and_counts(Deep, CliquePtr, PDPtr,
@@ -237,10 +238,9 @@
             format_recursive_call_site_cost_map(
                 RecursiveCallSiteCostMap, PrettyCostMapCord),
             PrettyCostMap = append_list(cord.list(PrettyCostMapCord)),
-            io.format("D: In clique %s recursive call site cost map"
-                    ++ " is:\n%s\n",
-                [s(string(CliquePtr)), s(PrettyCostMap)],
-                !IO),
+            io.format(
+                "D: In clique %s recursive call site cost map is:\n%s\n",
+                [s(string(CliquePtr)), s(PrettyCostMap)], !IO),
             io.flush_output(!IO)
         )
     ;
@@ -276,7 +276,8 @@
     pair(call_site_static_ptr, call_site_array_slot)::in,
     map(goal_path, int)::in, map(goal_path, int)::out) is det.
 
-build_recursive_call_site_counts_map(Deep, CliquePtr, CSSPtr - CSDSlot, !Map) :-
+build_recursive_call_site_counts_map(Deep, CliquePtr, CSSPtr - CSDSlot,
+        !Map) :-
     (
         CSDSlot = slot_normal(CSDPtr),
         ( valid_call_site_dynamic_ptr(Deep, CSDPtr) ->
@@ -372,6 +373,6 @@
 
 :- func this_file = string.
 
-this_file = "analysis_utils.m: ".
+this_file = "analysis_utils.m".
 
 %----------------------------------------------------------------------------%
Index: deep_profiler/array_util.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/deep_profiler/array_util.m,v
retrieving revision 1.12
diff -u -b -r1.12 array_util.m
Index: deep_profiler/branch_and_bound.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/deep_profiler/branch_and_bound.m,v
retrieving revision 1.2
diff -u -b -r1.2 branch_and_bound.m
--- deep_profiler/branch_and_bound.m	13 Dec 2010 04:31:45 -0000	1.2
+++ deep_profiler/branch_and_bound.m	14 Dec 2010 12:00:34 -0000
@@ -154,7 +154,8 @@
 :- mode branch_and_bound_2(pred(in, out) is nondet, 
     func(in) = out is det, in, out) is det.
 
-branch_and_bound_2(Generator, ObjectiveFn, unit, FinalBestSolutions - FinalProfile) :-
+branch_and_bound_2(Generator, ObjectiveFn, unit,
+        FinalBestSolutions - FinalProfile) :-
     % Use a failure driven loop to implement a branch and bound solver.
     promise_pure (
         trace [compile_time(flag("debug_branch_and_bound")), io(!IO)] (
@@ -178,7 +179,7 @@
 
             semidet_fail
         ->
-            error(this_file ++ "Failure driven loop must fail")
+            unexpected($module, "Failure driven loop must fail")
         ;
             true
         ),
@@ -356,7 +357,7 @@
 
 :- func this_file = string.
 
-this_file = "branch_and_bound.m: ".
+this_file = "branch_and_bound.m".
 
 %-----------------------------------------------------------------------------%
 :- end_module branch_and_bound.
Index: deep_profiler/callgraph.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/deep_profiler/callgraph.m,v
retrieving revision 1.12
diff -u -b -r1.12 callgraph.m
--- deep_profiler/callgraph.m	4 Aug 2010 02:25:01 -0000	1.12
+++ deep_profiler/callgraph.m	14 Dec 2010 03:06:52 -0000
@@ -60,8 +60,8 @@
     
     % This version of foldl is safer when tail recursion isn't available.
     %
-:- pred foldl(pred(X, A, A), list(X), A, A).
-:- mode foldl(pred(in, in, out) is det, in, in, out) is det.
+:- pred foldl(pred(X, A, A)::in(pred(in, in, out) is det), list(X)::in,
+    A::in, A::out) is det.
 
 foldl(P, !.L, !A) :-
     foldl_2(100000, P, !L, !A),
@@ -72,8 +72,8 @@
         callgraph.foldl(P, !.L, !A)
     ).
 
-:- pred foldl_2(int, pred(X, A, A), list(X), list(X), A, A).
-:- mode foldl_2(in, pred(in, in, out) is det, in, out, in, out) is det.
+:- pred foldl_2(int::in, pred(X, A, A)::in(pred(in, in, out) is det),
+    list(X)::in, list(X)::out, A::in, A::out) is det.
 
 foldl_2(Depth, P, !Xs, !A) :-
     ( Depth > 0 ->
Index: deep_profiler/canonical.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/deep_profiler/canonical.m,v
retrieving revision 1.20
diff -u -b -r1.20 canonical.m
--- deep_profiler/canonical.m	11 Oct 2010 00:49:24 -0000	1.20
+++ deep_profiler/canonical.m	14 Dec 2010 12:02:52 -0000
@@ -262,7 +262,7 @@
         % special calls, but only before we added callcode to the
         % unify/compare routines of builtin types.
         % ChosenPDPtr = proc_dynamic_ptr(0),
-        error("merge_proc_dynamics: no valid pdptrs")
+        unexpected($module, $pred, "no valid pdptrs")
     ).
 
 :- pred merge_proc_dynamic_slots(merge_info::in, int::in,
@@ -496,7 +496,7 @@
         Slot = slot_normal(CSDPtr)
     ;
         Slot = slot_multi(_, _),
-        error("lookup_normal_sites: found slot_multi")
+        unexpected($module, $pred, "found slot_multi")
     ),
     lookup_normal_sites(RestArrays, SlotNum, CSDPtrs).
 
@@ -508,7 +508,7 @@
     array.lookup(RestArray, SlotNum, Slot),
     (
         Slot = slot_normal(_),
-        error("lookup_multi_sites: found normal")
+        unexpected($module, $pred, "found normal")
     ;
         Slot = slot_multi(_, CSDArray),
         array.to_list(CSDArray, CSDList)
@@ -531,7 +531,7 @@
     ( OldRedirect = proc_dynamic_ptr(0) ->
         record_pd_redirect_2(RestPDPtrs, PrimePDPtr, !Redirect)
     ;
-        error("record_pd_redirect: prime is redirected")
+        unexpected($module, $pred, "prime is redirected")
     ).
 
 :- pred record_pd_redirect_2(list(proc_dynamic_ptr)::in, proc_dynamic_ptr::in,
@@ -545,7 +545,7 @@
         set_pd_redirect(u(ProcRedirect0), RestPDPtr, PrimePDPtr,
             ProcRedirect)
     ;
-        error("record_pd_redirect_2: already redirected")
+        unexpected($module, $pred, "already redirected")
     ),
     !:Redirect = !.Redirect ^ pd_redirect := ProcRedirect,
     record_pd_redirect_2(RestPDPtrs, PrimePDPtr, !Redirect).
@@ -566,7 +566,7 @@
     ( OldRedirect = call_site_dynamic_ptr(0) ->
         record_csd_redirect_2(RestCSDPtrs, PrimeCSDPtr, !Redirect)
     ;
-        error("record_pd_redirect: prime is redirected")
+        unexpected($module, $pred, "prime is redirected")
     ).
 
 :- pred record_csd_redirect_2(list(call_site_dynamic_ptr)::in,
@@ -580,7 +580,7 @@
         set_csd_redirect(u(CallSiteRedirect0), RestCSDPtr, PrimeCSDPtr,
             CallSiteRedirect)
     ;
-        error("record_csd_redirect_2: already redirected")
+        unexpected($module, $pred, "already redirected")
     ),
     !:Redirect = !.Redirect ^ csd_redirect := CallSiteRedirect,
     record_csd_redirect_2(RestCSDPtrs, PrimeCSDPtr, !Redirect).
Index: deep_profiler/conf.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/deep_profiler/conf.m,v
retrieving revision 1.13
diff -u -b -r1.13 conf.m
--- deep_profiler/conf.m	6 Jun 2008 09:50:01 -0000	1.13
+++ deep_profiler/conf.m	14 Dec 2010 12:04:05 -0000
@@ -52,7 +52,7 @@
 make_pipe_cmd(PipeName) = Cmd :-
     mkfifo_cmd(CmdName),
     ( CmdName = "" ->
-        error("make_pipe_cmd: do not know what command to use")
+        unexpected($module, $pred, "do not know what command to use")
     ;
         string.format("%s %s", [s(CmdName), s(PipeName)], Cmd)
     ).
@@ -102,24 +102,27 @@
                     ->
                         ServerName = ServerNamePrime
                     ;
-                        error("malformed server name")
+                        unexpected($module, $pred, "malformed server name")
                     )
                 ;
                     TmpReadRes = error(_, _),
-                    error("cannot read server's name")
+                    unexpected($module, $pred, "cannot read server's name")
                 ),
                 io.close_input(TmpStream, !IO)
             ;
                 TmpRes = error(_),
-                error("cannot open file to find the server's name")
+                unexpected($module, $pred,
+                    "cannot open file to find the server's name")
             ),
             io.remove_file(TmpFile, _, !IO)
         ;
-            error("cannot execute cmd to find the server's name")
+            unexpected($module, $pred,
+                "cannot execute cmd to find the server's name")
         )
     ;
         Res1 = error(_),
-        error("cannot execute cmd to find the server's name")
+        unexpected($module, $pred,
+            "cannot execute cmd to find the server's name")
     ).
 
 :- pred maybe_server_port(maybe(string)::out, io::di, io::uo) is det.
Index: deep_profiler/coverage.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/deep_profiler/coverage.m,v
retrieving revision 1.9
diff -u -b -r1.9 coverage.m
--- deep_profiler/coverage.m	14 Oct 2010 04:02:22 -0000	1.9
+++ deep_profiler/coverage.m	14 Dec 2010 12:05:40 -0000
@@ -147,7 +147,7 @@
 :- pred complete_coverage_error is erroneous.
 
 complete_coverage_error :-
-    error(this_file ++ "Expected complete coverage information").
+    unexpected($module, $pred, "Expected complete coverage information").
 
 %-----------------------------------------------------------------------------%
 
@@ -156,7 +156,7 @@
     ( array.bounds(DynamicArray, Min, Max) ->
         true
     ;
-        error("coverage_point_arrays_to_list: Bounds do not match")
+        unexpected($module, $pred, "bounds do not match")
     ),
     coverage_point_arrays_to_list_2(Min, Max, StaticArray, DynamicArray,
         [], CoveragePoints).
@@ -307,7 +307,8 @@
                   "Coverage before call doesn't match calls port on call site"),
                 After0 = after_coverage(Exits)
             ;
-                error("Couldn't look up call site for port counts GP: " ++
+                unexpected($module, $pred,
+                    "Couldn't look up call site for port counts GP: " ++
                     goal_path_to_string(GoalPath))
             )
         ;
@@ -351,7 +352,8 @@
         ( check_coverage_complete(GoalCoverage, GoalExpr) ->
             true
         ;
-            error(string.format("check_coverage_complete failed\n" ++
+            error(
+                string.format("check_coverage_complete failed\n" ++
                 "\tCoverage: %s\n\tGoalPath: %s\n\tProc: %s\n",
                 [s(string(GoalCoverage)), 
                  s(goal_path_to_string(GoalPath)),
@@ -360,7 +362,8 @@
         ( check_coverage_regarding_detism(GoalCoverage, Detism) ->
             true
         ;
-            error(string.format("check_coverage_regarding_detism failed: %s %s",
+            error(
+                string.format("check_coverage_regarding_detism failed: %s %s",
                     [s(string(GoalCoverage)), s(string(Detism))]))
         )
     ).
Index: deep_profiler/create_report.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/deep_profiler/create_report.m,v
retrieving revision 1.28
diff -u -b -r1.28 create_report.m
--- deep_profiler/create_report.m	16 Oct 2010 04:11:04 -0000	1.28
+++ deep_profiler/create_report.m	14 Dec 2010 12:10:27 -0000
@@ -214,7 +214,7 @@
         Report = report_call_site_dynamic_var_use(MaybeVarUse)
     ;
         Cmd = deep_cmd_restart,
-        error("create_report/3", "unexpected restart command")
+        unexpected($module, $pred, "restart command")
     ).
 
 %-----------------------------------------------------------------------------%
@@ -297,7 +297,7 @@
     MaybeTotalPerf = RowData ^ perf_row_maybe_total,
     (
         MaybeTotalPerf = no,
-        error("find_start_of_action_callee: no total perf")
+        unexpected($module, $pred, "no total perf")
     ;
         MaybeTotalPerf = yes(TotalPerf),
         CallSeqsPercent = TotalPerf ^ perf_row_callseqs_percent,
@@ -400,7 +400,7 @@
 create_clique_proc_report(Deep, CliquePtr, PSPtr - PDPtrs, CliqueProcReport) :-
     (
         PDPtrs = [],
-        error("create_clique_proc_report", "PDPtrs = []")
+        unexpected($module, $pred, "PDPtrs = []")
     ;
         PDPtrs = [FirstPDPtr | LaterPDPtrs],
         ProcDesc = describe_proc(Deep, PSPtr),
@@ -436,7 +436,7 @@
         CliquePDReport = clique_proc_dynamic_report(PDRowData,
             CliqueCallSiteReports)
     ;
-        error("invalid proc_dynamic index")
+        unexpected($module, $pred, "invalid proc_dynamic index")
     ).
 
 :- pred create_child_call_site_reports(deep::in, proc_dynamic_ptr::in,
@@ -464,7 +464,7 @@
             CallSiteArraySlot = slot_normal(CSDPtr)
         ;
             CallSiteArraySlot = slot_multi(_, _),
-            error("create_child_call_site_report: normal_call error")
+            unexpected($module, $pred, "normal_call is multi")
         ),
         ( valid_call_site_dynamic_ptr(Deep, CSDPtr) ->
             create_callee_clique_perf_row_data(Deep, CSDPtr, Own, Desc,
@@ -491,7 +491,7 @@
         ),
         (
             CallSiteArraySlot = slot_normal(_),
-            error("create_child_call_site_report: non-normal_call error")
+            unexpected($module, $pred, "non-normal_call is normal")
         ;
             CallSiteArraySlot = slot_multi(_IsZeroed, CSDPtrsArray),
             array.to_list(CSDPtrsArray, CSDPtrs)
@@ -704,7 +704,7 @@
                         ( FieldData0 = gs_field_both(_, _, _)
                         ; FieldData0 = gs_field_getter(_)
                         ),
-                        error("gather_getters_setters: redundant getter")
+                        unexpected($module, $pred, "redundant getter")
                     ;
                         FieldData0 = gs_field_setter(SetterRawData),
                         FieldData = gs_field_both(RawData, SetterRawData, unit)
@@ -715,7 +715,7 @@
                         ( FieldData0 = gs_field_both(_, _, _)
                         ; FieldData0 = gs_field_setter(_)
                         ),
-                        error("gather_getters_setters: redundant setter")
+                        unexpected($module, $pred, "redundant setter")
                     ;
                         FieldData0 = gs_field_getter(GetterRawData),
                         FieldData = gs_field_both(GetterRawData, RawData, unit)
@@ -743,7 +743,8 @@
 :- pred is_getter_or_setter(string_proc_label::in, getter_or_setter::out,
     data_struct_name::out, field_name::out) is semidet.
 
-is_getter_or_setter(StringProcLabel, GetterSetter, DataStructName, FieldName) :-
+is_getter_or_setter(StringProcLabel, GetterSetter, DataStructName,
+        FieldName) :-
     StringProcLabel = str_ordinary_proc_label(_PorF, DeclModule, DefModule,
         Name, Arity, _Mode),
     DeclModule = DefModule,
@@ -874,7 +875,7 @@
             CallSiteCalleePerf = call_site_callee_perf(_, Own, Desc)
         ;
             CallSiteCalls = [_, _ | _],
-            error("create_call_site_summary: >1 proc called at site")
+            unexpected($module, $pred, ">1 proc called at normal site")
         ),
         own_and_inherit_to_perf_row_data(Deep, CallSiteDesc, Own, Desc,
             SummaryRowData),
@@ -1120,7 +1121,7 @@
     ;
         PSPtr = proc_static_ptr(PSId),
         MaybeReport = error(
-            format("Proc static pointer is invalid %d", [i(PSId)]))
+            string.format("Proc static pointer is invalid %d", [i(PSId)]))
     ).
 
 create_dynamic_procrep_coverage_report(Deep, PDPtr, MaybeReport) :-
@@ -1146,7 +1147,7 @@
     ;
         PDPtr = proc_dynamic_ptr(PDId),
         MaybeReport = error(
-            format("Proc dynamic pointer is invalid %d", [i(PDId)]))
+            string.format("Proc dynamic pointer is invalid %d", [i(PDId)]))
     ).
 
 :- pred maybe_create_procrep_coverage_report(deep::in, proc_static_ptr::in,
@@ -1156,8 +1157,8 @@
 
 maybe_create_procrep_coverage_report(_, _, _, no, _, error(Error)) :-
     Error = "No coverage information available".
-maybe_create_procrep_coverage_report(Deep, PSPtr, Own, yes(CoveragePointsArray),
-        CallSitesMap, MaybeReport) :-
+maybe_create_procrep_coverage_report(Deep, PSPtr, Own,
+        yes(CoveragePointsArray), CallSitesMap, MaybeReport) :-
     deep_lookup_proc_statics(Deep, PSPtr, PS),
     coverage_point_arrays_to_list(PS ^ ps_coverage_point_infos,
         CoveragePointsArray, CoveragePoints),
@@ -1394,7 +1395,8 @@
                     list_maybe_error_to_maybe_error_list(Uses0, MaybeUses),
                     (
                         MaybeUses = ok(Uses),
-                        VarUseInfo = call_site_dynamic_var_use_info(Cost, Uses),
+                        VarUseInfo =
+                            call_site_dynamic_var_use_info(Cost, Uses),
                         MaybeVarUseInfo = ok(VarUseInfo)
                     ;
                         MaybeUses = error(Error),
@@ -1414,8 +1416,8 @@
         )
     ;
         CSDPtr = call_site_dynamic_ptr(CSDNum),
-        MaybeVarUseInfo = error(format(
-            "Invalid call site dynamic %d", [i(CSDNum)]))
+        MaybeVarUseInfo = error(
+            string.format("Invalid call site dynamic %d", [i(CSDNum)]))
     ).
 
 :- pred call_site_dynamic_var_use_arg(deep::in, call_site_dynamic_ptr::in,
@@ -1461,8 +1463,8 @@
 get_recursive_csd_cost(Deep, CSDPtr, RecursionType, MaybeCost) :-
     (
         RecursionType = rt_not_recursive,
-        MaybeCost = error(
-            "get_recursive_csd_cost called for non-recursive clique")
+        MaybeCost =
+            error("get_recursive_csd_cost called for non-recursive clique")
     ;
         RecursionType = rt_single(_, _, AvgMaxDepth, _, CostFn),
         deep_lookup_csd_own(Deep, CSDPtr, Own),
@@ -1473,8 +1475,7 @@
         ; RecursionType = rt_mutual_recursion(_)
         ; RecursionType = rt_other(_)
         ),
-        MaybeCost = error(
-            "get_recursive_csd_cost: Unhandled recursion type")
+        MaybeCost = error("get_recursive_csd_cost: unhandled recursion type")
     ;
         RecursionType = rt_errors(Errors),
         MaybeCost = error(join_list("\n", Errors))
@@ -1704,10 +1705,10 @@
                 list.map(describe_clique_member(Deep), OtherPDPtrs),
             CliqueDesc = clique_desc(CliquePtr, EntryProcDesc, OtherProcDescs)
         ;
-            error("describe_clique", "entry pdptr not a member")
+            unexpected($module, $pred, "entry pdptr not a member")
         )
     ;
-        error("describe_clique", "invalid clique_ptr")
+        unexpected($module, $pred, "invalid clique_ptr")
     ).
 
 :- func describe_clique_member(deep, proc_dynamic_ptr) = proc_desc.
@@ -1717,28 +1718,5 @@
     ProcDesc = describe_proc(Deep, PD ^ pd_proc_static).
 
 %-----------------------------------------------------------------------------%
-%
-% Code shared across entire module.
-%
-
-:- func this_file = string.
-
-this_file = "create_report.m".
-
-%-----------------------------------------------------------------------------%
-
-:- func error_message(string, string) = string.
-
-error_message(Pred, Message) = Error :-
-    Error = this_file ++ ": " ++ Pred ++ ": " ++ Message.
-
-%-----------------------------------------------------------------------------%
-
-:- pred error(string::in, string::in) is erroneous.
-
-error(Pred, Message) :-
-    throw(software_error(error_message(Pred, Message))).
-
-%-----------------------------------------------------------------------------%
 :- end_module create_report.
 %-----------------------------------------------------------------------------%
Index: deep_profiler/dense_bitset.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/deep_profiler/dense_bitset.m,v
retrieving revision 1.6
diff -u -b -r1.6 dense_bitset.m
--- deep_profiler/dense_bitset.m	26 Mar 2009 06:32:18 -0000	1.6
+++ deep_profiler/dense_bitset.m	14 Dec 2010 12:11:27 -0000
@@ -87,7 +87,7 @@
         Word = Word0 \/ bit(I),
         set(A0, word(I), Word, A)
     ;
-        error("insert: cannot use indexes < 0")
+        unexpected($module, $pred, "cannot use indexes < 0")
     ).
 
 delete(A0, I) = A :-
@@ -99,7 +99,7 @@
         Word = Word0 /\ \ bit(I),
         set(A0, word(I), Word, A)
     ;
-        error("delete: cannot use indexes < 0")
+        unexpected($module, $pred, "cannot use indexes < 0")
     ).
 
 union(A, B) = C :-
Index: deep_profiler/display.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/deep_profiler/display.m,v
retrieving revision 1.12
diff -u -b -r1.12 display.m
--- deep_profiler/display.m	22 Sep 2010 12:56:53 -0000	1.12
+++ deep_profiler/display.m	14 Dec 2010 03:10:11 -0000
@@ -212,7 +212,7 @@
 
 %-----------------------------------------------------------------------------%
 %
-% List specific structures
+% List specific structures.
 %
 
 :- type list_class
@@ -223,7 +223,7 @@
 
 %-----------------------------------------------------------------------------%
 %
-% Link specific structures
+% Link specific structures.
 %
 
 :- type deep_link
Index: deep_profiler/display_report.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/deep_profiler/display_report.m,v
retrieving revision 1.31
diff -u -b -r1.31 display_report.m
--- deep_profiler/display_report.m	16 Oct 2010 04:11:04 -0000	1.31
+++ deep_profiler/display_report.m	14 Dec 2010 12:13:02 -0000
@@ -22,7 +22,7 @@
 :- import_module report.
 
 % XXX: This include should be removed or replaced.  Some data structures
-% such as preferences are currently defined in query, they should be moved
+% such as preferences are currently defined in query; they should be moved
 % into a different module so that this module doesn't need to include
 % the whole of query.
 :- import_module query.
@@ -165,7 +165,8 @@
         Report = report_proc_callers(MaybeProcCallersReport),
         (
             MaybeProcCallersReport = ok(ProcCallersReport),
-            display_report_proc_callers(Deep, Prefs, ProcCallersReport, Display)
+            display_report_proc_callers(Deep, Prefs, ProcCallersReport,
+                Display)
         ;
             MaybeProcCallersReport = error(Msg),
             Display = display(no, [display_heading(Msg)])
@@ -222,7 +223,8 @@
         Report = report_call_site_dynamic_var_use(MaybeVarUseInfo),
         (
             MaybeVarUseInfo = ok(VarUseInfo),
-            display_report_call_site_dynamic_var_use(Prefs, VarUseInfo, Display)
+            display_report_call_site_dynamic_var_use(Prefs, VarUseInfo,
+                Display)
         ;
             MaybeVarUseInfo = error(Msg),
             Display = display(no, [display_heading(Msg)])
@@ -371,7 +373,8 @@
             "Frequencies of different types of recursion used in the program.")
     ],
     list.map(make_link, LinksDeveloperCmds, DeveloperLinksList),
-    DeveloperLinks = display_developer(display_list(list_class_vertical_bullets,
+    DeveloperLinks = display_developer(
+        display_list(list_class_vertical_bullets,
         yes("Options that are only useful to Mercury developers"), 
         DeveloperLinksList)),
 
@@ -639,7 +642,7 @@
             Rows = [Row]
         ;
             CalleePerfs = [_, _ | _],
-            error("clique_call_site_to_rows: more than one callee at normal")
+            unexpected($module, $pred, "more than one callee at normal")
         )
     ;
         (
@@ -752,11 +755,11 @@
             MaxDepthI = round_to_int(AvgDepth),
             ExtraTableRows0 = 
                 [{"Average recursion depth:", AvgDepth}, 
-                 {"Average recursive call cost (excluding the call it's self):",
+                 {"Average recursive call cost (excluding the call itself):",
                     AvgRecCost}] ++
                 map(
                     (func(Level) =
-                        {format("Cost at depth %d:", [i(Level)]), 
+                        {string.format("Cost at depth %d:", [i(Level)]),
                             AnyRecCost(Level)}),
                     [0, 1, 2, round_to_int(AvgDepth / 2.0),
                      MaxDepthI - 2, MaxDepthI - 1, MaxDepthI]),
@@ -774,7 +777,7 @@
         ; 
             RecursionType = rt_other(Levels),
             RowData = map((func(Level) = {Label, Level} :-
-                    Label = format("Case for %d recursive calls", 
+                    Label = string.format("Case for %d recursive calls",
                         [i(Level ^ rlr_level)])
                 ), Levels), 
             Text = "Unknown recursion type:",
@@ -793,7 +796,8 @@
             ), 
             [{"Recursion type", table_column_class_field_name},
              {"Exec count", table_column_class_number},
-             {"Non recursive calls per-call cost", table_column_class_callseqs},
+             {"Non recursive calls per-call cost",
+                table_column_class_callseqs},
              {"Recursive calls per-call cost (ex children)", 
                 table_column_class_callseqs}])),
         Table = display_table(table(table_class_box_if_pref, 4, yes(Header), 
@@ -822,7 +826,8 @@
     Title = "Frequencies of recognized recursion types",
 
     % Build the table.
-    RecursionTypeLink = deep_link(Cmd, yes(Prefs ^ pref_criteria := by_context),
+    RecursionTypeLink = deep_link(Cmd,
+        yes(Prefs ^ pref_criteria := by_context),
         attr_str([], "Recursion Type"), link_class_link), 
     RecursionTypeHeaderGroup = make_single_table_header_group(
         td_l(RecursionTypeLink), table_column_class_no_class,
@@ -841,7 +846,8 @@
 
     Histogram1 = map.to_assoc_list(Histogram0),
     sort_recursion_types_by_preferences(Prefs, Histogram1, Histogram),
-    map(display_report_rec_type_freq_rows(Prefs, NumColumns), Histogram, Rowss),
+    list.map(display_report_rec_type_freq_rows(Prefs, NumColumns),
+        Histogram, Rowss),
     list.condense(Rowss, Rows),
     RecursionTypesTable = display_table(table(table_class_box_if_pref,
         NumColumns, yes(Header), Rows)),
@@ -871,7 +877,8 @@
         list.sort(compare_recursion_type_row_by_rec_type, !RecursionTypes)
     ;
         OrderCriteria = by_cost(CostKind, InclDesc, Scope),
-        list.sort(compare_rec_type_row_datas_by_cost(CostKind, InclDesc, Scope),
+        list.sort(
+            compare_rec_type_row_datas_by_cost(CostKind, InclDesc, Scope),
             !RecursionTypes),
         % We want the most expensive rows to appear first.
         list.reverse(!RecursionTypes)
@@ -907,8 +914,6 @@
 compare_recursion_type_row_by_rec_type(RTA - _, RTB - _, Result) :-
     compare(Result, RTA, RTB).
 
-    % This is reversed so that entries with larger frequencies are listed first.
-    %
 :- pred compare_recursion_proc_row_by_frequency_rev(
     recursion_type_proc_freq_data::in, recursion_type_proc_freq_data::in,
     comparison_result::out) is det.
@@ -916,6 +921,7 @@
 compare_recursion_proc_row_by_frequency_rev(
         recursion_type_proc_freq_data(FreqA, _, _),
         recursion_type_proc_freq_data(FreqB, _, _), Result) :-
+    % The reverse is so that entries with larger frequencies are listed first.
     compare(Result, FreqB, FreqA).
 
 :- pred compare_rec_type_row_datas_by_cost(cost_kind::in,
@@ -1009,13 +1015,15 @@
 
 display_report_recursion_type_simple(rts_not_recursive, "Not recursive").
 display_report_recursion_type_simple(rts_single, "Single-recursion").
-display_report_recursion_type_simple(rts_divide_and_conquer, "Divide and conquer").
+display_report_recursion_type_simple(rts_divide_and_conquer,
+        "Divide and conquer").
 display_report_recursion_type_simple(rts_mutual_recursion(NumProcs), String) :-
     format("Mutual recursion between %d procs", [i(NumProcs)], String).
 display_report_recursion_type_simple(rts_other(Levels), String) :-
     LevelsStr = join_list(", ", map(string, set.to_sorted_list(Levels))),
     format("Other recursion with levels: %s", [s(LevelsStr)], String).
-display_report_recursion_type_simple(rts_total_error_instances, "Total errors").
+display_report_recursion_type_simple(rts_total_error_instances,
+        "Total errors").
 display_report_recursion_type_simple(rts_error(Error), "Error: " ++ Error). 
 
 %-----------------------------------------------------------------------------%
@@ -2137,7 +2145,8 @@
             yes(CoveragePointsTableHeader), CoveragePointsRows),
         CoveragePointsTableItem = display_table(CoveragePointsTable),
 
-        CoveragePointsItems = [CoveragePointsTitleItem, CoveragePointsTableItem]
+        CoveragePointsItems =
+            [CoveragePointsTitleItem, CoveragePointsTableItem]
     ;
         MaybeCoveragePoints = no,
         CoveragePointsItems = []
@@ -2438,6 +2447,7 @@
 %
 % Each pair of predicates should follow the exact same logic when selecting
 % what columns to display, and in what order.
+%
 
 :- type total_columns_meaning
     --->    total_columns_meaningful
@@ -2600,7 +2610,7 @@
                 MaybeTotal = yes(Total)
             ;
                 MaybeTotal = no,
-                error("perf_table_row_time: no total")
+                unexpected($module, $pred, "no total")
             ),
             TotalTicks =            Total ^ perf_row_ticks,
             TotalTime =             Total ^ perf_row_time,
@@ -2799,7 +2809,7 @@
                 MaybeTotal = yes(Total)
             ;
                 MaybeTotal = no,
-                error("perf_table_row_callseqs: no total")
+                unexpected($module, $pred, "no total")
             ),
             TotalCallSeqs =             Total ^ perf_row_callseqs,
             TotalCallSeqsPercent =      Total ^ perf_row_callseqs_percent,
@@ -2926,7 +2936,7 @@
                 MaybeTotal = yes(Total)
             ;
                 MaybeTotal = no,
-                error("perf_table_row_allocs: no total")
+                unexpected($module, $pred, "no total")
             ),
             TotalAllocs =               Total ^ perf_row_allocs,
             TotalAllocsPercent =        Total ^ perf_row_allocs_percent,
@@ -3053,7 +3063,7 @@
                 MaybeTotal = yes(Total)
             ;
                 MaybeTotal = no,
-                error("perf_table_row_memory: no total")
+                unexpected($module, $pred, "no total")
             ),
             TotalMem =              Total ^ perf_row_mem,
             TotalMemPerCall =       Total ^ perf_row_mem_percall,
@@ -3800,7 +3810,8 @@
 % Controls for related procedure and clique reports.
 %
 
-:- func proc_reports_controls(preferences, proc_static_ptr, cmd) = display_item.
+:- func proc_reports_controls(preferences, proc_static_ptr, cmd)
+    = display_item.
 
 proc_reports_controls(Prefs, Proc, NotCmd) = ControlsItem :-
     solutions((pred(Control::out) is nondet :-
@@ -3828,7 +3839,8 @@
 :- func clique_reports_controls(preferences, clique_ptr, cmd) = display_item. 
 
 clique_reports_controls(Perfs, CliquePtr, NotCmd) = ControlsItem :-
-    solutions((pred(Control::out) is nondet :-
+    MakeControls =
+        ( pred(Control::out) is nondet :-
             (
                 Cmd = deep_cmd_clique(CliquePtr),
                 Label = "Clique",
@@ -3844,7 +3856,8 @@
             ),
             Cmd \= NotCmd,
             make_control(yes(Perfs), Cmd, Label, Developer, Control)
-        ), CliqueReportControls),
+        ),
+    solutions(MakeControls, CliqueReportControls),
     ControlsItem = display_list(list_class_vertical_no_bullets,
         yes("Related clique reports:"), CliqueReportControls).
 
@@ -4883,8 +4896,8 @@
 %
 
 :- pred sort_clique_rows_by_preferences(preferences::in,
-    list(perf_row_data(clique_desc))::in, list(perf_row_data(clique_desc))::out)
-    is det.
+    list(perf_row_data(clique_desc))::in,
+    list(perf_row_data(clique_desc))::out) is det.
 
 sort_clique_rows_by_preferences(Prefs, !CliqueRowDatas) :-
     OrderCriteria = Prefs ^ pref_criteria,
@@ -5107,7 +5120,7 @@
                 compare(Result, TimeA, TimeB)
             )
         ;
-            error("compare_perf_row_datas_by_cost: self_and_desc")
+            unexpected($module, $pred, "self_and_desc")
         )
     ).
 
@@ -5151,7 +5164,7 @@
                 compare(Result, CallSeqsA, CallSeqsB)
             )
         ;
-            error("compare_perf_row_datas_by_cost: self_and_desc")
+            unexpected($module, $pred, "self_and_desc")
         )
     ).
 
@@ -5195,7 +5208,7 @@
                 compare(Result, AllocsA, AllocsB)
             )
         ;
-            error("compare_perf_row_datas_by_cost: self_and_desc")
+            unexpected($module, $pred, "self_and_desc")
         )
     ).
 
@@ -5239,7 +5252,7 @@
                 compare_memory(MemoryA, MemoryB, Result)
             )
         ;
-            error("compare_perf_row_datas_by_cost: self_and_desc")
+            unexpected($module, $pred, "self_and_desc")
         )
     ).
 
Index: deep_profiler/dump.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/deep_profiler/dump.m,v
retrieving revision 1.19
diff -u -b -r1.19 dump.m
--- deep_profiler/dump.m	11 Oct 2010 00:49:24 -0000	1.19
+++ deep_profiler/dump.m	14 Dec 2010 03:20:57 -0000
@@ -766,7 +766,8 @@
     io.nl(!IO),
 
     CallSiteStaticMap = Deep ^ call_site_static_map,
-    io.write_string("SECTION MAP FROM CALL SITE DYNAMICS TO STATICS:\n\n", !IO),
+    io.write_string("SECTION MAP FROM CALL SITE DYNAMICS TO STATICS:\n\n",
+        !IO),
     array_foldl_from_1(dump_call_site_dynamic_to_static, CallSiteStaticMap,
         !IO),
     io.nl(!IO),
Index: deep_profiler/html_format.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/deep_profiler/html_format.m,v
retrieving revision 1.35
diff -u -b -r1.35 html_format.m
--- deep_profiler/html_format.m	22 Sep 2010 12:56:53 -0000	1.35
+++ deep_profiler/html_format.m	14 Dec 2010 12:14:49 -0000
@@ -429,7 +429,7 @@
         Colour = "White"
     ),
     ( set.member(ColumnClassStr, !.ColouredClassStrs) ->
-        error("update_style_control_map: repeated table_column_class")
+        unexpected($module, $pred, "repeated table_column_class")
     ;
         set.insert(!.ColouredClassStrs, ColumnClassStr, !:ColouredClassStrs)
     ),
@@ -498,7 +498,7 @@
                 Msg = string.format(
                     "Class map had no class for col %d, check table structure",
                     [i(!.ColumnNum)]),
-                error(Msg)
+                unexpected($module, $pred, Msg)
             )
         ;
             MaybeClassMap = no,
Index: deep_profiler/io_combinator.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/deep_profiler/io_combinator.m,v
retrieving revision 1.10
diff -u -b -r1.10 io_combinator.m
Index: deep_profiler/mdprof_cgi.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/deep_profiler/mdprof_cgi.m,v
retrieving revision 1.31
diff -u -b -r1.31 mdprof_cgi.m
Index: deep_profiler/mdprof_fb.automatic_parallelism.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/deep_profiler/mdprof_fb.automatic_parallelism.m,v
retrieving revision 1.21
diff -u -b -r1.21 mdprof_fb.automatic_parallelism.m
--- deep_profiler/mdprof_fb.automatic_parallelism.m	13 Dec 2010 04:31:45 -0000	1.21
+++ deep_profiler/mdprof_fb.automatic_parallelism.m	14 Dec 2010 12:22:49 -0000
@@ -92,6 +92,7 @@
 %----------------------------------------------------------------------------%
 %
 % The code in this section has some trace goals that can be enabled with:
+%
 %   --trace-flag=debug_cpc_search
 %     Debug the traversal through the clique tree.
 %
@@ -103,12 +104,12 @@
 %
 
 candidate_parallel_conjunctions(Params, Deep, Messages, !Feedback) :-
-    % Find opertunities for parallelism by walking the clique tree.  Don't
-    % Descened into cliques cheaper than the threshold.
+    % Find opportunities for parallelism by walking the clique tree.
+    % Do not descend into cliques cheaper than the threshold.
     deep_lookup_clique_index(Deep, Deep ^ root, RootCliquePtr),
     % The +1 here accounts for the cost of the pseudo call into the mercury
-    % runtime since it is modeled here as a call site that in reality does not
-    % exist.
+    % runtime since it is modeled here as a call site that in reality
+    % does not exist.
     RootParallelism = no_parallelism,
     candidate_parallel_conjunctions_clique(Params, Deep,
         RootParallelism, RootCliquePtr, ConjunctionsMap, Messages),
@@ -148,10 +149,10 @@
     Coverage = PGD ^ pgd_coverage,
     get_coverage_before_det(Coverage, Calls),
     ( Calls > 0 ->
-        foldl(build_var_use_list(PGD ^ pgd_var_production_map), SharedVars,
-            [], Productions),
-        foldl(build_var_use_list(PGD ^ pgd_var_consumption_map), SharedVars,
-            [], Consumptions)
+        list.foldl(build_var_use_list(PGD ^ pgd_var_production_map),
+            SharedVars, [], Productions),
+        list.foldl(build_var_use_list(PGD ^ pgd_var_consumption_map),
+            SharedVars, [], Consumptions)
     ;
         Productions = [],
         Consumptions = []
@@ -199,35 +200,35 @@
 
 :- type pard_goal_detail_annotation
     --->    pard_goal_detail(
-                pgd_pg_type                 :: pard_goal_type,
                     % The type and type-specific values of the pard goal.
+                pgd_pg_type                 :: pard_goal_type,
 
-                pgd_inst_map_info           :: inst_map_info,
                     % The inst map info attached to the original goal.
+                pgd_inst_map_info           :: inst_map_info,
 
-                pgd_original_path           :: goal_path,
                     % The original goal path of this goal.
+                pgd_original_path           :: goal_path,
 
-                pgd_coverage                :: coverage_info,
                     % Coverage data for this goal.
+                pgd_coverage                :: coverage_info,
 
-                pgd_cost                    :: goal_cost_csq,
                     % The per-call cost of this call in call sequence counts.
+                pgd_cost                    :: goal_cost_csq,
 
                 pgd_cost_above_threshold    :: cost_above_par_threshold,
 
+                % Variable production and consumption information.
                 pgd_var_production_map      :: map(var_rep, lazy(var_use_info)),
                 pgd_var_consumption_map     :: map(var_rep, lazy(var_use_info))
-                    % Variable production and consumption information.
             ).
 
 :- type pard_goal_type
     --->    pgt_call(
-                pgtc_args                   :: list(var_and_mode),
                     % The argument modes and use information.
+                pgtc_args                   :: list(var_and_mode),
 
-                pgtc_call_site              :: cost_and_callees
                     % The call site report from the deep profiler.
+                pgtc_call_site              :: cost_and_callees
             )
     ;       pgt_other_atomic_goal
     ;       pgt_non_atomic_goal.
@@ -252,10 +253,11 @@
     %   ParentUsedParallelism, CliquePtr, CandidateParallelConjunctions,
     %   Messages)
     %
-    % Find any CandidateParallelConjunctions in this clique and it's children.
-    % We stop searching when ParentCSCost is too low that the overheads of
-    % parallelism are too great or if ParentUsedParallelism becomes greater
-    % than the desired amount of parallelism.
+    % Find any CandidateParallelConjunctions in this clique and its children.
+    % We stop searching when ParentCSCost is too low (in which case the
+    % relative overheads of parallelism would be too great), or if
+    % ParentUsedParallelism becomes greater than the desired amount
+    % of parallelism.
     %
 :- pred candidate_parallel_conjunctions_clique(
     candidate_par_conjunctions_params::in, deep::in,
@@ -277,8 +279,8 @@
             PDPtrs = OtherPDPtrs
         ;
             CliquePtr = clique_ptr(CliqueNum),
-            error(format("%sClique %d has no entry proc",
-                [s(this_file), i(CliqueNum)]))
+            string.format("Clique %d has no entry proc", [i(CliqueNum)], Msg),
+            unexpected($module, $pred, Msg)
         )
     ),
 
@@ -293,27 +295,29 @@
     ),
 
     % Look for parallelisation opportunities in this clique.
-    map2(candidate_parallel_conjunctions_clique_proc(Opts, Deep,
+    list.map2(
+        candidate_parallel_conjunctions_clique_proc(Opts, Deep,
             RecursionType, CliquePtr),
-        PDPtrs, Candidatess, Messagess),
-    foldl(union(merge_candidate_par_conjs_proc), Candidatess,
+        PDPtrs, CandidateLists, MessageCords),
+    list.foldl(map.union(merge_candidate_par_conjs_proc), CandidateLists,
         map.init, CliqueCandidates),
-    CliqueMessages = cord_list_to_cord(Messagess),
+    CliqueMessages = cord_list_to_cord(MessageCords),
 
     % Look in descendent cliques.
     some [!ChildCliques] (
         map(proc_dynamic_callees(Deep, ParentParallelism), PDPtrs,
             ChildCliquess),
         !:ChildCliques = cord_list_to_cord(ChildCliquess),
-        map2(candidate_parallel_conjunctions_callee(Opts, Deep,
+        list.map2(
+            candidate_parallel_conjunctions_callee(Opts, Deep,
                 CliquePtr, CliqueCandidates),
-            list(!.ChildCliques), CSCandidatess, CSMessagess)
+            list(!.ChildCliques), CSCandidateLists, CSMessageCords)
     ),
-    foldl(union(merge_candidate_par_conjs_proc), CSCandidatess,
+    list.foldl(map.union(merge_candidate_par_conjs_proc), CSCandidateLists,
         map.init, CSCandidates),
-    CSMessages = cord_list_to_cord(CSMessagess),
+    CSMessages = cord_list_to_cord(CSMessageCords),
 
-    union(merge_candidate_par_conjs_proc, CliqueCandidates, CSCandidates,
+    map.union(merge_candidate_par_conjs_proc, CliqueCandidates, CSCandidates,
         Candidates),
     Messages = CliqueMessages ++ CSMessages.
 
@@ -340,8 +344,9 @@
     deep_lookup_proc_statics(Deep, PSPtr, PS),
     ProcLabel = PS ^ ps_id,
     proc_dynamic_paired_call_site_slots(Deep, PDPtr, Slots),
-    map(pd_slot_callees(Deep, Parallelism, ProcLabel), Slots, ChildCliquess),
-    ChildCliques = cord_list_to_cord(ChildCliquess).
+    list.map(pd_slot_callees(Deep, Parallelism, ProcLabel),
+        Slots, ChildCliqueCords),
+    ChildCliques = cord_list_to_cord(ChildCliqueCords).
 
 :- pred pd_slot_callees(deep::in, parallelism_amount::in,
     string_proc_label::in,
@@ -357,9 +362,10 @@
             CSDPtr, ChildCliques)
     ;
         Slot = slot_multi(_, CSDPtrs),
-        map(call_site_dynamic_callees(Deep, Parallelism, ProcLabel, GoalPath),
-            to_list(CSDPtrs), ChildCliquess),
-        ChildCliques = cord_list_to_cord(ChildCliquess)
+        list.map(
+            call_site_dynamic_callees(Deep, Parallelism, ProcLabel, GoalPath),
+            to_list(CSDPtrs), ChildCliqueCords),
+        ChildCliques = cord_list_to_cord(ChildCliqueCords)
     ).
 
 :- pred call_site_dynamic_callees(deep::in, parallelism_amount::in,
@@ -402,7 +408,7 @@
                 AnalyzeChild = yes
             ;
                 trace [compile_time(flag("debug_cpc_search")), io(!IO)] (
-                    debug_cliques_exeeded_parallelism(!.Callee, !IO)
+                    debug_cliques_exceeded_parallelism(!.Callee, !IO)
                 ),
                 AnalyzeChild = no
             )
@@ -419,8 +425,7 @@
     (
         AnalyzeChild = yes,
         Parallelism = !.Callee ^ ccc_parallelism,
-        ChildCliquePtr =
-            !.Callee ^ ccc_clique,
+        ChildCliquePtr = !.Callee ^ ccc_clique,
         candidate_parallel_conjunctions_clique(Opts, Deep, Parallelism,
             ChildCliquePtr, Candidates, Messages)
     ;
@@ -470,8 +475,9 @@
     goal_path_from_string_det(Conj ^ cpc_goal_path, ConjGoalPath),
     % XXX: This needs revisiting if we allow parallelised conjuncts to be
     % re-ordered.
-    FirstConjunct = Conj ^ cpc_first_conj_num + length(Conj ^ cpc_goals_before),
-    Length = foldl((func(seq_conj(ConjsI), Acc) = Acc + length(ConjsI)),
+    FirstConjunct = Conj ^ cpc_first_conj_num +
+        length(Conj ^ cpc_goals_before),
+    Length = list.foldl((func(seq_conj(ConjsI), Acc) = Acc + length(ConjsI)),
         Conj ^ cpc_conjs, 0),
     (
         GoalPath \= ConjGoalPath,
@@ -555,8 +561,7 @@
     ( VarTableA = VarTableB ->
         true
     ;
-        error(this_file ++
-            "merge_candidate_par_conjs_proc: var tables do not match")
+        unexpected($module, $pred, "var tables do not match")
     ).
 
 %----------------------------------------------------------------------------%
@@ -591,8 +596,8 @@
             ; ModuleName = "exception"
             )
         ->
-            % Silently skip over any code from the runtime, we can't expect to
-            % find it's procedure representation.
+            % Silently skip over any code from the runtime, since
+            % we can't expect to find its procedure representation.
             Candidates = map.init
         ;
             create_dynamic_procrep_coverage_report(Deep, PDPtr,
@@ -608,9 +613,9 @@
                 proc_dynamic_paired_call_site_slots(Deep, PDPtr, Slots),
                 foldl(build_call_site_cost_and_callee_map(Deep), Slots,
                     map.init, CallSitesMap),
-                Info = implicit_parallelism_info(Deep, ProgRep, Opts, CliquePtr,
-                    CallSitesMap, RecursiveCallSiteCostMap, RecursionType,
-                    VarTable, ProcLabel),
+                Info = implicit_parallelism_info(Deep, ProgRep, Opts,
+                    CliquePtr, CallSitesMap, RecursiveCallSiteCostMap,
+                    RecursionType, VarTable, ProcLabel),
                 some [!Goal] (
                     !:Goal = Goal0,
                     goal_annotate_with_instmap(!Goal,
@@ -624,7 +629,8 @@
                 (
                     SeenDuplicateInstantiation =
                         have_not_seen_duplicate_instantiation,
-                    list.foldl(build_candidate_par_conjunction_maps(ProcLabel,
+                    list.foldl(
+                        build_candidate_par_conjunction_maps(ProcLabel,
                             VarTable),
                         Candidates0, map.init, Candidates)
                 ;
@@ -651,10 +657,11 @@
             ).
 
 :- instance goal_annotation_add_instmap(coverage_info,
-            coverage_and_instmap_info) where [
+    coverage_and_instmap_info) where
+[
         add_instmap(InstMap, Coverage,
             coverage_and_instmap_info(Coverage, InstMap))
-    ].
+].
 
 :- pred build_candidate_par_conjunction_maps(string_proc_label::in,
     var_table::in, candidate_par_conjunction(pard_goal_detail)::in,
@@ -667,8 +674,7 @@
         ( VarTable = VarTablePrime ->
             true
         ;
-            error(this_file ++
-                "build_candidate_par_conjunction_maps: Var tables do not match")
+            unexpected($module, $pred, "var tables do not match")
         )
     ;
         CPCs = [ Candidate ]
@@ -690,8 +696,8 @@
     (
         (
             GoalExpr0 = conj_rep(Conjs0),
-            map3_foldl(conj_get_conjunctions_worth_parallelising(Info,
-                    GoalPath),
+            list.map3_foldl(
+                conj_get_conjunctions_worth_parallelising(Info, GoalPath),
                 Conjs0, Conjs, Candidatess, Messagess, 1, _),
             conj_build_candidate_conjunctions(Info, GoalPath, Conjs,
                 MaybeCost, MessagesB, MaybeCandidate),
@@ -712,8 +718,8 @@
             )
         ;
             GoalExpr0 = disj_rep(Disjs0),
-            map3_foldl(disj_get_conjunctions_worth_parallelising(Info,
-                    GoalPath),
+            list.map3_foldl(
+                disj_get_conjunctions_worth_parallelising(Info, GoalPath),
                 Disjs0, Disjs, Candidatess, Messagess, 1, _),
             disj_calc_cost(Disjs, Calls, Cost),
             GoalExpr = disj_rep(Disjs),
@@ -721,7 +727,8 @@
             Candidates = condense(Candidatess)
         ;
             GoalExpr0 = switch_rep(Var, CanFail, Cases0),
-            map3_foldl(switch_case_get_conjunctions_worth_parallelising(Info,
+            list.map3_foldl(
+                switch_case_get_conjunctions_worth_parallelising(Info,
                     GoalPath),
                 Cases0, Cases, Candidatess, Messagess, 1, _),
             switch_calc_cost(Cases, Calls, Cost),
@@ -823,13 +830,13 @@
     Candidates = CondCandidates ++ ThenCandidates ++ ElseCandidates,
     Messages = CondMessages ++ ThenMessages ++ ElseMessages.
 
-    % At the end of every conjunction we call this predicate to check the list
-    % of calls we've found and make any parallelisation decisions.
+    % At the end of every conjunction, we call this predicate to check
+    % the list of calls we have found and make any parallelisation decisions.
     %
 :- pred conj_build_candidate_conjunctions(implicit_parallelism_info::in,
     goal_path::in, list(pard_goal_detail)::in, maybe(goal_cost_csq)::out,
-    cord(message)::out, maybe(candidate_par_conjunction(pard_goal_detail))::out)
-    is det.
+    cord(message)::out,
+    maybe(candidate_par_conjunction(pard_goal_detail))::out) is det.
 
 conj_build_candidate_conjunctions(Info, GoalPath, Conjs, MaybeCost, Messages,
         MaybeCandidate) :-
@@ -943,8 +950,8 @@
                         ++ "proc or goal")
                 ),
 
-                convert_candidate_par_conjunction(pard_goal_detail_to_pard_goal,
-                    Candidate, FBCandidate),
+                convert_candidate_par_conjunction(
+                    pard_goal_detail_to_pard_goal, Candidate, FBCandidate),
                 VarTable = Info ^ ipi_var_table,
                 create_candidate_parallel_conj_report(VarTable,
                     ProcLabel, FBCandidate, Report),
@@ -1117,7 +1124,7 @@
         FirstCostlyGoalIndex = FirstCostlyGoalIndexPrime,
         LastCostlyGoalIndex = LastCostlyGoalIndexPrime
     ;
-        error(this_file ++ "too few costly goals")
+        unexpected($module, $pred, "too few costly goals")
     ),
 
     % Phase 3: Check that all the middle goals are model det.
@@ -1216,7 +1223,7 @@
     ->
         !:Detism = FinalDetism
     ;
-        error(this_file ++ "Cannot compute detism from components.")
+        unexpected($module, $pred, "cannot compute detism from components.")
     ).
 
     % foldl(preprocess_conjunction_into_groups, Goals, FirstCostlyGoalIndex,
@@ -1306,9 +1313,10 @@
         )
     ).
 
-    % The objective function for the branch and bound search.  This is ParTime
-    % + ParOverheads * 2.  That is we're willing to pay 1 unit of parallel
-    % overheads to get a 2 unit improvement of parallel execution time.
+    % The objective function for the branch and bound search.
+    % This is ParTime + ParOverheads * 2.  That is we are willing to pay
+    % 1 unit of parallel overheads to get a 2 unit improvement
+    % of parallel execution time.
     %
 :- func parallelisation_get_objective_value(best_parallelisation) = float.
 
@@ -1334,8 +1342,8 @@
         (
             semipure should_expand_search(BNBState, Algorithm)
         ->
-            % Try to push goals into the first and last parallel conjuncts from
-            % outside the parallel conjunction.
+            % Try to push goals into the first and last parallel conjuncts
+            % from outside the parallel conjunction.
             semipure add_goals_into_first_par_conj(BNBState, !Parallelisation),
             semipure add_goals_into_last_par_conj(BNBState, !Parallelisation)
         ;
@@ -1391,7 +1399,7 @@
 
     % Set the last scheduled goal to the goal at the end of the first group,
     % popping the first group off the list.  This initialises the
-    % parallelistion with the first goal group occurring first in the first
+    % parallelisation with the first goal group occurring first in the first
     % parallel conjunction.
     %
     % This is done outside of the loop below since the first goal group will
@@ -1404,7 +1412,7 @@
 start_first_par_conjunct(!GoalGroups, !Parallelisation) :-
     (
         !.GoalGroups = [],
-        error(this_file ++ "No goal groups.")
+        unexpected($module, $pred, "no goal groups")
     ;
         !.GoalGroups = [Group | !:GoalGroups],
         gg_get_details(Group, Index, Num, _),
@@ -1431,7 +1439,8 @@
         !:AddToNewParallelisation = !.Parallelisation,
 
         % Consider adding this goal to the last parallel conjunct.
-        !AddToLastParallelisation ^ ip_last_scheduled_goal := LastScheduledGoal,
+        !AddToLastParallelisation ^ ip_last_scheduled_goal
+            := LastScheduledGoal,
         score_parallelisation(BNBState, MaybeAddToLastScore,
             !AddToLastParallelisation),
 
@@ -1523,7 +1532,8 @@
     % bound solver.
     %
 :- semipure pred test_parallelisation(bnb_state(best_parallelisation)::in,
-    incomplete_parallelisation::in, incomplete_parallelisation::out) is semidet.
+    incomplete_parallelisation::in, incomplete_parallelisation::out)
+    is semidet.
 
 test_parallelisation(BNBState, !Parallelisation) :-
     calculate_parallel_cost(CostData, !Parallelisation),
@@ -1551,8 +1561,8 @@
         MaybeScore = no
     ).
 
-    % Test that the parallelisation only included dependant parallelism if
-    % permitted by the user.
+    % Test that the parallelisation only included dependant parallelism
+    % if permitted by the user.
     %
 :- pred test_dependance(implicit_parallelism_info::in,
     parallelisation_cost_data::in) is semidet.
@@ -1583,7 +1593,7 @@
                 % The index of the last goal in the parallel conjunction.
                 ip_last_par_goal            :: int,
 
-                % The index of the last goal that has been (tentativly)
+                % The index of the last goal that has been (tentatively)
                 % scheduled.  All goals between this +1 and ip_last_par_goal
                 % have not been scheduled.
                 ip_last_scheduled_goal      :: int,
@@ -1677,8 +1687,9 @@
     LastParGoal = PreprocessedGoals ^ gfp_last_costly_goal,
     NumCalls = PreprocessedGoals ^ gfp_num_calls,
     DependencyGraphs = PreprocessedGoals ^ gfp_dependency_graphs,
-    Parallelisation = incomplete_parallelisation(Info, GoalsArray, FirstParGoal,
-        LastParGoal, FirstParGoal, [], NumCalls, DependencyGraphs, no, no, no).
+    Parallelisation = incomplete_parallelisation(Info, GoalsArray,
+        FirstParGoal, LastParGoal, FirstParGoal, [], NumCalls,
+        DependencyGraphs, no, no, no).
 
     % Finalise the parallelisation.
     %
@@ -1694,8 +1705,7 @@
         MaybeCostData = yes(CostData)
     ;
         MaybeCostData = no,
-        error(this_file ++ "finalise_parallelisation: "
-            ++ "Parallelisation has no cost data")
+        unexpected($module, $pred, "parallelisation has no cost data")
     ),
     CostData = parallelisation_cost_data(Overlap, Metrics0, _),
 
@@ -1744,17 +1754,17 @@
 
 :- type dependent_conjunct_execution
     --->    dependent_conjunct_execution(
+                % Pairs of start and stop times of the execution.
+                % Assume that the list is not sorted.
                 dce_execution           :: assoc_list(float, float),
-                    % Pairs of start and stop times of the execution.  Assume
-                    % that the list is not sorted.
 
-                dce_productions         :: map(var_rep, float),
                     % The variable productions.  This may be a superset of the
                     % dependent variables.
+                dce_productions         :: map(var_rep, float),
 
-                dce_consumptions        :: map(var_rep, float)
                     % The variable consumptions.  This will contain only
                     % references for those variables that will become futures.
+                dce_consumptions        :: map(var_rep, float)
             ).
 
     % calculate_parallel_cost(Info, !Parallelisation).
@@ -1858,13 +1868,13 @@
     Vars = set.intersect(ProducedVars, RightConsumedVars),
 
     % This conjunct will actually start after it has been sparked by
-    % the prevous conjunct.  Which in turn may have been sparked by an
+    % the previous conjunct, which in turn may have been sparked by an
     % earlier conjunct.
     SparkDelay = Info ^ ipi_opts ^ cpcp_sparking_delay,
     StartTime0 = float((!.ConjNum - 1) * SparkDelay),
 
-    % If there are conjuncts after this conjunct we will have the
-    % additional cost of sparking them.
+    % If there are conjuncts after this conjunct, we will have
+    % the additional cost of sparking them.
     (
         IsLastConjunct = not_last_par_conjunct,
         SparkCost = Info ^ ipi_opts ^ cpcp_sparking_cost,
@@ -1877,8 +1887,8 @@
     (
         Algorithm = parallelise_dep_conjs_overlap,
 
-        % Get the list of variables consumed by this conjunct that will be
-        % turned into futures.
+        % Get the list of variables consumed by this conjunct
+        % that will be turned into futures.
         foldl3(get_consumptions_list, Conjunct, Vars, _, 0.0, _,
             [], ConsumptionsList0),
         reverse(ConsumptionsList0, ConsumptionsList),
@@ -1889,8 +1899,8 @@
             StartTime, LastParConsumeTime, StartTime, LastResumeTime,
             [], RevExecution0, map.init, ConsumptionsMap),
 
-        % Calculate the point at which this conjunct finishes execution and
-        % complete the RevExecutions structure..
+        % Calculate the point at which this conjunct finishes execution
+        % and complete the RevExecutions structure..
         reverse(RevExecution, Execution),
         CostBPar = LastParConsumeTime + (CostB - LastSeqConsumeTime),
         RevExecution = [ (LastResumeTime - CostBPar) | RevExecution0 ],
@@ -1912,8 +1922,8 @@
     !:Metrics = init_parallel_exec_metrics_incomplete(!.Metrics, CostSignals,
         CostB, CostBPar),
 
-    % Build the productions map for the next conjunct.  This map contains all
-    % the variables produced by this code, not just that are used for
+    % Build the productions map for the next conjunct. This map contains
+    % all the variables produced by this code, not just that are used for
     % dependent parallelisation.
     foldl3(get_productions_map, Conjunct, StartTime, _, Execution, _,
         !ProductionsMap),
@@ -1972,7 +1982,7 @@
     % the variable until it is ready for it.  These are the two parameters to
     % max/2.
     %
-    % The second parameter can be explained further, Q may have waited on a
+    % The second parameter can be explained further. Q may have waited on a
     % future previously, if so !.PrevParConsumeTime is when it finished
     % waiting, and SeqConsTime - !.PrevSeqConsumeTime is how long Q will take
     % between the two waits.
@@ -1984,7 +1994,7 @@
         float(Info ^ ipi_opts ^ cpcp_future_wait_cost),
 
     (
-        % True if Q had to suspend waiting for P,  Not that we don't include
+        % True if Q had to suspend waiting for P. Note that we don't include
         % FutureSyncTime here.  This is true if Q has to block at all even if
         % it can be made runable before the context switch is complete.
         ProdTime > ParConsTimeNotBlocked
@@ -1993,7 +2003,7 @@
         ParConsTime = ParConsTime0 +
             float(Info ^ ipi_opts ^ cpcp_context_wakeup_delay),
         !:RevExecution =
-            [ (!.ResumeTime - ParConsTimeNotBlocked) | !.RevExecution ],
+            [(!.ResumeTime - ParConsTimeNotBlocked) | !.RevExecution],
         !:ResumeTime = ParConsTime
     ;
         ParConsTime = ParConsTime0
@@ -2034,17 +2044,16 @@
 
 build_dependency_graphs(Goals, Maps) :-
     Graph0 = digraph.init,
-    build_dependency_graph(Goals, 1, map.init, _VarDepMap,
-        Graph0, Graph),
+    build_dependency_graph(Goals, 1, map.init, _VarDepMap, Graph0, Graph),
     Maps = dependency_graphs(Graph, tc(Graph)).
 
 :- pred depends_lookup(dependency_graphs::in, int::in, set(int)::out) is det.
 
 depends_lookup(DependencyGraphs, GoalNum, Deps) :-
-    graph_do_lookup(lookup_from, DependencyGraphs ^ dm_forward, GoalNum,
-        Deps).
+    graph_do_lookup(lookup_from, DependencyGraphs ^ dm_forward, GoalNum, Deps).
 
-:- pred depends_lookup_tc(dependency_graphs::in, int::in, set(int)::out) is det.
+:- pred depends_lookup_tc(dependency_graphs::in, int::in, set(int)::out)
+    is det.
 
 depends_lookup_tc(DependencyGraphs, GoalNum, Deps) :-
     graph_do_lookup(lookup_from, DependencyGraphs ^ dm_forward_tc, GoalNum,
@@ -2213,11 +2222,11 @@
     ConsumptionVars = intersect(!.Vars, AllConsumptionVars),
     map(var_consumptions(!.Time, Goal),
         ConsumptionVars, ConsumptionTimesSet0),
-    % Since we re-sort the list we don't need a sorted one to start with, but
-    % the set module doesn't export a "to_list" predicate,  (Sorting has no
-    % cost since the set is a sorted list internally).
+    % Since we re-sort the list we don't need a sorted one to start with,
+    % but the set module doesn't export a "to_list" predicate. (Getting
+    % a sorted list has no cost since the set is a sorted list internally).
     set.to_sorted_list(ConsumptionTimesSet0, ConsumptionTimes0),
-    sort((pred((_ - TimeA)::in, (_ - TimeB)::in, Result::out) is det :-
+    list.sort((pred((_ - TimeA)::in, (_ - TimeB)::in, Result::out) is det :-
             % Note that the Time arguments are swapped, this list must be
             % produced in latest to earliest order.
             compare(Result, TimeB, TimeA)
@@ -2432,12 +2441,12 @@
             Uses = [Use]
         ;
             Uses = [_, _ | _],
-            error(this_file ++ "Too many solutions to compute_var_use_lazy_arg"
-                ++ " for a production")
+            unexpected($module, $pred, "Too many solutions ")
         )
     ).
 
-:- pred earliest_use(var_use_info::in, var_use_info::in, var_use_info::out) is det.
+:- pred earliest_use(var_use_info::in, var_use_info::in, var_use_info::out)
+    is det.
 
 earliest_use(A, B, Ealiest) :-
     TimeA = A ^ vui_cost_until_use,
@@ -2452,7 +2461,8 @@
     list(var_rep)::in, cost_and_callees::in, cs_cost_csq::in, var_use_type::in,
     var_use_info::out) is multi.
 
-compute_var_use_lazy_arg(Info, Var, Args, CostAndCallee, Cost, VarUseType, Use) :-
+compute_var_use_lazy_arg(Info, Var, Args, CostAndCallee, Cost, VarUseType,
+        Use) :-
     ( 0.0 < cs_cost_get_calls(Cost) ->
         CostPercall = cs_cost_get_percall(Cost),
         ( member_index0(Var, Args, ArgNum) ->
@@ -2466,8 +2476,8 @@
                 ( singleton_set(CostAndCallee ^ cac_callees, CalleePrime) ->
                     Callee = CalleePrime
                 ;
-                    error(this_file ++
-                        "First-order call site has wrong number of CSDs")
+                    unexpected($module, $pred,
+                        "first-order call site has wrong number of CSDs")
                 ),
                 CSDPtr = Callee ^ c_csd,
                 RecursionType = Info ^ ipi_recursion_type,
@@ -2482,8 +2492,13 @@
             )
         ;
             Use = var_use_info(0.0, CostPercall, VarUseType),
-            require(unify(VarUseType, var_use_consumption), this_file ++
-                "Var use type most be consumption if \\+ member(Var, Args)")
+            ( unify(VarUseType, var_use_consumption) ->
+                true
+            ;
+                unexpected($module, $pred,
+                    "Var use type most be consumption if " ++
+                    "\\+ member(Var, Args)")
+            )
         )
     ;
         % This call site is never called.
@@ -2626,7 +2641,7 @@
             Costly = is_costly_atomic_goal
         ;
             GoalType = pgt_other_atomic_goal,
-            error(this_file ++ "pgt_other_atomic_goal is never costly")
+            unexpected($module, $pred, "pgt_other_atomic_goal is never costly")
         ;
             GoalType = pgt_non_atomic_goal,
             % TODO: distinguish between compound goals with one branch that is
@@ -2641,8 +2656,8 @@
         Costly = is_not_costly_goal
     ).
 
-:- pred var_get_mode(inst_map::in, inst_map::in, var_rep::in, var_mode_rep::out)
-    is det.
+:- pred var_get_mode(inst_map::in, inst_map::in, var_rep::in,
+    var_mode_rep::out) is det.
 
 var_get_mode(InstMapBefore, InstMapAfter, VarRep, VarModeRep) :-
     inst_map_get(InstMapBefore, VarRep, InstBefore, _),
@@ -2663,20 +2678,20 @@
     (
         (
             GoalExpr0 = conj_rep(Conjs0),
-            map_foldl2(conj_to_pard_goals(Info, GoalPath), Conjs0, Conjs, 1, _,
-                !Messages),
+            list.map_foldl2(conj_to_pard_goals(Info, GoalPath), Conjs0, Conjs,
+                1, _, !Messages),
             conj_calc_cost(Conjs, Before, Cost),
             GoalExpr = conj_rep(Conjs)
         ;
             GoalExpr0 = disj_rep(Disjs0),
-            map_foldl2(disj_to_pard_goals(Info, GoalPath), Disjs0, Disjs, 1, _,
-                !Messages),
+            list.map_foldl2(disj_to_pard_goals(Info, GoalPath), Disjs0, Disjs,
+                1, _, !Messages),
             disj_calc_cost(Disjs, Before, Cost),
             GoalExpr = disj_rep(Disjs)
         ;
             GoalExpr0 = switch_rep(Var, CanFail, Cases0),
-            map_foldl2(case_to_pard_goal(Info, GoalPath), Cases0, Cases, 1, _,
-                !Messages),
+            list.map_foldl2(case_to_pard_goal(Info, GoalPath), Cases0, Cases,
+                1, _, !Messages),
             switch_calc_cost(Cases, Before, Cost),
             GoalExpr = switch_rep(Var, CanFail, Cases)
         ;
@@ -2709,7 +2724,8 @@
         PardGoalType = pgt_non_atomic_goal,
 
         BoundVars = to_sorted_list(InstMapInfo ^ im_bound_vars),
-        foldl(goal_build_use_map(!.Goal, GoalPath, Cost, Info,
+        list.foldl(
+            goal_build_use_map(!.Goal, GoalPath, Cost, Info,
                 var_use_production),
             BoundVars, map.init, ProductionUseMap),
         ConsumedVars = to_sorted_list(InstMapInfo ^ im_consumed_vars),
@@ -2723,11 +2739,13 @@
             PardGoalType, Messages),
         atomic_pard_goal_cost(Info, GoalPath, Coverage, AtomicGoal, Cost),
 
-        foldl(atomic_goal_build_use_map(AtomicGoal, GoalPath, Info,
+        list.foldl(
+            atomic_goal_build_use_map(AtomicGoal, GoalPath, Info,
                 var_use_production),
             BoundVars, map.init, ProductionUseMap),
         ConsumedVars = InstMapInfo ^ im_consumed_vars,
-        foldl(atomic_goal_build_use_map(AtomicGoal, GoalPath, Info,
+        list.foldl(
+            atomic_goal_build_use_map(AtomicGoal, GoalPath, Info,
                 var_use_consumption),
             to_sorted_list(ConsumedVars), map.init, ConsumptionUseMap),
 
@@ -2855,31 +2873,30 @@
 % Annotate a goal with instantiation information.
 %
 
-    % inst_map_info now contains information that it's not necessary to
-    % contain.  Namely the im_after field can be calculated from the im_before
-    % and im_bound_vars fields.  However since this information will probably
+    % inst_map_info now contains information that it does not need to contain.
+    % Namely, the im_after field can be calculated from the im_before and
+    % im_bound_vars fields.  However since this information will probably
     % be attached to a different goal there is not much extra cost in having a
     % pointer to it from here.
     %
 :- type inst_map_info
     --->    inst_map_info(
-                im_before           :: inst_map,
                     % The inst map before this goal is executed.
+                im_before           :: inst_map,
 
-                im_after            :: inst_map,
                     % The inst map after this goal was executed.
+                im_after            :: inst_map,
 
-                im_consumed_vars    :: set(var_rep),
                     % Variables consumed (read but not bound) by this goal.
+                im_consumed_vars    :: set(var_rep),
 
-                im_bound_vars       :: set(var_rep)
                     % The variables produced by this goal.
+                im_bound_vars       :: set(var_rep)
             ).
 
 :- typeclass goal_annotation_add_instmap(A, B) where [
-        pred add_instmap(inst_map_info, A, B),
-        mode add_instmap(in, in, out) is det
-    ].
+    pred add_instmap(inst_map_info::in, A::in, B::out) is det
+].
 
     % Note: It may be useful to add other annotations such as goal path or cost
     % information.
@@ -3055,8 +3072,9 @@
     seen_duplicate_instantiation::out, set(var_rep)::out, set(var_rep)::out)
     is det <= goal_annotation_add_instmap(A, B).
 
-ite_annotate_with_instmap(Cond0, Cond, Then0, Then, Else0, Else, InstMap0, InstMap,
-        SeenDuplicateInstantiation, ConsumedVars, BoundVars) :-
+ite_annotate_with_instmap(Cond0, Cond, Then0, Then, Else0, Else,
+        InstMap0, InstMap, SeenDuplicateInstantiation,
+        ConsumedVars, BoundVars) :-
     goal_annotate_with_instmap(Cond0, Cond, InstMap0, InstMapAfterCond,
         SeenDuplicateInstantiationCond, ConsumedVarsCond, _BoundVarsCond),
     goal_annotate_with_instmap(Then0, Then, InstMapAfterCond, InstMapAfterThen,
@@ -3202,12 +3220,6 @@
 % Useful utility predicates.
 %
 
-:- func this_file = string.
-
-this_file = "mdprof_fb.automatic_parallelism.m: ".
-
-%-----------------------------------------------------------------------------%
-
 create_candidate_parallel_conj_proc_report(Proc - CandidateParConjunctionProc,
         Report) :-
     CandidateParConjunctionProc =
@@ -3228,7 +3240,6 @@
         GoalsAfter, GoalsAfterCost, ParExecMetrics),
     ParExecMetrics = parallel_exec_metrics(NumCalls, SeqTime, ParTime,
         ParOverheads, FirstConjDeadTime, FutureDeadTime),
-
     (
         IsDependent = conjuncts_are_independent,
         DependanceString = "no"
@@ -3241,7 +3252,8 @@
     Speedup = parallel_exec_metrics_get_speedup(ParExecMetrics),
     TimeSaving = parallel_exec_metrics_get_time_saving(ParExecMetrics),
     TotalDeadTime = FirstConjDeadTime + FutureDeadTime,
-    format("      %s\n" ++
+    string.format(
+        "      %s\n" ++
            "      Path: %s\n" ++
            "      Dependent: %s\n" ++
            "      NumCalls: %s\n" ++
@@ -3271,7 +3283,7 @@
     ( goal_path_from_string(GoalPathString, GoalPathPrime) ->
         GoalPath = GoalPathPrime
     ;
-        error(this_file ++ "couldn't parse goal path.")
+        unexpected($module, $pred, "couldn't parse goal path")
     ),
     some [!ConjNum] (
         !:ConjNum = FirstConjNum,
@@ -3310,8 +3322,8 @@
     int::in, list(seq_conj(pard_goal))::in,
     cord(string)::in, cord(string)::out) is det.
 
-format_parallel_conjuncts(_VarTable, Indent, _GoalPath, _ConjNum0, [],
-        !Report) :-
+format_parallel_conjuncts(_VarTable, Indent, _GoalPath, _ConjNum0,
+        [], !Report) :-
     IndentStr = indent(Indent),
     !:Report = snoc(!.Report ++ IndentStr, ")\n").
 format_parallel_conjuncts(VarTable, Indent, GoalPath0, ConjNum0,
@@ -3319,7 +3331,7 @@
     Conj = seq_conj(Goals),
     (
         Goals = [],
-        error(this_file ++ " empty conjunct in parallel conjunction")
+        unexpected($module, $pred, "empty conjunct in parallel conjunction")
     ;
         Goals = [Goal | GoalsTail],
         GoalPath = goal_path_add_at_end(GoalPath0, step_conj(ConjNum0)),
@@ -3361,7 +3373,8 @@
             singleton(format("%% conjunction: %s",
                 [s(goal_path_to_string(GoalPath))])) ++
             nl_indent(Indent) ++
-            singleton(format("%% Cost: %s", [s(two_decimal_fraction(Cost))])) ++
+            singleton(format("%% Cost: %s",
+                [s(two_decimal_fraction(Cost))])) ++
             nl ++ nl
     ;
         true
@@ -3390,9 +3403,8 @@
     ).
 
 :- instance goal_annotation(pard_goal_annotation) where [
-        pred(print_goal_annotation_to_strings/3) is
-            format_pard_goal_annotation
-    ].
+    pred(print_goal_annotation_to_strings/3) is format_pard_goal_annotation
+].
 
 :- pred format_pard_goal_annotation(var_table::in, pard_goal_annotation::in,
     cord(cord(string))::out) is det.
@@ -3408,8 +3420,7 @@
         CostAboveThresholdStr = "not above threshold"
     ),
     CostLine = singleton(format("cost: %s (%s)",
-            [s(two_decimal_fraction(CostPercall)),
-             s(CostAboveThresholdStr)])),
+        [s(two_decimal_fraction(CostPercall)), s(CostAboveThresholdStr)])),
     format_var_use_report(VarTable, productions, Productions,
         ProductionsReport),
     format_var_use_report(VarTable, consumptions, Consumptions,
@@ -3454,19 +3465,21 @@
     CliquePtr = clique_ptr(CliqueNum),
     Calls = cs_cost_get_calls(Clique ^ ccc_cs_cost),
     PercallCost = cs_cost_get_percall(Clique ^ ccc_cs_cost),
-    io.format("D: Not entering clique: %d, " ++
-        "it is below the clique threashold\n  " ++
+    io.format(
+        "D: Not entering clique: %d, " ++
+        "it is below the clique threshold\n  " ++
         "It has per-call cost %f and is called %f times\n\n",
         [i(CliqueNum), f(PercallCost), f(Calls)], !IO).
 
-:- pred debug_cliques_exeeded_parallelism(candidate_child_clique::in,
+:- pred debug_cliques_exceeded_parallelism(candidate_child_clique::in,
     io::di, io::uo) is det.
 
-debug_cliques_exeeded_parallelism(Clique, !IO) :-
+debug_cliques_exceeded_parallelism(Clique, !IO) :-
     CliquePtr = Clique ^ ccc_clique,
     CliquePtr = clique_ptr(CliqueNum),
-    io.format("D: Not entiring clique %d, " ++
-        "no-more parallelisation resources available at this context\n\n",
+    io.format(
+        "D: Not entiring clique %d, " ++
+        "no more parallelisation resources available at this context\n\n",
         [i(CliqueNum)], !IO).
 
 %-----------------------------------------------------------------------------%
Index: deep_profiler/mdprof_fb.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/deep_profiler/mdprof_fb.m,v
retrieving revision 1.1
diff -u -b -r1.1 mdprof_fb.m
--- deep_profiler/mdprof_fb.m	17 Mar 2009 06:27:07 -0000	1.1
+++ deep_profiler/mdprof_fb.m	14 Dec 2010 03:46:28 -0000
@@ -9,7 +9,7 @@
 % File: mdprof_fb.m.
 % Author: pbone.
 %
-% Deep Profiling feedback procuedres.  Each sub-module gathers some deep
+% Deep profiling feedback procedures. Each submodule gathers some deep
 % profiling feedback information for use by the compiler.
 %
 %-----------------------------------------------------------------------------%
Index: deep_profiler/mdprof_feedback.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/deep_profiler/mdprof_feedback.m,v
retrieving revision 1.31
diff -u -b -r1.31 mdprof_feedback.m
--- deep_profiler/mdprof_feedback.m	13 Dec 2010 04:31:45 -0000	1.31
+++ deep_profiler/mdprof_feedback.m	14 Dec 2010 12:23:23 -0000
@@ -9,10 +9,11 @@
 % File: mdprof_feedback.m.
 % Author: tannier, pbone.
 %
-% This module contains the code for writing to a file the CSSs whose CSDs'
+% This module contains the code for writing to a file the CSSs whose CSD's
 % mean/median call sequence counts (own and desc) exceed the given threshold.
 %
-% The generated file will then be used by the compiler for implicit parallelism.
+% The generated file will then be used by the compiler for
+% implicit parallelism.
 %
 %-----------------------------------------------------------------------------%
 
@@ -181,7 +182,8 @@
         ContextWakeupDelay, CliqueThreshold, CallSiteThreshold,
         ParalleliseDepConjs, BestParAlgorithm),
     best_par_algorithm_string(BestParAlgorithm, BestParAlgorithmStr),
-    ReportHeader = singleton(format("  Candidate Parallel Conjunctions:\n" ++
+    ReportHeader = singleton(format(
+        "  Candidate Parallel Conjunctions:\n" ++
             "    Desired parallelism: %f\n" ++
             "    Intermodule var use: %s\n" ++
             "    Sparking cost: %d\n" ++
@@ -195,10 +197,18 @@
             "    BestParallelisationAlgorithm: %s\n" ++
             "    Number of Parallel Conjunctions: %d\n" ++
             "    Parallel Conjunctions:\n\n",
-        [f(DesiredParallelism), s(string(IntermoduleVarUse)), i(SparkingCost),
-         i(SparkingDelay), i(SignalCost), i(WaitCost), i(ContextWakeupDelay),
-         i(CliqueThreshold), i(CallSiteThreshold), s(ParalleliseDepConjsStr),
-         s(BestParAlgorithmStr), i(NumConjs)])),
+        [f(DesiredParallelism),
+         s(string(IntermoduleVarUse)),
+         i(SparkingCost),
+         i(SparkingDelay),
+         i(SignalCost),
+         i(WaitCost),
+         i(ContextWakeupDelay),
+         i(CliqueThreshold),
+         i(CallSiteThreshold),
+         s(ParalleliseDepConjsStr),
+         s(BestParAlgorithmStr),
+         i(NumConjs)])),
     (
         ParalleliseDepConjs = parallelise_dep_conjs_overlap,
         ParalleliseDepConjsStr = "yes, use overlap calculation"
@@ -264,7 +274,7 @@
                 call sequence counts.
     --implicit-parallelism-sparking-delay <value>
                 The time taken from the time a spark is created until the spark
-                is executed by another processor assuming that there is a free
+                is executed by another processor, assuming that there is a free
                 processor.
     --implicit-parallelism-future-signal-cost <value>
                 The cost of the signal() call for the producer of a shared
@@ -284,25 +294,25 @@
                 The cost of a call site to be considered for parallelism
                 against another call site.
     --implicit-parallelism-dependant-conjunctions
-                Advise the compiler to parallelism dependant conjunctions.
+                Advise the compiler to parallelise dependant conjunctions.
                 This will become the default once the implementation is
                 complete.
-    --implicit-parallelism-dependant-conjunctions-algorithm <option>
+    --implicit-parallelism-dependant-conjunctions-algorithm <alg>
                 Choose the algorithm that is used to estimate the speedup for
-                dependant calculations.  The options are:
+                dependant calculations.  The algorithms are:
                     overlap: Compute the 'overlap' between dependant
                       conjunctions.
                     num_vars: Use the number of shared variables as a proxy for
                       the amount of overlap available.
                     naive: Ignore dependencies.
                 The default is overlap.
-    --implicit-parallelism-best-parallelisation-algorithm <option>
+    --implicit-parallelism-best-parallelisation-algorithm <algorithm>
                 Select which algorithm to use to find the best way to
-                parallelise a conjunction.  The options are:
+                parallelise a conjunction.  The algorithms are:
                     greedy: A greedy algorithm with a linear time complexity.
                     complete: A complete algorithm with a branch and bound
-                      search, this can be slow for problems larger then 50
-                      conjuncts, it has an exponential xomplexity.
+                      search. This can be slow for problems larger than 50
+                      conjuncts, since it has an exponential complexity.
                     complete-size(N): As above exept that it takes a single
                       parameter, N.  A conjunction has more than N conjuncts
                       then the greedy algorithm will be used.
@@ -422,25 +432,32 @@
 
 :- pred long(string::in, option::out) is semidet.
 
-long("help",                                help).
-long("verbosity",                           verbosity).
-long("version",                             version).
-long("debug-read-profile",                  debug_read_profile).
-long("report",                              report).
-
-long("calls-above-threshold-sorted",        calls_above_threshold_sorted).
+long("help",
+    help).
+long("verbosity",
+    verbosity).
+long("version",
+    version).
+long("debug-read-profile",
+    debug_read_profile).
+long("report",
+    report).
+long("calls-above-threshold-sorted",
+    calls_above_threshold_sorted).
 long("calls-above-threshold-sorted-measure",
     calls_above_threshold_sorted_measure).
-
-long("candidate-parallel-conjunctions",     candidate_parallel_conjunctions).
-
-long("implicit-parallelism",                implicit_parallelism).
-
-long("desired-parallelism",                 desired_parallelism).
+long("candidate-parallel-conjunctions",
+    candidate_parallel_conjunctions).
+long("implicit-parallelism",
+    implicit_parallelism).
+long("desired-parallelism",
+    desired_parallelism).
 long("implicit-parallelism-intermodule-var-use",
     implicit_parallelism_intermodule_var_use).
-long("implicit-parallelism-sparking-cost",  implicit_parallelism_sparking_cost).
-long("implicit-parallelism-sparking-delay", implicit_parallelism_sparking_delay).
+long("implicit-parallelism-sparking-cost",
+    implicit_parallelism_sparking_cost).
+long("implicit-parallelism-sparking-delay",
+    implicit_parallelism_sparking_delay).
 long("implicit-parallelism-future-signal-cost",
     implicit_parallelism_future_signal_cost).
 long("implicit-parallelism-future-wait-cost",
@@ -660,8 +677,7 @@
     parse_result(best_par_algorithm)::out) is det.
 
 parse_best_par_algorithm(String, Result) :-
-    promise_equivalent_solutions [Result]
-    (
+    promise_equivalent_solutions [Result] (
         parse(String, best_par_algorithm_parser, Result)
     ).
 
@@ -772,11 +788,5 @@
     ).
 
 %-----------------------------------------------------------------------------%
-
-:- func this_file = string.
-
-this_file = "mdprof_feedback: ".
-
-%-----------------------------------------------------------------------------%
 :- end_module mdprof_feedback.
 %-----------------------------------------------------------------------------%
Index: deep_profiler/mdprof_test.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/deep_profiler/mdprof_test.m,v
retrieving revision 1.24
diff -u -b -r1.24 mdprof_test.m
--- deep_profiler/mdprof_test.m	23 Sep 2010 04:33:19 -0000	1.24
+++ deep_profiler/mdprof_test.m	14 Dec 2010 03:53:48 -0000
@@ -10,6 +10,7 @@
 % Author: zs.
 %
 % This file contains a tool for testing the behavior of the deep profiler.
+%
 %-----------------------------------------------------------------------------%
 
 :- module mdprof_test.
@@ -236,7 +237,8 @@
     % test_cliques(1, NumCliques, DirName, Pref, Deep, !IO),
     % test_procs(1, NumProcStatics, DirName, Pref, Deep, !IO).
     
-    lookup_bool_option(Options, static_procrep_coverage, StaticProcrepCoverage),
+    lookup_bool_option(Options, static_procrep_coverage,
+        StaticProcrepCoverage),
     (
         StaticProcrepCoverage = yes,
         array.max(Deep ^ proc_statics, NumProcStatics),
Index: deep_profiler/measurement_units.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/deep_profiler/measurement_units.m,v
retrieving revision 1.8
diff -u -b -r1.8 measurement_units.m
--- deep_profiler/measurement_units.m	8 Oct 2010 12:48:56 -0000	1.8
+++ deep_profiler/measurement_units.m	14 Dec 2010 03:55:28 -0000
@@ -116,11 +116,11 @@
 
 :- type probability.
 
-    % A certain thing,  A probability of 1.0
+    % A certain thing,  A probability of 1.0.
     %
 :- func certain = probability.
 
-    % An impossible thing.  A probability of 0.0
+    % An impossible thing.  A probability of 0.0.
     %
 :- func impossible = probability.
 
@@ -134,10 +134,12 @@
 :- func probability_to_float(probability) = float.
 
     % Combine probabilities.
+    %
 :- func or(probability, probability) = probability.
 :- func and(probability, probability) = probability.
 
     % The probability of the given probability not occuring.
+    %
 :- func not_probability(probability) = probability.
 
 %-----------------------------------------------------------------------------%
@@ -205,7 +207,7 @@
 
 %-----------------------------------------------------------------------------%
 %
-% Percent
+% Percentages.
 %
 
 :- type percent
@@ -281,7 +283,7 @@
 
 %-----------------------------------------------------------------------------%
 %
-% Probability
+% Probabilities.
 %
 
 :- type probability == float.
Index: deep_profiler/measurements.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/deep_profiler/measurements.m,v
retrieving revision 1.24
diff -u -b -r1.24 measurements.m
--- deep_profiler/measurements.m	13 Dec 2010 04:31:45 -0000	1.24
+++ deep_profiler/measurements.m	14 Dec 2010 12:26:03 -0000
@@ -763,7 +763,7 @@
         Calls = 0,
         CostTotal \= 0.0
     ->
-        error(this_file ++ "add_goal_costs_seq/2: Calls = 0, Cost \\= 0")
+        unexpected($module, $pred, "Calls = 0, Cost \\= 0")
     ;
         true
     ).
@@ -777,7 +777,7 @@
             CallsA = 0,
             (
                 B = dead_goal,
-                error("TotalCalls \\= 0 for a dead goal")
+                unexpected($module, $pred, "TotalCalls \\= 0 for a dead goal")
             ;
                 B = trivial_goal(CallsB),
                 R = trivial_goal(TotalCalls)
@@ -820,8 +820,11 @@
 
 check_total_calls(CallsA, CallsB, TotalCalls) :-
     Calls = CallsA + CallsB,
-    require(unify(Calls, TotalCalls),
-        this_file ++ "TotalCalls \\= CallsA + CallsB").
+    ( unify(Calls, TotalCalls) ->
+        true
+    ;
+        unexpected($module, $pred, "TotalCalls \\= CallsA + CallsB")
+    ).
 
 goal_cost_get_percall(dead_goal) = 0.0.
 goal_cost_get_percall(trivial_goal(_)) = 0.0.
@@ -907,7 +910,7 @@
                 set(A0, Index, Value + E, A)
             ), NewArray, !Array)
     ;
-        error(this_file ++ "Arrays' bounds do not match")
+        unexpected($module, $pred, "arrays' bounds do not match")
     ).
 
 array_to_static_coverage(Array, yes(Array)).
@@ -941,7 +944,7 @@
 
 some_parallelism(Num) = parallelism_amount(Num) :-
     ( Num < 1.0 ->
-        error(this_file ++ "some_parallelism/1+1: " ++
+        unexpected($module, $pred,
             "Parallelism amount cannot ever be less than 1.0")
     ;
         true
@@ -978,10 +981,10 @@
 
                 pemi_context_wakeup_delay   :: float,
 
-                pemi_internal               ::
-                        maybe(parallel_exec_metrics_internal)
                     % If there are no internal conjuncts then the parallel
                     % conjunction is empty.
+                pemi_internal               ::
+                        maybe(parallel_exec_metrics_internal)
             ).
 
 :- type parallel_exec_metrics_internal
@@ -990,27 +993,27 @@
                 pemi_time_par               :: float
             )
     ;       pem_additional(
+                % The time of the left conjunct (that may be a conjunction).
                 pemi_time_left              :: parallel_exec_metrics_internal,
-                    % The time of the left conjunct (that may be a conjunction),
 
-                pemi_time_left_signals      :: float,
                     % The additional cost of calling signal within the left
                     % conjunct.
                     % NOTE: Note that this should be added to each of the
                     % individual conjuncts _where_ they call signal but thta is
                     % more difficult and may not be required.  We may visit it
                     % in the future.
+                pemi_time_left_signals      :: float,
 
-                pemi_time_right_seq         :: float,
                     % The time of the right conjunct if it is running after
                     % the left in normal sequential execution.
+                pemi_time_right_seq         :: float,
 
-                pemi_time_right_par         :: float
                     % The time of the right conjunct if it is running in
                     % parallel with the left conjunct.  It may have to stop and
                     % wait for variables to be produced; therefore this time is
                     % different to time_right_seq.  This time also includes
                     % parallel execution overheads and delays.
+                pemi_time_right_par         :: float
             ).
 
 init_parallel_exec_metrics_incomplete(Metrics0, TimeSignals, TimeBSeq,
@@ -1022,8 +1025,11 @@
     ;
         MaybeInternal0 = no,
         Internal = pem_left_most(TimeBSeq, TimeBPar),
-        require(unify(TimeSignals, 0.0),
-            this_file ++ "TimeSignal != 0")
+        ( unify(TimeSignals, 0.0) ->
+            true
+        ;
+            unexpected($module, $pred, "TimeSignal != 0")
+        )
     ),
     Metrics = Metrics0 ^ pemi_internal := yes(Internal).
 
@@ -1039,7 +1045,7 @@
         MaybeInternal = yes(Internal)
     ;
         MaybeInternal = no,
-        error(this_file ++ "Cannot finalise empty parallel metrics.")
+        unexpected($module, $pred, "cannot finalise empty parallel metrics")
     ),
     BeforeAndAfterTime = TimeBefore + TimeAfter,
 
@@ -1155,11 +1161,5 @@
     ).
 
 %----------------------------------------------------------------------------%
-
-:- func this_file = string.
-
-this_file = "measurements.m: ".
-
-%----------------------------------------------------------------------------%
 :- end_module measurements.
 %----------------------------------------------------------------------------%
Index: deep_profiler/message.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/deep_profiler/message.m,v
retrieving revision 1.10
diff -u -b -r1.10 message.m
--- deep_profiler/message.m	13 Dec 2010 04:31:45 -0000	1.10
+++ deep_profiler/message.m	14 Dec 2010 05:27:35 -0000
@@ -78,86 +78,77 @@
     %
 :- type message_type
 
-                % A candidate parallel conjunction has been found.
     --->    info_found_candidate_conjunction
+            % A candidate parallel conjunction has been found.
 
+    ;       info_found_conjs_above_callsite_threshold(int)
                 % There are a number of conjuncts containing calls above the
                 % configured call site threshold, we're considering them for
                 % parallelisation against one another.
-                %
-    ;       info_found_conjs_above_callsite_threshold(int)
 
+    ;       info_split_conjunction_into_partitions(int)
                 % The conjunction being consdered for parallelisation had to be
                 % split into several 'partitions' because it contains some non
                 % atomic goals, this can limit the amount of parallelism
                 % available.
-    ;       info_split_conjunction_into_partitions(int)
 
+    ;       info_found_n_conjunctions_with_positive_speedup(int)
                 % There are N conjunctions whose speedup due to parallelisation
                 % is positive.
-    ;       info_found_n_conjunctions_with_positive_speedup(int)
 
+    ;       notice_duplicate_instantiation(
                 % This occurs when a variable is instantiated twice in a
-                % procedure body (different instantiation states are used).  We
-                % don't bother parallelising such procedures.
+                % procedure body (different instantiation states are used).
+                % We don't bother parallelising such procedures.
                 %
-    ;       notice_duplicate_instantiation(
-                int
                     % The number of conjunctions that could have been
                     % parallelised.
+                int
             )
 
+    ;       notice_callpair_has_more_than_one_dependant_var
                 % A pair of calls that could be parallelised have many
-                % dependant variables.  We don't yet calculate the speedup in
+            % dependent variables. We don't yet calculate the speedup in
                 % these situations.
-                %
-    ;       notice_callpair_has_more_than_one_dependant_var
 
+    ;       notice_partition_does_not_have_costly_calls(int, int)
                 % A partition does not enough enough costly calls (>1) and
-                % could not be parallelised, we could have parallelised them if
-                % we could parallelise over non-atomic code.
+            % could not be parallelised, we could have parallelised them
+            % if we could parallelise over non-atomic code.
                 % 
                 % The parameters are the partition number and the number of
                 % costly calls found.
-                %
-    ;       notice_partition_does_not_have_costly_calls(int, int)
 
-                % The candidate conjunction has goals that arn't
-                % determinstic or cc_multi amongst the costly calls.
-                %
     ;       notice_candidate_conjunction_not_det(detism_rep)
+            % The candidate conjunction has goals that are not
+            % determinstic or cc_multi amongst the costly calls.
 
+    ;       warning_cannot_lookup_proc_defn
                 % Couldn't find the proc defn in the progrep data, maybe the
                 % procedure is built-in.
-                %
-    ;       warning_cannot_lookup_proc_defn
 
+    ;       warning_cannot_compute_procrep_coverage_fallback(string)
                 % Couldn't compute the coverage annotation for a procedure
-                % representation.  A fallback method will be used but whithout
+            % representation. A fallback method will be used but without
                 % this information it may be less accurate.
-                %
-    ;       warning_cannot_compute_procrep_coverage_fallback(string)
 
+    ;       warning_cannot_compute_cost_of_recursive_calls(string)
                 % Couldn't compute the cost of recursive calls.
                 %
                 % The parameter contains extra information about this error.
-                %
-    ;       warning_cannot_compute_cost_of_recursive_calls(string)
             
-                % Couldn't compute the time at which a variable is produced or
-                % consumed.
+    ;       warning_cannot_compute_first_use_time(string)
+            % Couldn't compute the time at which a variable is produced
+            % or consumed.
                 %
                 % The parameter contains extra information about this error.
-    ;       warning_cannot_compute_first_use_time(string)
 
+    ;       error_extra_proc_dynamics_in_clique_proc
                 % We don't yet handle clique_proc_reports with multiple proc
                 % dynamics.
-                %
-    ;       error_extra_proc_dynamics_in_clique_proc
 
-                % An error in the generation of a coverage_procrep report.
-                %
     ;       error_coverage_procrep_error(string)
+            % An error in the generation of a coverage_procrep report.
     
     ;       error_exception_thrown(string).
 
@@ -314,8 +305,8 @@
                 ++ " to parallelisation"
         ;
             MessageType = info_split_conjunction_into_partitions(Num),
-            MessageStr = "Split conjunction into %d partitions, this may reduce"
-                ++ " parallelism"
+            MessageStr = "Split conjunction into %d partitions, "
+                ++ "this may reduce parallelism"
         ),
         string.format(MessageStr, [i(Num)], String)
     ;
@@ -325,8 +316,8 @@
             [i(CandidateConjuncts)], String)
     ;
         MessageType = notice_callpair_has_more_than_one_dependant_var,
-        String = "Parallelising call pairs that have more than one dependant"
-            ++ " variable is not yet supported."
+        String = "Parallelising call pairs that have more than one "
+            ++ "dependent variable is not yet supported."
     ;
         MessageType = notice_partition_does_not_have_costly_calls(PartNum,
             NumCalls),
@@ -364,8 +355,8 @@
         ;
             MessageType = 
                 warning_cannot_compute_first_use_time(ErrorStr),
-            Template = "Cannot compute the production or consumption time of a"
-                ++ " variable: %s"
+            Template = "Cannot compute the production or consumption time "
+                ++ "of a variable: %s"
         ),
         string.format(Template, [s(ErrorStr)], String)
     ),
Index: deep_profiler/old_query.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/deep_profiler/old_query.m,v
retrieving revision 1.9
diff -u -b -r1.9 old_query.m
Index: deep_profiler/profile.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/deep_profiler/profile.m,v
retrieving revision 1.32
diff -u -b -r1.32 profile.m
--- deep_profiler/profile.m	11 Oct 2010 00:49:24 -0000	1.32
+++ deep_profiler/profile.m	14 Dec 2010 12:26:52 -0000
@@ -1064,7 +1064,7 @@
         MaybeProgRep = ok(ProgRep)
     ;
         MaybeProgRep = error(Error),
-        error(this_file ++ Error)
+        unexpected($module, $pred, Error)
     ).
 
 deep_get_maybe_progrep(Deep, MaybeProgRep) :-
@@ -1083,11 +1083,5 @@
     ).
 
 %-----------------------------------------------------------------------------%
-
-:- func this_file = string.
-
-this_file = "profile.m: ".
-
-%-----------------------------------------------------------------------------%
 :- end_module profile.
 %-----------------------------------------------------------------------------%
Index: deep_profiler/program_representation_utils.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/deep_profiler/program_representation_utils.m,v
retrieving revision 1.27
diff -u -b -r1.27 program_representation_utils.m
--- deep_profiler/program_representation_utils.m	16 Oct 2010 04:11:04 -0000	1.27
+++ deep_profiler/program_representation_utils.m	14 Dec 2010 12:27:14 -0000
@@ -953,9 +953,3 @@
 
 %----------------------------------------------------------------------------%
 
-:- func this_file = string.
-
-this_file = "program_representation_utils: ".
-
-%----------------------------------------------------------------------------%
-
Index: deep_profiler/query.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/deep_profiler/query.m,v
retrieving revision 1.39
diff -u -b -r1.39 query.m
Index: deep_profiler/read_profile.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/deep_profiler/read_profile.m,v
retrieving revision 1.30
diff -u -b -r1.30 read_profile.m
--- deep_profiler/read_profile.m	11 Oct 2010 00:49:24 -0000	1.30
+++ deep_profiler/read_profile.m	14 Dec 2010 12:27:25 -0000
@@ -1561,10 +1561,4 @@
 ").
 
 %------------------------------------------------------------------------------%
-
-:- func this_file = string.
-
-this_file = "read_profile.m: ".
-
-%------------------------------------------------------------------------------%
 %------------------------------------------------------------------------------%
Index: deep_profiler/recursion_patterns.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/deep_profiler/recursion_patterns.m,v
retrieving revision 1.8
diff -u -b -r1.8 recursion_patterns.m
--- deep_profiler/recursion_patterns.m	16 Oct 2010 04:11:04 -0000	1.8
+++ deep_profiler/recursion_patterns.m	14 Dec 2010 12:28:52 -0000
@@ -157,7 +157,7 @@
     BaseLevel = recursion_level_report(0, BaseCount, BaseProb, BaseCost, 0.0), 
     ( empty(Errors) ->
         ( Maximum < 0 ->
-            error(this_file ++ "negative number of recursive calls")
+            unexpected($module, $pred, "negative number of recursive calls")
         ; Maximum = 0 ->
             Type = rt_not_recursive
         ; Maximum = 1 ->
@@ -167,8 +167,8 @@
                 RecLevel = recursion_level_report(1, round_to_int(RecCountF),
                     RecProb, RecCost, 1.0)
             ;
-                error(format("%smaximum level %d not found", 
-                    [s(this_file), i(1)]))
+                string.format("maximum level %d not found", [i(1)], Msg),
+                unexpected($module, $pred, Msg)
             ),
             AvgMaxDepth = TotalCalls / ParentCalls,
             AvgRecCost = single_rec_average_recursion_cost(BaseCost, RecCost,
@@ -186,8 +186,8 @@
                 RecLevel = recursion_level_report(2, round_to_int(RecCountF),
                     RecProb, RecCost, RecCountF*2.0)
             ;
-                error(format("%smaximum level %d not found", 
-                    [s(this_file), i(1)]))
+                string.format("maximum level %d not found", [i(1)], Msg),
+                unexpected($module, $pred, Msg)
             ),
             Type = rt_divide_and_conquer(BaseLevel, RecLevel)
         ;
@@ -226,9 +226,8 @@
     %
 :- func single_rec_recursion_cost(float, float, int) = float.
 
-single_rec_recursion_cost(BaseCost, RecCost, LevelI) = 
-        BaseCost + (Level * (RecCost + 1.0)) :-
-    Level = float(LevelI).
+single_rec_recursion_cost(BaseCost, RecCost, LevelI) = Cost :-
+    Cost = BaseCost + (float(LevelI) * (RecCost + 1.0)).
     
     % This formula is derived as follows.
     %
@@ -253,9 +252,9 @@
     %
 :- func single_rec_average_recursion_cost(float, float, float) = float.
 
-single_rec_average_recursion_cost(BaseCost, RecCost, AvgMaxDepth) = 
-        BaseCost + ( (Sum) / (AvgMaxDepth + 1.0) ) :-
-    Sum = 0.5 * RecCost * ((AvgMaxDepth * AvgMaxDepth) + AvgMaxDepth).
+single_rec_average_recursion_cost(BaseCost, RecCost, AvgMaxDepth) = Cost :-
+    Sum = 0.5 * RecCost * ((AvgMaxDepth * AvgMaxDepth) + AvgMaxDepth),
+    Cost = BaseCost + ((Sum) / (AvgMaxDepth + 1.0)).
 
 %----------------------------------------------------------------------------%
 
@@ -284,8 +283,8 @@
     % goal_recursion_data(RecursiveCallees, Goal, GoalPath,
     %   init_recursion_data, RecursionData)
     %
-    % Compute RecursionData about Goal if RecursiveCalls are calls that may
-    % eventually lead to Goal.
+    % Compute RecursionData about Goal if RecursiveCalls are calls
+    % that may eventually lead to Goal.
     %
 :- pred goal_recursion_data(clique_ptr::in, 
     map(goal_path, cost_and_callees)::in, goal_path::in,
@@ -297,7 +296,7 @@
     ( get_coverage_before(CoverageInfo, CallsPrime) ->
         Calls = CallsPrime
     ;
-        error(this_file ++ "couldn't retrive coverage information")
+        unexpected($module, $pred, "couldn't retrive coverage information")
     ),
     ( Calls = 0 ->
         !:RecursionData = proc_dead_code
@@ -355,9 +354,9 @@
     map(goal_path, cost_and_callees)::in, goal_path::in, int::in,
     list(goal_rep(coverage_info))::in, recursion_data::out) is det.
 
-    % An empty conjunction is true, there is exactly one trival path through it
-    % with 0 recursive calls.
 conj_recursion_data(_, _, _, _, [], simple_recursion_data(0.0, 0)).
+    % An empty conjunction is true, there is exactly one trivial path
+    % through it with 0 recursive calls.
 conj_recursion_data(ThisClique, CallSiteMap, GoalPath, ConjNum, 
         [Conj | Conjs], RecursionData) :- 
     goal_recursion_data(ThisClique, CallSiteMap, 
@@ -365,9 +364,9 @@
         ConjRecursionData),
     (
         ConjRecursionData = proc_dead_code,
-        % If the first conjunct is dead then the remaining ones will also be
-        % dead.  This speeds up execution and avoids a divide by zero when
-        % calculating ConjSuccessProb below.
+        % If the first conjunct is dead then the remaining ones will
+        % also be dead. This speeds up execution and avoids a divide by zero
+        % when calculating ConjSuccessProb below.
         RecursionData = proc_dead_code
     ;
         ConjRecursionData = recursion_data(_, _, _), 
@@ -387,8 +386,8 @@
 
             success_probability_from_coverage(Conj ^ goal_annotation,
                 ConjSuccessProb),
-            recursion_data_and_probability(ConjSuccessProb, ConjsRecursionData0,
-                ConjsRecursionData),
+            recursion_data_and_probability(ConjSuccessProb,
+                ConjsRecursionData0, ConjsRecursionData),
             
             ConjFailureProb = not_probability(ConjSuccessProb),
             Failure0 = simple_recursion_data(0.0, 0),
@@ -402,20 +401,19 @@
 
 :- pred disj_recursion_data(clique_ptr::in, 
     map(goal_path, cost_and_callees)::in, goal_path::in, int::in, 
-    list(goal_rep(coverage_info))::in, recursion_data::out)
-    is det.
+    list(goal_rep(coverage_info))::in, recursion_data::out) is det.
 
 disj_recursion_data(_, _, _, _, [], simple_recursion_data(0.0, 0)).
 disj_recursion_data(ThisClique, CallSiteMap, GoalPath, DisjNum, 
         [Disj | Disjs], RecursionData) :-
-    % Handle only semidet and committed-choice disjunctions, once a goal
-    % succeeds it cannot be re-entered.
+    % Handle only semidet and committed-choice disjunctions, which cannot be
+    % re-entered once a disjunct succeeds.
     goal_recursion_data(ThisClique, CallSiteMap,
         goal_path_add_at_end(GoalPath, step_disj(DisjNum)), Disj,
         DisjRecursionData),
     (
         DisjRecursionData = proc_dead_code,
-        % If the first disjunct was never tried then no other disjuncts will
+        % If the first disjunct was never tried, then no other disjuncts will
         % ever be tried.
         RecursionData = proc_dead_code
     ;
@@ -425,13 +423,13 @@
         DisjFailureProb = not_probability(DisjSuccessProb), 
         
         % The code can branch here, either it tries the next disjuct, which we
-        % represent as DisjsRecursionData.
+        % represent as DisjsRecursionData, ...
         disj_recursion_data(ThisClique, CallSiteMap, GoalPath, DisjNum + 1,
             Disjs, DisjsRecursionData0),
         recursion_data_and_probability(DisjFailureProb, DisjsRecursionData0,
             DisjsRecursionData),
 
-        % Or it succeeds which we represent as finished.
+        % ... or it succeeds, which we represent as finished.
         Finish0 = simple_recursion_data(0.0, 0),
         recursion_data_and_probability(DisjSuccessProb, Finish0, Finish),
 
@@ -457,7 +455,7 @@
             SuccessProb = probable(float(After) / float(Before))
         )
     ;
-        error(this_file ++ "expected complete coverage information")
+        unexpected($module, $pred, "expected complete coverage information")
     ). 
 
 :- pred ite_recursion_data(clique_ptr::in, 
@@ -486,18 +484,17 @@
         ThenProb = probable(float(ThenCalls) / CallsF),
         ElseProb = probable(float(ElseCalls) / CallsF)
     ;
-        error(this_file ++ "couldn't retrive coverage information")
+        unexpected($module, $pred, "couldn't retrive coverage information")
     ),
-    recursion_data_and_probability(ThenProb, ThenRecursionData0,
-        ThenRecursionData),
-    recursion_data_and_probability(ElseProb, ElseRecursionData0,
-        ElseRecursionData),
+    recursion_data_and_probability(ThenProb,
+        ThenRecursionData0, ThenRecursionData),
+    recursion_data_and_probability(ElseProb,
+        ElseRecursionData0, ElseRecursionData),
 
     % Because the condition goal has coverage information as if it is
-    % entered before either branch, we have to model it in the same way
-    % here, even though it would be fesable to model it sas something
-    % that happens in sequence with both the then and else branches
-    % (within each branch).
+    % entered before either branch, we have to model it in the same way here,
+    % even though it would be fesable to model it sas something that happens
+    % in sequence with both the then and else branches (within each branch).
     merge_recursion_data_after_branch(ThenRecursionData, 
         ElseRecursionData, !:RecursionData),
     merge_recursion_data_sequence(CondRecursionData, !RecursionData).
@@ -522,7 +519,7 @@
     ( get_coverage_before(Goal ^ goal_annotation, CallsPrime) ->
         Calls = CallsPrime
     ;
-        error(this_file ++ "expected coverage information")
+        unexpected($module, $pred, "expected coverage information")
     ),
     CaseProb = probable(float(Calls) / TotalCalls),
     recursion_data_and_probability(CaseProb, CaseRecursionData0,
@@ -592,7 +589,7 @@
     % 
     % + The cost of entering a base case is the weighted average of the costs
     %   of the two base cases.
-    % + The number of times one enteres a base case is the sum of the
+    % + The number of times one enters a base case is the sum of the
     %   individual counts.
     % + The above two rules are also true for recursive cases.
     %
@@ -600,16 +597,27 @@
     recursion_data::in, recursion_data::out) is det.
 
 merge_recursion_data_after_branch(A, B, Result) :-
+    (
     A = recursion_data(RecursionsA, MaxLevelA, ErrorsA),
     B = recursion_data(RecursionsB, MaxLevelB, ErrorsB),
     Recursions0 = assoc_list.merge(RecursionsA, RecursionsB),
     condense_recursions(Recursions0, Recursions),
     MaxLevel = max(MaxLevelA, MaxLevelB),
     Errors = union(ErrorsA, ErrorsB),
-    Result = recursion_data(Recursions, MaxLevel, Errors).
-merge_recursion_data_after_branch(A, proc_dead_code, A) :-
-    A = recursion_data(_, _, _).
-merge_recursion_data_after_branch(proc_dead_code, A, A).
+        Result = recursion_data(Recursions, MaxLevel, Errors)
+    ;
+        A = recursion_data(_, _, _),
+        B = proc_dead_code,
+        Result = A
+    ;
+        A = proc_dead_code,
+        B = recursion_data(_, _, _),
+        Result = B
+    ;
+        A = proc_dead_code,
+        B = proc_dead_code,
+        Result = proc_dead_code
+    ).
 
     % merge_recursion_data_sequence(A, B, Merged).
     %
@@ -629,7 +637,7 @@
     %     rec2
     % )
     % 
-    % It's like algabra!  Teating the conjunction as multiplication and
+    % It's like algabra! Treating the conjunction as multiplication and
     % disjunction as addition we might factorise it as:
     % Note that this is just to show the pattern I can see here.
     % 
@@ -652,20 +660,26 @@
     recursion_data::in, recursion_data::out) is det.
 
 merge_recursion_data_sequence(A, B, Result) :-
+    (
     A = recursion_data(RecursionsA, MaxLevelA, ErrorsA),
     B = recursion_data(RecursionsB, MaxLevelB, ErrorsB),
     recursions_cross_product(RecursionsA, RecursionsB, Recursions0),
     sort(Recursions0, Recursions1),
     condense_recursions(Recursions1, Recursions),
-    % The maximum number of recursions on any path will be the some of the
-    % maximum number of recursions on two conjoined paths since all paths are
-    % conjoined in the cross product.
+        % The maximum number of recursions on any path will be the sum of
+        % the maximum number of recursions on the two conjoined paths,
+        % since all paths are conjoined in the cross product.
     MaxLevel = MaxLevelA + MaxLevelB,
     Errors = union(ErrorsA, ErrorsB),
-    Result = recursion_data(Recursions, MaxLevel, Errors).
-merge_recursion_data_sequence(A, proc_dead_code, proc_dead_code) :-
-    A = recursion_data(_, _, _).
-merge_recursion_data_sequence(proc_dead_code, _, proc_dead_code).
+        Result = recursion_data(Recursions, MaxLevel, Errors)
+    ;
+        A = recursion_data(_, _, _),
+        B = proc_dead_code,
+        Result = proc_dead_code
+    ;
+        A = proc_dead_code,
+        Result = proc_dead_code
+    ).
 
 :- pred condense_recursions(assoc_list(int, recursion_level)::in,
     assoc_list(int, recursion_level)::out) is det.
@@ -684,7 +698,8 @@
         RecA = recursion_level(CostA, ProbabilityA),
         RecB = recursion_level(CostB, ProbabilityB),
         weighted_average(
-            map(probability_to_float, [ProbabilityA, ProbabilityB]),
+            [probability_to_float(ProbabilityA),
+            probability_to_float(ProbabilityB)],
             [CostA, CostB], Cost),
         Probability = or(ProbabilityA, ProbabilityB),
         Rec = recursion_level(Cost, Probability),
@@ -737,8 +752,8 @@
 :- pred recursion_level_and_probability(probability::in, T::in, 
     recursion_level::in, recursion_level::out) is det.
 
-recursion_level_and_probability(AndProb, _, recursion_level(Cost, Prob0), 
-        recursion_level(Cost, Prob)) :-
+recursion_level_and_probability(AndProb, _,
+        recursion_level(Cost, Prob0), recursion_level(Cost, Prob)) :-
     Prob = and(Prob0, AndProb).
 
 :- pred recursion_data_add_error(recursion_error::in, recursion_data::in,
@@ -999,11 +1014,5 @@
 recursion_type_get_maybe_avg_max_depth(rt_errors(_), no).
 
 %----------------------------------------------------------------------------%
-
-:- func this_file = string.
-
-this_file = "recursion_patterns.m: ".
-
-%----------------------------------------------------------------------------%
 :- end_module recursion_patterns.
 %----------------------------------------------------------------------------%
Index: deep_profiler/report.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/deep_profiler/report.m,v
retrieving revision 1.26
diff -u -b -r1.26 report.m
Index: deep_profiler/startup.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/deep_profiler/startup.m,v
retrieving revision 1.26
diff -u -b -r1.26 startup.m
--- deep_profiler/startup.m	11 Oct 2010 00:49:25 -0000	1.26
+++ deep_profiler/startup.m	14 Dec 2010 12:49:36 -0000
@@ -800,27 +800,25 @@
         )
     ;
         MaybeDynamicCoverage = no,
-        error(this_file ++ "No coverage point array in proc dynamic")
+        unexpected($module, $pred, "no coverage point array in proc dynamic")
     ).
 
 %-----------------------------------------------------------------------------%
 
 :- pred summarize_call_site_dynamics(deep::in, deep::out) is det.
 
-summarize_call_site_dynamics(Deep0, Deep) :-
-    CSSOwnArray0 = Deep0 ^ css_own,
-    CSSDescArray0 = Deep0 ^ css_desc,
+summarize_call_site_dynamics(!Deep) :-
+    CSSOwnArray0 = !.Deep ^ css_own,
+    CSSDescArray0 = !.Deep ^ css_desc,
     array_foldl2_from_1(
         summarize_call_site_dynamic(
-            Deep0 ^ call_site_static_map,
-            Deep0 ^ call_site_statics, Deep0 ^ csd_desc,
-            Deep0 ^ csd_comp_table),
-        Deep0 ^ call_site_dynamics,
+            !.Deep ^ call_site_static_map, !.Deep ^ call_site_statics,
+            !.Deep ^ csd_desc, !.Deep ^ csd_comp_table),
+        !.Deep ^ call_site_dynamics,
         copy(CSSOwnArray0), CSSOwnArray,
         copy(CSSDescArray0), CSSDescArray),
-    Deep = ((Deep0
-        ^ css_own := CSSOwnArray)
-        ^ css_desc := CSSDescArray).
+    !Deep ^ css_own := CSSOwnArray,
+    !Deep ^ css_desc := CSSDescArray.
 
 :- pred summarize_call_site_dynamic(call_site_static_map::in,
     call_site_statics::in, array(inherit_prof_info)::in,
@@ -896,7 +894,7 @@
         array.set(!.CoverageArray, Index, Coverage, !:CoverageArray)
     ;
         MaybeCoverage = no,
-        error(this_file ++ "No coverage data in proc static.")
+        unexpected($module, $pred, "no coverage data in proc static")
     ).
 
 %----------------------------------------------------------------------------%
@@ -1107,11 +1105,5 @@
 maybe_report_msg(no, _, !IO).
 
 %-----------------------------------------------------------------------------%
-
-:- func this_file = string.
-
-this_file = "startup.m".
-
-%-----------------------------------------------------------------------------%
 :- end_module startup.
 %-----------------------------------------------------------------------------%
Index: deep_profiler/top_procs.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/deep_profiler/top_procs.m,v
retrieving revision 1.14
diff -u -b -r1.14 top_procs.m
--- deep_profiler/top_procs.m	4 Aug 2008 03:17:46 -0000	1.14
+++ deep_profiler/top_procs.m	14 Dec 2010 05:47:16 -0000
@@ -702,7 +702,8 @@
     TotalCallSeqs = OwnCallSeqs + DescCallSeqs,
     float(TotalCallSeqs) > Threshold.
 
-:- pred threshold_value_ps_allocs_self(deep::in, float::in, int::in) is semidet.
+:- pred threshold_value_ps_allocs_self(deep::in, float::in, int::in)
+    is semidet.
 
 threshold_value_ps_allocs_self(Deep, Threshold, PSI) :-
     PSOwn = Deep ^ ps_own,
@@ -710,7 +711,8 @@
     OwnAlloc = allocs(Own),
     float(OwnAlloc) > Threshold.
 
-:- pred threshold_value_ps_allocs_both(deep::in, float::in, int::in) is semidet.
+:- pred threshold_value_ps_allocs_both(deep::in, float::in, int::in)
+    is semidet.
 
 threshold_value_ps_allocs_both(Deep, Threshold, PSI) :-
     PSOwn = Deep ^ ps_own,
@@ -722,7 +724,8 @@
     TotalAlloc = OwnAlloc + DescAlloc,
     float(TotalAlloc) > Threshold.
 
-:- pred threshold_value_ps_words_self(deep::in, float::in, int::in) is semidet.
+:- pred threshold_value_ps_words_self(deep::in, float::in, int::in)
+    is semidet.
 
 threshold_value_ps_words_self(Deep, Threshold, PSI) :-
     PSOwn = Deep ^ ps_own,
@@ -744,7 +747,8 @@
 
 %-----------------------------------------------------------------------------%
 
-:- pred threshold_percent_ps_time_self(deep::in, float::in, int::in) is semidet.
+:- pred threshold_percent_ps_time_self(deep::in, float::in, int::in)
+    is semidet.
 
 threshold_percent_ps_time_self(Deep, Threshold, PSI) :-
     PSOwn = Deep ^ ps_own,
@@ -757,7 +761,8 @@
     RootTotalQuanta = RootOwnQuanta + RootDescQuanta,
     100.0 * float(OwnQuanta) > Threshold * float(RootTotalQuanta).
 
-:- pred threshold_percent_ps_time_both(deep::in, float::in, int::in) is semidet.
+:- pred threshold_percent_ps_time_both(deep::in, float::in, int::in)
+    is semidet.
 
 threshold_percent_ps_time_both(Deep, Threshold, PSI) :-
     PSOwn = Deep ^ ps_own,
@@ -774,7 +779,8 @@
     RootTotalQuanta = RootOwnQuanta + RootDescQuanta,
     100.0 * float(TotalQuanta) > Threshold * float(RootTotalQuanta).
 
-:- pred threshold_percent_ps_callseqs_self(deep::in, float::in, int::in) is semidet.
+:- pred threshold_percent_ps_callseqs_self(deep::in, float::in, int::in)
+    is semidet.
 
 threshold_percent_ps_callseqs_self(Deep, Threshold, PSI) :-
     PSOwn = Deep ^ ps_own,
@@ -787,7 +793,8 @@
     RootTotalCallSeqs = RootOwnCallSeqs + RootDescCallSeqs,
     100.0 * float(OwnCallSeqs) > Threshold * float(RootTotalCallSeqs).
 
-:- pred threshold_percent_ps_callseqs_both(deep::in, float::in, int::in) is semidet.
+:- pred threshold_percent_ps_callseqs_both(deep::in, float::in, int::in)
+    is semidet.
 
 threshold_percent_ps_callseqs_both(Deep, Threshold, PSI) :-
     PSOwn = Deep ^ ps_own,
@@ -804,7 +811,8 @@
     RootTotalCallSeqs = RootOwnCallSeqs + RootDescCallSeqs,
     100.0 * float(TotalCallSeqs) > Threshold * float(RootTotalCallSeqs).
 
-:- pred threshold_percent_ps_allocs_self(deep::in, float::in, int::in) is semidet.
+:- pred threshold_percent_ps_allocs_self(deep::in, float::in, int::in)
+    is semidet.
 
 threshold_percent_ps_allocs_self(Deep, Threshold, PSI) :-
     PSOwn = Deep ^ ps_own,
@@ -817,7 +825,8 @@
     RootTotalAlloc = RootOwnAlloc + RootDescAlloc,
     100.0 * float(OwnAlloc) > Threshold * float(RootTotalAlloc).
 
-:- pred threshold_percent_ps_allocs_both(deep::in, float::in, int::in) is semidet.
+:- pred threshold_percent_ps_allocs_both(deep::in, float::in, int::in)
+    is semidet.
 
 threshold_percent_ps_allocs_both(Deep, Threshold, PSI) :-
     PSOwn = Deep ^ ps_own,
@@ -834,7 +843,8 @@
     RootTotalAlloc = RootOwnAlloc + RootDescAlloc,
     100.0 * float(TotalAlloc) > Threshold * float(RootTotalAlloc).
 
-:- pred threshold_percent_ps_words_self(deep::in, float::in, int::in) is semidet.
+:- pred threshold_percent_ps_words_self(deep::in, float::in, int::in)
+    is semidet.
 
 threshold_percent_ps_words_self(Deep, Threshold, PSI) :-
     PSOwn = Deep ^ ps_own,
@@ -847,7 +857,8 @@
     RootTotalWords = RootOwnWords + RootDescWords,
     100.0 * float(OwnWords) > Threshold * float(RootTotalWords).
 
-:- pred threshold_percent_ps_words_both(deep::in, float::in, int::in) is semidet.
+:- pred threshold_percent_ps_words_both(deep::in, float::in, int::in)
+    is semidet.
 
 threshold_percent_ps_words_both(Deep, Threshold, PSI) :-
     PSOwn = Deep ^ ps_own,
Index: deep_profiler/var_use_analysis.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/deep_profiler/var_use_analysis.m,v
retrieving revision 1.8
diff -u -b -r1.8 var_use_analysis.m
--- deep_profiler/var_use_analysis.m	16 Oct 2010 04:11:04 -0000	1.8
+++ deep_profiler/var_use_analysis.m	14 Dec 2010 12:52:08 -0000
@@ -158,17 +158,22 @@
 average_var_use(Uses) = var_use_info(CostUntilUse, AvgProcCost, Type) :-
     (
         Uses = [],
-        error(this_file ++ "average_var_use: Cannot average zero items")
+        unexpected($module, $pred, "cannot average zero items")
     ;
         Uses = [var_use_info(_, _, Type) | _],
         foldl2(sum_use_info_costs, Uses, 0.0, SumCost, 0.0, SumProcCost),
         Num = float(length(Uses)),
         CostUntilUse = SumCost / Num,
         AvgProcCost = SumProcCost / Num, 
-        require(all_true((pred(var_use_info(_, _, TypeI)::in) is semidet :- 
+        TestType =
+            ( pred(var_use_info(_, _, TypeI)::in) is semidet :-
                     Type = TypeI
-                ), Uses),
-            "average_var_use: Use types do not match")
+            ),
+        ( all_true(TestType, Uses) ->
+            true
+        ;
+            unexpected($module, $pred, "use types do not match")
+        )
     ).
 
 :- pred sum_use_info_costs(var_use_info::in, float::in, float::out, 
@@ -323,7 +328,7 @@
         )
     ;
         MaybeFirstProc = no,
-        error(this_file ++ "Clique has no first procedure")
+        unexpected($module, $pred, "clique has no first procedure")
     ).
 
 proc_dynamic_var_use_info(CliquePtr, PDPtr, ArgNum, RecursionType,
@@ -342,11 +347,12 @@
                 true
             ;
                 PDPtr = proc_dynamic_ptr(PDNum),
-                error(format(
-                    "%s: Var uses do not match, passed: %s calculated from "
+                string.format(
+                    "Var uses do not match, passed: %s calculated from "
                     ++ "procrep: %s, Arg %d in proc dynamic %d",
-                    [s(this_file), s(string(VarUseType)),
-                     s(string(ComputedUse)), i(ArgNum), i(PDNum)]))
+                    [s(string(VarUseType)), s(string(ComputedUse)),
+                     i(ArgNum), i(PDNum)], Msg),
+                unexpected($module, $pred, Msg)
             ),
 
             % Prepare callsite information.
@@ -368,9 +374,10 @@
             MaybeVarUseInfo = ok(VarUseInfo)
         ;
             PDPtr = proc_dynamic_ptr(PDNum),
-            MaybeVarUseInfo = error(format(
+            string.format(
                 "proc_dynamic_var_use_info: ArgNum %d out of range for PD %d",
-                [i(ArgNum), i(PDNum)]))
+                [i(ArgNum), i(PDNum)], Msg),
+            MaybeVarUseInfo = error(Msg)
         )
     ;
         MaybeProcrepCoverage = error(Error),
@@ -501,8 +508,8 @@
                 ; AtomicGoal = builtin_call_rep(_, _, _)
                 ),
                 % trivial goals have a zero cost, so !CostSoFar is not updated.
-                atomic_trivial_var_first_use(AtomicGoal, BoundVars, !.CostSoFar,
-                    StaticInfo, FoundFirstUse)
+                atomic_trivial_var_first_use(AtomicGoal, BoundVars,
+                    !.CostSoFar, StaticInfo, FoundFirstUse)
             )
         )
     ),
@@ -530,9 +537,7 @@
     map.lookup(CostMap, GoalPath, CostAndCallees),
 
     % Get the cost of the call.
-    (
-        cost_and_callees_is_recursive(CliquePtr, CostAndCallees)
-    ->
+    ( cost_and_callees_is_recursive(CliquePtr, CostAndCallees) ->
         map.lookup(RecCostMap, GoalPath, Cost0)
     ;
         Cost0 = CostAndCallees ^ cac_cost
@@ -555,8 +560,7 @@
         ),
         Vars = [HOVar | Args]
     ),
-    ( member(Var, Vars) ->
-        
+    ( list.member(Var, Vars) ->
         solutions((pred(TimeI::out) is nondet :-
                 (
                     consume_ho_arg(AtomicGoal, Var, TimeI)
@@ -567,7 +571,8 @@
             ), Times),
         (
             Times = [],
-            error(this_file ++ ": No solutions for variable first use time")
+            unexpected($module, $pred,
+                "no solutions for variable first use time")
         ;
             Times = [FirstTime | OtherTimes],
             FoundFirstUse = found_first_use(FirstTime + CostSoFar),
@@ -578,8 +583,8 @@
             ->
                 true
             ;
-                error(this_file ++ 
-                    ": Multiple solutions for variable production time")
+                unexpected($module, $pred,
+                    "multiple solutions for variable production time")
             )
         ),
         
@@ -587,12 +592,12 @@
         (
             VarUseType = var_use_production
         =>
-            member(Var, BoundVars)
+            list.member(Var, BoundVars)
         ->
             true
         ;
-            error(this_file ++ 
-                ": A bound var must be produced by a call if it's an argument.")
+            unexpected($module, $pred,
+                "a bound var must be produced by a call if it is an argument.")
         ),
         (
             VarUseType = var_use_consumption
@@ -601,8 +606,8 @@
         ->
             true
         ;
-            error(this_file ++
-                ": A consumed var must not be mentioned in BoundVars.")
+            unexpected($module, $pred,
+                "a consumed var must not be mentioned in BoundVars")
         ),
         (
             VarUseType = var_use_production
@@ -615,8 +620,8 @@
         ->
             true
         ;
-            error(this_file ++ 
-                ": A HO call site cannot produce it's own HO value.")
+            unexpected($module, $pred,
+                "a HO call site cannot produce its own HO value")
         )
     ;
         FoundFirstUse = have_not_found_first_use
@@ -657,8 +662,8 @@
                 pessimistic_var_use_time(VarUseType, Cost, Time)
             )
         ;
-            error(this_file ++ 
-                "Wrong number of callees for normal call site")
+            unexpected($module, $pred,
+                "wrong number of callees for normal call site")
         )
     ;
         HigherOrder = higher_order_call,
@@ -814,7 +819,8 @@
             ( get_coverage_before(get_coverage(Disj), HeadCount) ->
                 HeadWeight = float(HeadCount)
             ;
-                error(this_file ++ " unknown coverage before disjunct")
+                unexpected($module, $pred,
+                    "unknown coverage before disjunct")
             ),
             (
                 Disjs = [],
@@ -825,7 +831,8 @@
                 ( get_coverage_before(FirstTailCoverage, TailCount) ->
                     TailWeight = float(TailCount)
                 ;
-                    error(this_file ++ " unknown coverage before disjunct")
+                    unexpected($module, $pred,
+                        "unknown coverage before disjunct")
                 )
             ),
             weighted_average([HeadWeight, TailWeight], [HeadCost, TailCost],
@@ -890,9 +897,10 @@
     ( get_coverage_before(get_coverage(Goal), BeforeCount) ->
         Weight = float(BeforeCount)
     ;
-        error(this_file ++ "unknown coverage before switch case")
+        unexpected($module, $pred, "unknown coverage before switch case")
     ).
 
+/* ###  Error: no clauses for predicate `ite_var_first_use'/8. */
 :- pred ite_var_first_use(goal_path::in, 
     goal_rep(T)::in, goal_rep(T)::in, goal_rep(T)::in,
     var_first_use_static_info::in(var_first_use_static_info),
@@ -907,8 +915,8 @@
     ->
         Weights = [float(CountBeforeThen), float(CountBeforeElse)]
     ;
-        error(this_file ++
-            "incomplete coverage information for if then else branches")
+        unexpected($module, $pred,
+            "incomplete coverage information for if-then-else branches")
     ),
     CondGoalPath = goal_path_add_at_end(GoalPath, step_ite_cond),
     ThenGoalPath = goal_path_add_at_end(GoalPath, step_ite_then),
@@ -950,7 +958,8 @@
                 VarUseTime),
             FoundFirstUse = found_first_use(VarUseTime),
             trace [compile_time(flag("debug_first_var_use")), io(!IO)] (
-                io.format("Trace: ITE: Weights: %s, Then: %f, Else: %f, " ++
+                io.format(
+                    "Trace: ITE: Weights: %s, Then: %f, Else: %f, " ++
                         "VarUseTime: %f\n",
                     [s(string(Weights)), f(ThenVarUseTime), f(ElseVarUseTime),
                         f(VarUseTime)],
@@ -985,7 +994,7 @@
 
 :- instance goal_annotation_with_coverage(coverage_info) where [
         (get_coverage(Goal) = Goal ^ goal_annotation)
-    ].
+].
 
 var_first_use(CliquePtr, CallSiteMap, RecursiveCallSiteMap, RT, CurDepth,
         Goal, GoalPath, Cost, Var, VarUseOptions, VarUseInfo) :-
@@ -1012,8 +1021,8 @@
         %     performed.
         (
             VarUseType = var_use_production,
-            error(this_file ++ 
-                ": Goal did not produce a variable that it should have")
+            unexpected($module, $pred,
+                "goal did not produce a variable that it should have")
         ;
             VarUseType = var_use_consumption,
             VarUseInfo = var_use_info(Cost, Cost, VarUseType)
@@ -1047,9 +1056,3 @@
     ).
 
 %-----------------------------------------------------------------------------%
-
-:- func this_file = string.
-
-this_file = "var_use_analysis.m".
-
-%-----------------------------------------------------------------------------%
cvs diff: Diffing deep_profiler/notes
cvs diff: Diffing doc
cvs diff: Diffing extras
cvs diff: Diffing extras/base64
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/fixed
cvs diff: Diffing extras/gator
cvs diff: Diffing extras/gator/generations
cvs diff: Diffing extras/gator/generations/1
cvs diff: Diffing extras/graphics
cvs diff: Diffing extras/graphics/easyx
cvs diff: Diffing extras/graphics/easyx/samples
cvs diff: Diffing extras/graphics/mercury_allegro
cvs diff: Diffing extras/graphics/mercury_allegro/examples
cvs diff: Diffing extras/graphics/mercury_allegro/samples
cvs diff: Diffing extras/graphics/mercury_allegro/samples/demo
cvs diff: Diffing extras/graphics/mercury_allegro/samples/mandel
cvs diff: Diffing extras/graphics/mercury_allegro/samples/pendulum2
cvs diff: Diffing extras/graphics/mercury_allegro/samples/speed
cvs diff: Diffing extras/graphics/mercury_cairo
cvs diff: Diffing extras/graphics/mercury_cairo/samples
cvs diff: Diffing extras/graphics/mercury_cairo/samples/data
cvs diff: Diffing extras/graphics/mercury_cairo/tutorial
cvs diff: Diffing extras/graphics/mercury_glut
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/gears
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/log4m
cvs diff: Diffing extras/logged_output
cvs diff: Diffing extras/monte
cvs diff: Diffing extras/moose
cvs diff: Diffing extras/moose/samples
cvs diff: Diffing extras/moose/tests
cvs diff: Diffing extras/mopenssl
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/net
cvs diff: Diffing extras/odbc
cvs diff: Diffing extras/posix
cvs diff: Diffing extras/posix/samples
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/solver_types
cvs diff: Diffing extras/solver_types/library
cvs diff: Diffing extras/trailed_update
cvs diff: Diffing extras/trailed_update/samples
cvs diff: Diffing extras/trailed_update/tests
cvs diff: Diffing extras/windows_installer_generator
cvs diff: Diffing extras/windows_installer_generator/sample
cvs diff: Diffing extras/windows_installer_generator/sample/images
cvs diff: Diffing extras/xml
cvs diff: Diffing extras/xml/samples
cvs diff: Diffing extras/xml_stylesheets
cvs diff: Diffing java
cvs diff: Diffing java/runtime
cvs diff: Diffing library
Index: library/require.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/library/require.m,v
retrieving revision 1.42
diff -u -b -r1.42 require.m
--- library/require.m	21 Dec 2006 03:00:48 -0000	1.42
+++ library/require.m	14 Dec 2010 06:16:49 -0000
@@ -32,39 +32,93 @@
     %
 :- func func_error(string) = _ is erroneous.
 
+%-----------------------------------------------------------------------------%
+
+    % sorry(Module, What):
+    %
+    % Call error/1 with the string
+    % "Module: Sorry, not implemented: What".
+    %
+    % Use this for features that should be implemented (or at least could be
+    % implemented).
+    %
+:- func sorry(string, string) = _ is erroneous.
+:- pred sorry(string::in, string::in) is erroneous.
+
+    % sorry(Module, Proc What):
+    %
+    % Call error/1 with the string
+    % "Module: Proc: Sorry, not implemented: What".
+    %
+    % Use this for features that should be implemented,
+    % or at least could be implemented.
+    %
+:- func sorry(string, string, string) = _ is erroneous.
+:- pred sorry(string::in, string::in, string::in) is erroneous.
+
+    % unexpected(Module, Message):
+    %
+    % Call error/1 with the string
+    % "Module: Unexpected: What".
+    %
+    % Use this to handle cases which are not expected to arise (i.e. bugs).
+    %
+:- func unexpected(string, string) = _ is erroneous.
+:- pred unexpected(string::in, string::in) is erroneous.
+
+    % unexpected(Module, Proc, Message):
+    %
+    % Call error/1 with the string
+    % "Module: Proc: Unexpected: What".
+    %
+    % Use this to handle cases which are not expected to arise (i.e. bugs).
+    %
+:- func unexpected(string, string, string) = _ is erroneous.
+:- pred unexpected(string::in, string::in, string::in) is erroneous.
+
+%-----------------------------------------------------------------------------%
+
     % require(Goal, Message):
     %
     % Call goal, and call error(Message) if Goal fails.
     % This is not as useful as you might imagine, since it requires
-    % that the goal not produce any output variables.  In
-    % most circumstances you should use an explicit if-then-else
-    % with a call to error/1 in the "else".
+    % that the goal not produce any output variables. In most circumstances,
+    % you should use an explicit if-then-else with a call to error/1,
+    % or one of its wrappers, in the "else".
     %
 :- pred require((pred)::((pred) is semidet), string::in) is det.
 
-    % report_lookup_error(Message, Key, Value):
+    % expect(Goal, Module, Message):
     %
-    % Call error/1 with an error message that is appropriate for
-    % the failure of a lookup operation involving the specified
-    % Key and Value.  The error message will include Message
-    % and information about Key and Value.
+    % Call Goal, and call unexpected(Module, Message) if Goal fails.
     %
-:- pred report_lookup_error(string::in, K::in, V::unused) is erroneous.
+:- pred expect((pred)::((pred) is semidet), string::in, string::in) is det.
+
+%-----------------------------------------------------------------------------%
 
     % report_lookup_error(Message, Key):
     %
     % Call error/1 with an error message that is appropriate for
-    % the failure of a lookup operation involving the specified
-    % Key.  The error message will include Message
-    % and information about Key.
+    % the failure of a lookup operation involving the specified Key.
+    % The error message will include Message and information about Key.
     %
 :- pred report_lookup_error(string::in, K::in) is erroneous.
 
+    % report_lookup_error(Message, Key, Value):
+    %
+    % Call error/1 with an error message that is appropriate for
+    % the failure of a lookup operation involving the specified Key and Value.
+    % The error message will include Message and information about Key
+    % and Value.
+    %
+:- pred report_lookup_error(string::in, K::in, V::unused) is erroneous.
+
 %-----------------------------------------------------------------------------%
 %-----------------------------------------------------------------------------%
 
 :- implementation.
 
+% :- import_module bool.
 :- import_module exception.
 :- import_module list.
 :- import_module string.
@@ -72,6 +126,53 @@
 
 %-----------------------------------------------------------------------------%
 
+% Hopefully error/1 won't be called often (!), so no point inlining it.
+:- pragma no_inline(error/1).
+
+% We declare error/1 to be terminating so that all of the standard library
+% will treat it as terminating.
+:- pragma terminates(error/1).
+
+error(Message) :-
+    throw(software_error(Message)).
+
+% Hopefully func_error/1 won't be called often (!), so no point inlining it.
+:- pragma no_inline(func_error/1).
+
+func_error(Message) = _ :-
+    error(Message).
+
+%-----------------------------------------------------------------------------%
+
+sorry(Module, What) = _ :-
+    sorry(Module, What).
+sorry(Module, Proc, What) = _ :-
+    sorry(Module, Proc, What).
+
+sorry(Module, What) :-
+    string.format("%s: Sorry, not implemented: %s",
+        [s(Module), s(What)], ErrorMessage),
+    error(ErrorMessage).
+sorry(Module, Proc, What) :-
+    string.format("%s: %s: Sorry, not implemented: %s",
+        [s(Module), s(Proc), s(What)], ErrorMessage),
+    error(ErrorMessage).
+
+unexpected(Module, What) = _ :-
+    unexpected(Module, What).
+unexpected(Module, Proc, What) = _ :-
+    unexpected(Module, Proc, What).
+
+unexpected(Module, What) :-
+    string.format("%s: Unexpected: %s", [s(Module), s(What)], ErrorMessage),
+    error(ErrorMessage).
+unexpected(Module, Proc, What) :-
+    string.format("%s: %s: Unexpected: %s", [s(Module), s(Proc), s(What)],
+        ErrorMessage),
+    error(ErrorMessage).
+
+%-----------------------------------------------------------------------------%
+
 require(Goal, Message) :-
     ( call(Goal) ->
         true
@@ -80,53 +181,42 @@
         fail
     ).
 
+expect(Goal, Module, Message) :-
+    ( Goal ->
+        true
+    ;
+        unexpected(Module, Message)
+    ).
+
 %-----------------------------------------------------------------------------%
 
-report_lookup_error(Msg, K, V) :-
+report_lookup_error(Msg, K) :-
     KeyType = type_name(type_of(K)),
-    ValueType = type_name(type_of(V)),
     string.append_list(
         [Msg,
         "\n\tKey Type: ",
         KeyType,
         "\n\tKey Value: ",
-        string(K),
-        "\n\tValue Type: ",
-        ValueType
+        string(K)
         ],
         ErrorString),
     error(ErrorString).
 
-report_lookup_error(Msg, K) :-
+report_lookup_error(Msg, K, V) :-
     KeyType = type_name(type_of(K)),
+    ValueType = type_name(type_of(V)),
     string.append_list(
         [Msg,
         "\n\tKey Type: ",
         KeyType,
         "\n\tKey Value: ",
-        string(K)
+        string(K),
+        "\n\tValue Type: ",
+        ValueType
         ],
         ErrorString),
     error(ErrorString).
 
 %-----------------------------------------------------------------------------%
-
-% Hopefully error/1 won't be called often (!), so no point inlining it.
-:- pragma no_inline(error/1).
-
-% We declare error/1 to be terminating so that all of the standard library
-% will treat it as terminating.
-:- pragma terminates(error/1).
-
-error(Message) :-
-    throw(software_error(Message)).
-
-% Hopefully func_error/1 won't be called often (!), so no point inlining it.
-:- pragma no_inline(func_error/1).
-
-func_error(Message) = _ :-
-    error(Message).
-
-%-----------------------------------------------------------------------------%
 :- end_module require.
 %-----------------------------------------------------------------------------%
cvs diff: Diffing mdbcomp
Index: mdbcomp/feedback.automatic_parallelism.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/mdbcomp/feedback.automatic_parallelism.m,v
retrieving revision 1.6
diff -u -b -r1.6 feedback.automatic_parallelism.m
Index: mdbcomp/mdbcomp.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/mdbcomp/mdbcomp.m,v
retrieving revision 1.7
diff -u -b -r1.7 mdbcomp.m
Index: mdbcomp/trace_counts.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/mdbcomp/trace_counts.m,v
retrieving revision 1.24
diff -u -b -r1.24 trace_counts.m
--- mdbcomp/trace_counts.m	25 Nov 2008 07:46:54 -0000	1.24
+++ mdbcomp/trace_counts.m	14 Dec 2010 12:31:11 -0000
@@ -995,4 +995,3 @@
     set.list_to_set(List0, Set0),
     set.insert(Set0, Item, Set),
     set.to_sorted_list(Set, List).
-
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/c_interface/standalone_c
cvs diff: Diffing samples/concurrency
cvs diff: Diffing samples/concurrency/dining_philosophers
cvs diff: Diffing samples/concurrency/midimon
cvs diff: Diffing samples/diff
cvs diff: Diffing samples/java_interface
cvs diff: Diffing samples/java_interface/java_calls_mercury
cvs diff: Diffing samples/java_interface/mercury_calls_java
cvs diff: Diffing samples/muz
cvs diff: Diffing samples/rot13
cvs diff: Diffing samples/solutions
cvs diff: Diffing samples/solver_types
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 slice
cvs diff: Diffing ssdb
cvs diff: Diffing tests
cvs diff: Diffing tests/analysis
cvs diff: Diffing tests/analysis/ctgc
cvs diff: Diffing tests/analysis/excp
cvs diff: Diffing tests/analysis/ext
cvs diff: Diffing tests/analysis/sharing
cvs diff: Diffing tests/analysis/table
cvs diff: Diffing tests/analysis/trail
cvs diff: Diffing tests/analysis/unused_args
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
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
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/par_conj
cvs diff: Diffing tests/recompilation
cvs diff: Diffing tests/stm
cvs diff: Diffing tests/stm/orig
cvs diff: Diffing tests/stm/orig/stm-compiler
cvs diff: Diffing tests/stm/orig/stm-compiler/test1
cvs diff: Diffing tests/stm/orig/stm-compiler/test10
cvs diff: Diffing tests/stm/orig/stm-compiler/test2
cvs diff: Diffing tests/stm/orig/stm-compiler/test3
cvs diff: Diffing tests/stm/orig/stm-compiler/test4
cvs diff: Diffing tests/stm/orig/stm-compiler/test5
cvs diff: Diffing tests/stm/orig/stm-compiler/test6
cvs diff: Diffing tests/stm/orig/stm-compiler/test7
cvs diff: Diffing tests/stm/orig/stm-compiler/test8
cvs diff: Diffing tests/stm/orig/stm-compiler/test9
cvs diff: Diffing tests/stm/orig/stm-compiler-par
cvs diff: Diffing tests/stm/orig/stm-compiler-par/bm1
cvs diff: Diffing tests/stm/orig/stm-compiler-par/bm2
cvs diff: Diffing tests/stm/orig/stm-compiler-par/stmqueue
cvs diff: Diffing tests/stm/orig/stm-compiler-par/test1
cvs diff: Diffing tests/stm/orig/stm-compiler-par/test10
cvs diff: Diffing tests/stm/orig/stm-compiler-par/test11
cvs diff: Diffing tests/stm/orig/stm-compiler-par/test2
cvs diff: Diffing tests/stm/orig/stm-compiler-par/test3
cvs diff: Diffing tests/stm/orig/stm-compiler-par/test4
cvs diff: Diffing tests/stm/orig/stm-compiler-par/test5
cvs diff: Diffing tests/stm/orig/stm-compiler-par/test6
cvs diff: Diffing tests/stm/orig/stm-compiler-par/test7
cvs diff: Diffing tests/stm/orig/stm-compiler-par/test8
cvs diff: Diffing tests/stm/orig/stm-compiler-par/test9
cvs diff: Diffing tests/stm/orig/stm-compiler-par-asm_fast
cvs diff: Diffing tests/stm/orig/stm-compiler-par-asm_fast/test1
cvs diff: Diffing tests/stm/orig/stm-compiler-par-asm_fast/test2
cvs diff: Diffing tests/stm/orig/stm-compiler-par-asm_fast/test3
cvs diff: Diffing tests/stm/orig/stm-compiler-par-asm_fast/test4
cvs diff: Diffing tests/stm/orig/stm-compiler-par-asm_fast/test5
cvs diff: Diffing tests/stm/orig/stm-compiler-par-asm_fast/test6
cvs diff: Diffing tests/stm/orig/stm-compiler-par-asm_fast/test7
cvs diff: Diffing tests/stm/orig/stm-compiler-par-asm_fast/test8
cvs diff: Diffing tests/stm/orig/stm-compiler-par-asm_fast/test9
cvs diff: Diffing tests/tabling
cvs diff: Diffing tests/term
cvs diff: Diffing tests/trailing
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 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