[m-rev.] diff: clean up unused imports

Julien Fischer juliensf at csse.unimelb.edu.au
Sat Dec 2 02:02:12 AEDT 2006


Estimated hours taken: 3
Branches: main

Clean up in unused module imports in the Mercury system detected
by --warn-unused-imports.

analysis/*.m:
browser/*.m:
deep_profiler/*.m:
compiler/*.m:
library/*.m:
mdbcomp/*.m:
profiler/*.m:
slice/*.m:
 	Remove unused module imports.

 	Fix some minor departures from our coding standards.

analysis/Mercury.options:
browser/Mercury.options:
deep_profiler/Mercury.options:
compiler/Mercury.options:
library/Mercury.options:
mdbcomp/Mercury.options:
profiler/Mercury.options:
slice/Mercury.options:
 	Set --no-warn-unused-imports for those modules that are used as
 	packages or otherwise break --warn-unused-imports, e.g. because they
 	contain predicates with both foreign and Mercury clauses and some of
 	the imports only depend on the latter.

Julien.

Index: analysis/Mercury.options
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/analysis/Mercury.options,v
retrieving revision 1.2
diff -u -r1.2 Mercury.options
--- analysis/Mercury.options	25 Jan 2006 03:21:03 -0000	1.2
+++ analysis/Mercury.options	1 Dec 2006 07:44:51 -0000
@@ -6,7 +6,7 @@
  # Mercury.options - module-specific flags for Mmake and `mmc --make'.
  #-----------------------------------------------------------------------------#

-MCFLAGS-mer_analysis = --no-warn-nothing-exported
+MCFLAGS-mer_analysis = --no-warn-nothing-exported --no-warn-unused-imports

  # XXX work around a bug that sometimes appears at -O4 and above.
  # mmc -r analysis.file.c -s asm_fast.gc -O4 --intermodule-optimisation
Index: analysis/analysis.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/analysis/analysis.m,v
retrieving revision 1.8
diff -u -r1.8 analysis.m
--- analysis/analysis.m	18 Jul 2006 03:59:24 -0000	1.8
+++ analysis/analysis.m	1 Dec 2006 07:44:34 -0000
@@ -22,14 +22,12 @@
  :- module analysis.
  :- interface.

-:- import_module assoc_list.
  :- import_module bool.
  :- import_module io.
  :- import_module list.
  :- import_module maybe.
  :- import_module set.
  :- import_module unit.
-:- import_module univ.

  %-----------------------------------------------------------------------------%

@@ -266,14 +264,15 @@

  :- implementation.

-:- include_module analysis__file.
-:- import_module analysis__file.
+:- include_module analysis.file.
+:- import_module analysis.file.

-:- import_module bool.
  :- import_module map.
  :- import_module require.
-:- import_module set.
  :- import_module string.
+:- import_module univ.
+
+%-----------------------------------------------------------------------------%

  :- type analysis_info
  	---> some [Compiler] analysis_info(
Index: browser/Mercury.options
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/browser/Mercury.options,v
retrieving revision 1.11
diff -u -r1.11 Mercury.options
--- browser/Mercury.options	12 Jan 2006 07:07:30 -0000	1.11
+++ browser/Mercury.options	1 Dec 2006 07:42:01 -0000
@@ -6,9 +6,11 @@
  # Mercury.options - module-specific flags for Mmake and `mmc --make'.
  #-----------------------------------------------------------------------------#

-MCFLAGS-mer_browser = --no-warn-nothing-exported
+MCFLAGS-mer_browser = --no-warn-nothing-exported --no-warn-unused-imports
  MCFLAGS-mdb.dice = --no-warn-nothing-exported

+MCFLAGS-mdb = --no-warn-unused-imports
+
  # XXX Disable higher order specialization for declarative_edt since this
  # optimization has a suspected bug that mdb.declarative_edt.revise_root/3
  # exposes.
Index: browser/browse.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/browser/browse.m,v
retrieving revision 1.65
diff -u -r1.65 browse.m
--- browser/browse.m	30 Oct 2006 07:20:55 -0000	1.65
+++ browser/browse.m	1 Dec 2006 07:29:50 -0000
@@ -20,7 +20,6 @@
  % - Node expansion and contraction in the style of Windows Explorer.
  %
  %---------------------------------------------------------------------------%
-%---------------------------------------------------------------------------%

  :- module mdb.browse.
  :- interface.
@@ -175,13 +174,11 @@

  :- import_module bool.
  :- import_module char.
-:- import_module construct.
  :- import_module deconstruct.
  :- import_module getopt.
  :- import_module int.
  :- import_module map.
  :- import_module pair.
-:- import_module parser.
  :- import_module pprint.
  :- import_module require.
  :- import_module string.
Index: browser/browser_info.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/browser/browser_info.m,v
retrieving revision 1.31
diff -u -r1.31 browser_info.m
--- browser/browser_info.m	15 Oct 2006 23:26:28 -0000	1.31
+++ browser/browser_info.m	1 Dec 2006 07:30:54 -0000
@@ -334,19 +334,18 @@
      int::out, bool::out) is cc_multi.

  %---------------------------------------------------------------------------%
+%---------------------------------------------------------------------------%

  :- implementation.

  :- import_module mdb.term_rep.

  :- import_module deconstruct.
-:- import_module int.
-:- import_module io.
-:- import_module maybe.
  :- import_module require.
  :- import_module string.
  :- import_module type_desc.

+%---------------------------------------------------------------------------%

  :- pragma foreign_export("C", init_persistent_state(out),
      "ML_BROWSE_init_persistent_state").
Index: browser/collect_lib.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/browser/collect_lib.m,v
retrieving revision 1.14
diff -u -r1.14 collect_lib.m
--- browser/collect_lib.m	31 Aug 2006 11:09:47 -0000	1.14
+++ browser/collect_lib.m	1 Dec 2006 07:31:19 -0000
@@ -63,15 +63,16 @@
  :- pred dummy_pred_to_avoid_warning_about_nothing_exported is det.

  %------------------------------------------------------------------------------%
+%------------------------------------------------------------------------------%

  :- implementation.

  :- import_module mdb.dl.

  :- import_module char.
-:- import_module int.
  :- import_module io.
-:- import_module list.
+
+%------------------------------------------------------------------------------%

  dummy_pred_to_avoid_warning_about_nothing_exported.

Index: browser/debugger_interface.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/browser/debugger_interface.m,v
retrieving revision 1.27
diff -u -r1.27 debugger_interface.m
--- browser/debugger_interface.m	31 Aug 2006 11:09:47 -0000	1.27
+++ browser/debugger_interface.m	1 Dec 2006 07:31:45 -0000
@@ -45,7 +45,6 @@
  :- import_module mdbcomp.prim_data.
  :- import_module mdbcomp.program_representation.

-:- import_module bool.
  :- import_module io.
  :- import_module list.
  :- import_module require.
Index: browser/declarative_analyser.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/browser/declarative_analyser.m,v
retrieving revision 1.35
diff -u -r1.35 declarative_analyser.m
--- browser/declarative_analyser.m	22 Aug 2006 05:03:29 -0000	1.35
+++ browser/declarative_analyser.m	1 Dec 2006 07:32:06 -0000
@@ -153,7 +153,6 @@

  :- import_module array.
  :- import_module bool.
-:- import_module counter.
  :- import_module exception.
  :- import_module float.
  :- import_module int.
Index: browser/declarative_debugger.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/browser/declarative_debugger.m,v
retrieving revision 1.72
diff -u -r1.72 declarative_debugger.m
--- browser/declarative_debugger.m	2 Oct 2006 05:21:03 -0000	1.72
+++ browser/declarative_debugger.m	1 Dec 2006 07:33:26 -0000
@@ -72,7 +72,6 @@
  :- import_module io.
  :- import_module list.
  :- import_module maybe.
-:- import_module string.
  :- import_module unit.

  %-----------------------------------------------------------------------------%
@@ -311,17 +310,13 @@

  :- import_module mdb.declarative_edt.
  :- import_module mdb.declarative_oracle.
-:- import_module mdb.util.
  :- import_module mdbcomp.prim_data.
  :- import_module mdbcomp.rtti_access.
-:- import_module mdbcomp.slice_and_dice.
-:- import_module mdbcomp.trace_counts.

  :- import_module bool.
  :- import_module exception.
  :- import_module int.
-:- import_module map.
-:- import_module require.
+:- import_module string.
  :- import_module univ.

  %-----------------------------------------------------------------------------%
Index: browser/declarative_edt.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/browser/declarative_edt.m,v
retrieving revision 1.19
diff -u -r1.19 declarative_edt.m
--- browser/declarative_edt.m	22 Aug 2006 05:03:29 -0000	1.19
+++ browser/declarative_edt.m	1 Dec 2006 07:34:05 -0000
@@ -576,17 +576,17 @@

  :- implementation.

+:- import_module mdb.declarative_execution.
+:- import_module mdb.term_rep.
+
  :- import_module bimap.
-:- import_module char.
  :- import_module counter.
  :- import_module exception.
-:- import_module float.
  :- import_module int.
  :- import_module svmap.
  :- import_module string.

-:- import_module mdb.declarative_execution.
-:- import_module mdb.term_rep.
+%-----------------------------------------------------------------------------%

      % A suspect is an edt node with some additional information relevant
      % to the bug search.
Index: browser/declarative_execution.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/browser/declarative_execution.m,v
retrieving revision 1.55
diff -u -r1.55 declarative_execution.m
--- browser/declarative_execution.m	29 Sep 2006 06:34:43 -0000	1.55
+++ browser/declarative_execution.m	1 Dec 2006 07:34:28 -0000
@@ -468,14 +468,12 @@
  :- implementation.

  :- import_module mdb.declarative_debugger.
-:- import_module mdb.declarative_edt.

  :- import_module exception.
  :- import_module int.
  :- import_module map.
  :- import_module require.
  :- import_module store.
-:- import_module string.
  :- import_module univ.

  %-----------------------------------------------------------------------------%
Index: browser/declarative_oracle.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/browser/declarative_oracle.m,v
retrieving revision 1.55
diff -u -r1.55 declarative_oracle.m
--- browser/declarative_oracle.m	15 Oct 2006 23:26:29 -0000	1.55
+++ browser/declarative_oracle.m	1 Dec 2006 07:35:37 -0000
@@ -39,7 +39,8 @@

  :- import_module bool.
  :- import_module io. 
-:- import_module string.
+
+%-----------------------------------------------------------------------------%

      % A response that the oracle gives to a query about the
      % truth of an EDT node.
@@ -163,19 +164,16 @@
  :- implementation.

  :- import_module mdb.declarative_execution.
-:- import_module mdb.util.
  :- import_module mdbcomp.prim_data.

-:- import_module assoc_list.
  :- import_module bimap.
-:- import_module bool.
  :- import_module counter.
-:- import_module exception.
  :- import_module int.
  :- import_module library.
  :- import_module list.
  :- import_module map.
  :- import_module set.
+:- import_module string.
  :- import_module svmap.

  %-----------------------------------------------------------------------------%
Index: browser/declarative_tree.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/browser/declarative_tree.m,v
retrieving revision 1.47
diff -u -r1.47 declarative_tree.m
--- browser/declarative_tree.m	2 Oct 2006 05:21:03 -0000	1.47
+++ browser/declarative_tree.m	1 Dec 2006 07:36:27 -0000
@@ -58,7 +58,6 @@
  :- import_module mdb.declarative_debugger.
  :- import_module mdb.io_action.
  :- import_module mdb.term_rep.
-:- import_module mdb.util.
  :- import_module mdbcomp.prim_data.
  :- import_module mdbcomp.program_representation.
  :- import_module mdbcomp.rtti_access.
@@ -68,9 +67,7 @@
  :- import_module deconstruct.
  :- import_module exception.
  :- import_module int.
-:- import_module io.
  :- import_module list.
-:- import_module map.
  :- import_module maybe.
  :- import_module pair.
  :- import_module string.
Index: browser/diff.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/browser/diff.m,v
retrieving revision 1.4
diff -u -r1.4 diff.m
--- browser/diff.m	31 Aug 2006 11:09:48 -0000	1.4
+++ browser/diff.m	1 Dec 2006 07:37:28 -0000
@@ -1,39 +1,40 @@
-%---------------------------------------------------------------------------%
+%-----------------------------------------------------------------------------%
  % vim: ft=mercury ts=4 sw=4 et
-%---------------------------------------------------------------------------%
+%-----------------------------------------------------------------------------%
  % Copyright (C) 2005-2006 The University of Melbourne.
  % This file may only be copied under the terms of the GNU Library General
  % Public License - see the file COPYING.LIB in the Mercury distribution.
-%---------------------------------------------------------------------------%
+%-----------------------------------------------------------------------------%
  %
  % File: diff.m.
  %
  % This module computes diffs between terms.
  %
-%---------------------------------------------------------------------------%
+%-----------------------------------------------------------------------------%

  :- module mdb.diff.
  :- interface.

-:- import_module int.
  :- import_module io.
  :- import_module univ.

  :- pred report_diffs(int::in, int::in, univ::in, univ::in, io::di, io::uo)
      is cc_multi.

-%---------------------------------------------------------------------------%
-%---------------------------------------------------------------------------%
+%-----------------------------------------------------------------------------%
+%-----------------------------------------------------------------------------%

  :- implementation.

  :- import_module mdbcomp.program_representation.

  :- import_module deconstruct.
+:- import_module int.
  :- import_module list.
  :- import_module require.
  :- import_module string.
-:- import_module type_desc.
+
+%-----------------------------------------------------------------------------%

  :- pragma foreign_export("C", report_diffs(in, in, in, in, di, uo),
      "ML_report_diffs").
Index: browser/frame.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/browser/frame.m,v
retrieving revision 1.12
diff -u -r1.12 frame.m
--- browser/frame.m	6 Jun 2006 02:27:14 -0000	1.12
+++ browser/frame.m	1 Dec 2006 07:37:46 -0000
@@ -69,9 +69,10 @@
  :- import_module assoc_list.
  :- import_module int.
  :- import_module list.
-:- import_module require.
  :- import_module string.

+%---------------------------------------------------------------------------%
+
  from_string(Str) = [Str].

  vglue(TopFrame, BottomFrame) = StackedFrame :-
Index: browser/io_action.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/browser/io_action.m,v
retrieving revision 1.14
diff -u -r1.14 io_action.m
--- browser/io_action.m	31 Aug 2006 11:09:48 -0000	1.14
+++ browser/io_action.m	1 Dec 2006 07:38:22 -0000
@@ -56,14 +56,8 @@

  :- implementation.

-:- import_module mdb.declarative_debugger.
-
  :- import_module bool.
-:- import_module exception.
-:- import_module int.
  :- import_module maybe.
-:- import_module require.
-:- import_module svmap.

  %-----------------------------------------------------------------------------%

Index: browser/listing.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/browser/listing.m,v
retrieving revision 1.9
diff -u -r1.9 listing.m
--- browser/listing.m	9 Oct 2006 06:40:24 -0000	1.9
+++ browser/listing.m	1 Dec 2006 07:38:51 -0000
@@ -25,7 +25,6 @@

  :- import_module io.
  :- import_module list.
-:- import_module string.

  %-----------------------------------------------------------------------------%

@@ -86,11 +85,7 @@

  :- implementation.

-:- import_module array.
-:- import_module char.
  :- import_module dir.
-:- import_module int.
-:- import_module map.
  :- import_module maybe.
  :- import_module type_desc.

Index: browser/parse.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/browser/parse.m,v
retrieving revision 1.33
diff -u -r1.33 parse.m
--- browser/parse.m	15 Oct 2006 23:26:29 -0000	1.33
+++ browser/parse.m	1 Dec 2006 07:39:53 -0000
@@ -124,7 +124,6 @@
  :- import_module io.
  :- import_module list.
  :- import_module maybe.
-:- import_module string.

  %---------------------------------------------------------------------------%

@@ -193,13 +192,10 @@

  :- import_module mdb.util.

-:- import_module assoc_list.
  :- import_module bool.
  :- import_module char.
  :- import_module int.
-:- import_module list.
-:- import_module map.
-:- import_module pair.
+:- import_module string.

  :- type token
      --->    (.)
Index: browser/sized_pretty.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/browser/sized_pretty.m,v
retrieving revision 1.16
diff -u -r1.16 sized_pretty.m
--- browser/sized_pretty.m	29 Mar 2006 08:06:32 -0000	1.16
+++ browser/sized_pretty.m	1 Dec 2006 07:41:02 -0000
@@ -5,14 +5,14 @@
  % This file may only be copied under the terms of the GNU Library General
  % Public License - see the file COPYING.LIB in the Mercury distribution.
  %---------------------------------------------------------------------------%
-
+%
  % File: sized_pretty.m:
  % Author: sthur.
-
+%
  % When printing a term during debugging this module allows the user to put
  % a limit on the size of the term displayed. This limit is specified by
  % setting the number of lines you want and the width of these lines.
-
+%
  % How to use sized_pretty.m :
  % ---------------------------
  %
@@ -165,8 +165,6 @@
  :- import_module mdb.browser_info.
  :- import_module mdb.browser_term.

-:- import_module int.
-:- import_module string.
  :- import_module univ.

  %---------------------------------------------------------------------------%
@@ -190,15 +188,15 @@

  :- implementation.

-:- import_module assoc_list.
  :- import_module bool.
  :- import_module deconstruct.
+:- import_module int.
  :- import_module list.
  :- import_module maybe.
  :- import_module pair.
  :- import_module pprint.
-:- import_module require.
  :- import_module std_util.
+:- import_module string.

  %---------------------------------------------------------------------------%

Index: browser/term_rep.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/browser/term_rep.m,v
retrieving revision 1.10
diff -u -r1.10 term_rep.m
--- browser/term_rep.m	6 Jun 2006 02:27:16 -0000	1.10
+++ browser/term_rep.m	1 Dec 2006 07:41:14 -0000
@@ -63,7 +63,6 @@
  :- import_module int.
  :- import_module list.
  :- import_module maybe.
-:- import_module string.
  :- import_module type_desc.

  %-----------------------------------------------------------------------------%
Index: browser/util.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/browser/util.m,v
retrieving revision 1.32
diff -u -r1.32 util.m
--- browser/util.m	6 Jun 2006 02:27:16 -0000	1.32
+++ browser/util.m	1 Dec 2006 07:41:31 -0000
@@ -14,7 +14,6 @@
  :- import_module bool.
  :- import_module io.
  :- import_module list.
-:- import_module string.

  %---------------------------------------------------------------------------%

@@ -59,7 +58,6 @@

  :- implementation.

-:- import_module int.
  :- import_module require.

  is_predicate(predicate) = yes.
Index: compiler/Mercury.options
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/Mercury.options,v
retrieving revision 1.25
diff -u -r1.25 Mercury.options
--- compiler/Mercury.options	18 Sep 2006 05:09:22 -0000	1.25
+++ compiler/Mercury.options	1 Dec 2006 14:49:37 -0000
@@ -31,6 +31,17 @@
  MCFLAGS-make.module_target = --no-ansi-c
  MCFLAGS-make.program_target = --no-ansi-c

+MCFLAGS-hlds = --no-warn-unused-imports
+MCFLAGS-ll_backend = --no-warn-unused-imports
+MCFLAGS-make = --no-warn-unused-imports
+MCFLAGS-ml_backend = --no-warn-unused-imports
+MCFLAGS-parse_tree = --no-warn-unused-imports
+MCFLAGS-recompilation = --no-warn-unused-imports
+MCFLAGS-top_level = --no-warn-unused-imports
+MCFLAGS-transform_hlds = --no-warn-unused-imports
+MCFLAGS-transform_hlds.ctgc.structure_reuse = --no-warn-unused-imports
+MCFLAGS-transform_hlds.ctgc.structure_sharing = --no-warn-unused-imports
+
  # Bug workarounds

  # This is the same bug as tests/valid/ho_and_type_spec_bug
Index: compiler/accumulator.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/accumulator.m,v
retrieving revision 1.64
diff -u -r1.64 accumulator.m
--- compiler/accumulator.m	15 Oct 2006 23:26:34 -0000	1.64
+++ compiler/accumulator.m	1 Dec 2006 12:57:08 -0000
@@ -159,7 +159,6 @@

  :- implementation.

-:- import_module check_hlds.inst_match.
  :- import_module hlds.assertion.
  :- import_module hlds.goal_util.
  :- import_module hlds.hlds_data.
@@ -184,7 +183,6 @@
  :- import_module int.
  :- import_module list.
  :- import_module map.
-:- import_module multi_map.
  :- import_module pair.
  :- import_module set.
  :- import_module solutions.
Index: compiler/add_class.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/add_class.m,v
retrieving revision 1.23
diff -u -r1.23 add_class.m
--- compiler/add_class.m	22 Oct 2006 09:14:23 -0000	1.23
+++ compiler/add_class.m	1 Dec 2006 10:16:59 -0000
@@ -61,7 +61,6 @@
  :- import_module hlds.make_hlds.state_var.
  :- import_module hlds.pred_table.
  :- import_module libs.compiler_util.
-:- import_module parse_tree.prog_out.
  :- import_module parse_tree.prog_type.
  :- import_module parse_tree.prog_type_subst.
  :- import_module parse_tree.prog_util.
@@ -69,7 +68,6 @@
  :- import_module bool.
  :- import_module int.
  :- import_module map.
-:- import_module multi_map.
  :- import_module pair.
  :- import_module set.
  :- import_module solutions.
Index: compiler/add_clause.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/add_clause.m,v
retrieving revision 1.38
diff -u -r1.38 add_clause.m
--- compiler/add_clause.m	6 Nov 2006 07:55:06 -0000	1.38
+++ compiler/add_clause.m	1 Dec 2006 10:17:32 -0000
@@ -66,7 +66,6 @@
  :- import_module hlds.make_hlds.add_pragma.
  :- import_module hlds.make_hlds.add_pred.
  :- import_module hlds.make_hlds.field_access.
-:- import_module hlds.make_hlds.make_hlds_error.
  :- import_module hlds.make_hlds.make_hlds_warn.
  :- import_module hlds.make_hlds.superhomogeneous.
  :- import_module hlds.pred_table.
@@ -88,7 +87,6 @@
  :- import_module pair.
  :- import_module set.
  :- import_module string.
-:- import_module term_io.
  :- 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.31
diff -u -r1.31 add_heap_ops.m
--- compiler/add_heap_ops.m	2 Oct 2006 05:21:08 -0000	1.31
+++ compiler/add_heap_ops.m	1 Dec 2006 13:52:47 -0000
@@ -46,17 +46,13 @@
  :- import_module hlds.code_model.
  :- import_module hlds.goal_form.
  :- import_module hlds.goal_util.
-:- import_module hlds.hlds_data.
  :- import_module hlds.hlds_goal.
-:- 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.modules.
  :- import_module parse_tree.prog_data.
  :- import_module parse_tree.prog_type.
-:- import_module parse_tree.prog_util.

  :- import_module assoc_list.
  :- import_module bool.
@@ -64,8 +60,6 @@
  :- import_module map.
  :- import_module maybe.
  :- import_module pair.
-:- import_module set.
-:- import_module string.
  :- 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.12
diff -u -r1.12 add_mode.m
--- compiler/add_mode.m	10 Sep 2006 23:38:58 -0000	1.12
+++ compiler/add_mode.m	1 Dec 2006 10:19:22 -0000
@@ -46,8 +46,6 @@
  :- import_module parse_tree.prog_mode.

  :- import_module map.
-:- import_module pair.
-:- import_module string.

  %----------------------------------------------------------------------------%

Index: compiler/add_pragma.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/add_pragma.m,v
retrieving revision 1.53
diff -u -r1.53 add_pragma.m
--- compiler/add_pragma.m	6 Nov 2006 07:55:06 -0000	1.53
+++ compiler/add_pragma.m	1 Dec 2006 10:19:39 -0000
@@ -125,7 +125,6 @@

  :- implementation.

-:- import_module analysis.
  :- import_module backend_libs.
  :- import_module backend_libs.foreign.
  :- import_module backend_libs.rtti.
Index: compiler/add_pred.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/add_pred.m,v
retrieving revision 1.25
diff -u -r1.25 add_pred.m
--- compiler/add_pred.m	12 Sep 2006 04:41:38 -0000	1.25
+++ compiler/add_pred.m	1 Dec 2006 10:19:58 -0000
@@ -75,12 +75,10 @@

  :- import_module hlds.hlds_data.
  :- import_module hlds.hlds_goal.
-:- import_module hlds.hlds_out.
  :- 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.prog_mode.
  :- import_module parse_tree.prog_out.
Index: compiler/add_solver.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/add_solver.m,v
retrieving revision 1.18
diff -u -r1.18 add_solver.m
--- compiler/add_solver.m	10 Sep 2006 23:38:58 -0000	1.18
+++ compiler/add_solver.m	1 Dec 2006 10:20:16 -0000
@@ -61,7 +61,6 @@
  :- import_module libs.globals.
  :- import_module parse_tree.prog_mode.
  :- import_module parse_tree.prog_type.
-:- import_module parse_tree.prog_util.

  :- import_module bool.
  :- import_module map.
Index: compiler/add_trail_ops.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/add_trail_ops.m,v
retrieving revision 1.43
diff -u -r1.43 add_trail_ops.m
--- compiler/add_trail_ops.m	2 Oct 2006 05:21:08 -0000	1.43
+++ compiler/add_trail_ops.m	1 Dec 2006 13:53:35 -0000
@@ -71,27 +71,21 @@
  :- import_module hlds.code_model.
  :- import_module hlds.goal_form.
  :- import_module hlds.goal_util.
-:- import_module hlds.hlds_data.
  :- import_module hlds.hlds_goal.
-:- 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.modules.
  :- import_module parse_tree.prog_data.
  :- import_module parse_tree.prog_mode.
  :- import_module parse_tree.prog_type.
-:- import_module parse_tree.prog_util.

  :- import_module assoc_list.
  :- import_module list.
  :- import_module map.
  :- import_module maybe.
  :- import_module pair.
-:- import_module set.
-:- import_module string.
  :- 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.23
diff -u -r1.23 add_type.m
--- compiler/add_type.m	3 Nov 2006 08:31:06 -0000	1.23
+++ compiler/add_type.m	1 Dec 2006 13:45:38 -0000
@@ -56,7 +56,6 @@

  :- import_module backend_libs.
  :- import_module backend_libs.foreign.
-:- import_module check_hlds.type_util.
  :- import_module hlds.make_hlds.add_special_pred.
  :- import_module hlds.make_hlds.make_hlds_error.
  :- import_module hlds.make_hlds.make_hlds_passes.
@@ -68,14 +67,11 @@
  :- import_module libs.options.
  :- import_module parse_tree.module_qual.
  :- import_module parse_tree.prog_type.
-:- import_module parse_tree.prog_out.
  :- import_module parse_tree.prog_util.

-:- import_module assoc_list.
  :- import_module int.
  :- import_module map.
  :- import_module multi_map.
-:- import_module pair.
  :- import_module string.
  :- import_module svmap.
  :- import_module term.
Index: compiler/assertion.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/assertion.m,v
retrieving revision 1.54
diff -u -r1.54 assertion.m
--- compiler/assertion.m	7 Sep 2006 05:50:52 -0000	1.54
+++ compiler/assertion.m	1 Dec 2006 08:12:07 -0000
@@ -132,22 +132,17 @@

  :- implementation.

-:- import_module check_hlds.type_util.
  :- import_module hlds.goal_util.
  :- import_module hlds.hlds_clauses.
  :- import_module libs.compiler_util.
-:- import_module mdbcomp.prim_data.
-:- import_module parse_tree.prog_type.
  :- import_module parse_tree.prog_util.

  :- import_module assoc_list.
-:- import_module bool.
  :- import_module list.
  :- import_module map.
  :- import_module maybe.
  :- import_module set.
  :- import_module solutions.
-:- import_module string.

  :- type subst == map(prog_var, prog_var).

Index: compiler/atsort.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/atsort.m,v
retrieving revision 1.19
diff -u -r1.19 atsort.m
--- compiler/atsort.m	1 Oct 2006 04:57:29 -0000	1.19
+++ compiler/atsort.m	1 Dec 2006 10:25:48 -0000
@@ -49,8 +49,6 @@

  :- import_module libs.compiler_util.

-:- import_module string.
-
  % :- pred main1(list(list(int))).
  % :- mode main1(out) is det.
  % 
Index: compiler/basic_block.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/basic_block.m,v
retrieving revision 1.29
diff -u -r1.29 basic_block.m
--- compiler/basic_block.m	15 Oct 2006 23:26:34 -0000	1.29
+++ compiler/basic_block.m	1 Dec 2006 10:38:57 -0000
@@ -102,7 +102,6 @@
  :- import_module libs.compiler_util.
  :- import_module ll_backend.opt_util.

-:- import_module int.
  :- import_module pair.
  :- import_module svmap.
  :- import_module svset.
Index: compiler/call_gen.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/call_gen.m,v
retrieving revision 1.185
diff -u -r1.185 call_gen.m
--- compiler/call_gen.m	24 Nov 2006 03:47:59 -0000	1.185
+++ compiler/call_gen.m	1 Dec 2006 10:39:27 -0000
@@ -64,12 +64,7 @@
  :- implementation.

  :- import_module backend_libs.builtin_ops.
-:- import_module check_hlds.mode_util.
-:- import_module check_hlds.polymorphism.
-:- import_module check_hlds.type_util.
-:- import_module check_hlds.unify_proc.
  :- import_module hlds.arg_info.
-:- import_module hlds.hlds_data.
  :- import_module hlds.hlds_llds.
  :- import_module hlds.hlds_module.
  :- import_module hlds.instmap.
@@ -83,11 +78,9 @@

  :- import_module bool.
  :- import_module int.
-:- import_module map.
  :- import_module pair.
  :- import_module set.
  :- import_module string.
-:- import_module varset.

  %---------------------------------------------------------------------------%
  %---------------------------------------------------------------------------%
Index: compiler/check_typeclass.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/check_typeclass.m,v
retrieving revision 1.108
diff -u -r1.108 check_typeclass.m
--- compiler/check_typeclass.m	6 Nov 2006 07:55:06 -0000	1.108
+++ compiler/check_typeclass.m	1 Dec 2006 08:06:21 -0000
@@ -7,7 +7,7 @@
  %---------------------------------------------------------------------------%
  %
  % File: check_typeclass.m.
-% Author: dgj, mark
+% Author: dgj, mark.
  %
  % This module checks conformance of instance declarations to the typeclass
  % declaration. It takes various steps to do this.
@@ -116,9 +116,7 @@
  :- import_module parse_tree.prog_type_subst.
  :- import_module parse_tree.prog_util.

-:- import_module assoc_list.
  :- import_module bool.
-:- import_module io.
  :- import_module map.
  :- import_module maybe.
  :- import_module multi_map.
Index: compiler/closure_analysis.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/closure_analysis.m,v
retrieving revision 1.12
diff -u -r1.12 closure_analysis.m
--- compiler/closure_analysis.m	31 Jul 2006 08:31:30 -0000	1.12
+++ compiler/closure_analysis.m	1 Dec 2006 12:57:23 -0000
@@ -47,8 +47,6 @@

  :- import_module assoc_list.
  :- import_module bool.
-:- import_module counter.
-:- import_module int.
  :- import_module list.
  :- import_module map.
  :- import_module maybe.
Index: compiler/code_gen.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/code_gen.m,v
retrieving revision 1.166
diff -u -r1.166 code_gen.m
--- compiler/code_gen.m	4 Oct 2006 07:14:46 -0000	1.166
+++ compiler/code_gen.m	1 Dec 2006 10:39:50 -0000
@@ -48,11 +48,9 @@
  :- import_module libs.globals.
  :- import_module libs.tree.
  :- import_module ll_backend.call_gen.
-:- import_module ll_backend.code_util.
  :- import_module ll_backend.commit_gen.
  :- import_module ll_backend.disj_gen.
  :- import_module ll_backend.ite_gen.
-:- import_module ll_backend.middle_rec.
  :- import_module ll_backend.par_conj_gen.
  :- import_module ll_backend.pragma_c_gen.
  :- import_module ll_backend.switch_gen.
Index: compiler/code_info.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/code_info.m,v
retrieving revision 1.334
diff -u -r1.334 code_info.m
--- compiler/code_info.m	24 Nov 2006 03:47:59 -0000	1.334
+++ compiler/code_info.m	1 Dec 2006 10:40:21 -0000
@@ -60,10 +60,8 @@
  :- implementation.

  :- import_module backend_libs.proc_label.
-:- import_module check_hlds.mode_util.
  :- import_module check_hlds.type_util.
  :- import_module hlds.arg_info.
-:- import_module hlds.goal_form.
  :- import_module hlds.hlds_code_util.
  :- import_module hlds.hlds_rtti.
  :- import_module libs.compiler_util.
@@ -71,13 +69,9 @@
  :- import_module libs.trace_params.
  :- import_module libs.tree.
  :- import_module ll_backend.code_util.
-:- import_module ll_backend.exprn_aux.
-:- import_module ll_backend.llds_out.
  :- import_module ll_backend.var_locn.
-:- import_module parse_tree.prog_out.
  :- import_module parse_tree.prog_type.

-:- import_module char.
  :- import_module int.
  :- import_module pair.
  :- import_module set.
Index: compiler/code_model.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/code_model.m,v
retrieving revision 1.13
diff -u -r1.13 code_model.m
--- compiler/code_model.m	31 Jul 2006 08:31:31 -0000	1.13
+++ compiler/code_model.m	1 Dec 2006 08:12:25 -0000
@@ -57,7 +57,6 @@
  :- implementation.

  :- import_module mdbcomp.program_representation.
-:- import_module int.

  determinism_to_code_model(detism_det,       model_det).
  determinism_to_code_model(detism_semi,      model_semi).
Index: compiler/code_util.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/code_util.m,v
retrieving revision 1.176
diff -u -r1.176 code_util.m
--- compiler/code_util.m	15 Oct 2006 23:26:36 -0000	1.176
+++ compiler/code_util.m	1 Dec 2006 13:48:27 -0000
@@ -96,18 +96,10 @@
  :- import_module backend_libs.proc_label.
  :- import_module backend_libs.rtti.
  :- import_module hlds.code_model.
-:- import_module hlds.goal_form.
-:- import_module hlds.special_pred.
  :- import_module libs.compiler_util.
-:- import_module libs.options.
-:- import_module parse_tree.prog_util.

-:- import_module char.
  :- import_module int.
-:- import_module set.
-:- import_module string.
  :- import_module term.
-:- import_module varset.

  %---------------------------------------------------------------------------%

Index: compiler/commit_gen.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/commit_gen.m,v
retrieving revision 1.14
diff -u -r1.14 commit_gen.m
--- compiler/commit_gen.m	6 Nov 2006 07:55:07 -0000	1.14
+++ compiler/commit_gen.m	1 Dec 2006 10:41:33 -0000
@@ -31,16 +31,13 @@

  :- implementation.

-:- import_module backend_libs.builtin_ops.
  :- import_module libs.compiler_util.
  :- import_module libs.tree.
  :- import_module ll_backend.code_gen.
-:- import_module parse_tree.prog_data.

  :- import_module list.
  :- import_module maybe.
  :- import_module pair.
-:- import_module set.
  :- import_module string.

  %---------------------------------------------------------------------------%
Index: compiler/complexity.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/complexity.m,v
retrieving revision 1.25
diff -u -r1.25 complexity.m
--- compiler/complexity.m	2 Oct 2006 05:21:09 -0000	1.25
+++ compiler/complexity.m	1 Dec 2006 12:57:45 -0000
@@ -60,10 +60,8 @@

  :- import_module check_hlds.mode_util.
  :- import_module check_hlds.polymorphism.
-:- import_module check_hlds.type_util.
  :- import_module hlds.code_model.
  :- import_module hlds.goal_util.
-:- import_module hlds.hlds_data.
  :- import_module hlds.hlds_goal.
  :- import_module hlds.instmap.
  :- import_module hlds.pred_table.
@@ -76,7 +74,6 @@
  :- import_module parse_tree.prog_mode.
  :- import_module parse_tree.prog_out.
  :- import_module parse_tree.prog_type.
-:- import_module parse_tree.prog_util.
  :- import_module transform_hlds.term_norm.

  :- import_module assoc_list.
Index: compiler/const_prop.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/const_prop.m,v
retrieving revision 1.41
diff -u -r1.41 const_prop.m
--- compiler/const_prop.m	20 Aug 2006 08:20:56 -0000	1.41
+++ compiler/const_prop.m	1 Dec 2006 12:58:33 -0000
@@ -50,20 +50,8 @@

  :- implementation.

-:- import_module check_hlds.det_analysis.
-:- import_module check_hlds.inst_match.
-:- import_module check_hlds.mode_util.
-:- import_module check_hlds.modes.
-:- import_module check_hlds.type_util.
-:- import_module hlds.goal_util.
-:- import_module hlds.hlds_data.
  :- import_module hlds.hlds_goal.
-:- import_module hlds.hlds_out.
  :- import_module hlds.instmap.
-:- import_module hlds.passes_aux.
-:- import_module hlds.quantification.
-:- import_module libs.globals.
-:- import_module libs.options.
  :- import_module mdbcomp.prim_data.
  :- import_module parse_tree.prog_data.

Index: compiler/constraint.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/constraint.m,v
retrieving revision 1.83
diff -u -r1.83 constraint.m
--- compiler/constraint.m	6 Nov 2006 07:55:07 -0000	1.83
+++ compiler/constraint.m	1 Dec 2006 12:59:10 -0000
@@ -52,12 +52,8 @@
  :- implementation.

  :- import_module check_hlds.inst_match.
-:- import_module check_hlds.mode_util.
-:- import_module check_hlds.purity.
  :- import_module hlds.goal_form.
  :- import_module hlds.goal_util.
-:- import_module hlds.hlds_data.
-:- import_module hlds.passes_aux.
  :- import_module libs.compiler_util.
  :- import_module libs.globals.
  :- import_module libs.options.
@@ -67,7 +63,6 @@
  :- import_module map.
  :- import_module pair.
  :- import_module set.
-:- import_module string.
  :- import_module term.
  :- import_module varset.

Index: compiler/ctgc.fixpoint_table.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/ctgc.fixpoint_table.m,v
retrieving revision 1.4
diff -u -r1.4 ctgc.fixpoint_table.m
--- compiler/ctgc.fixpoint_table.m	31 Jul 2006 08:31:33 -0000	1.4
+++ compiler/ctgc.fixpoint_table.m	1 Dec 2006 12:59:38 -0000
@@ -91,11 +91,9 @@

  :- import_module libs.compiler_util.

-:- import_module bool.
  :- import_module int.
  :- import_module list.
  :- import_module map.
-:- import_module require.
  :- import_module svmap.

  %-----------------------------------------------------------------------------%
Index: compiler/ctgc.selector.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/ctgc.selector.m,v
retrieving revision 1.6
diff -u -r1.6 ctgc.selector.m
--- compiler/ctgc.selector.m	31 Jul 2006 08:31:33 -0000	1.6
+++ compiler/ctgc.selector.m	1 Dec 2006 12:59:54 -0000
@@ -73,7 +73,6 @@
  :- 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 assoc_list.
  :- import_module map.
Index: compiler/ctgc.util.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/ctgc.util.m,v
retrieving revision 1.10
diff -u -r1.10 ctgc.util.m
--- compiler/ctgc.util.m	17 Oct 2006 19:02:20 -0000	1.10
+++ compiler/ctgc.util.m	1 Dec 2006 13:37:56 -0000
@@ -51,17 +51,17 @@
      list(mer_type), tvarset) = tsubst.

  %-----------------------------------------------------------------------------%
+%-----------------------------------------------------------------------------%

  :- implementation.

-:- 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 string.
+
+%-----------------------------------------------------------------------------%

  pred_requires_no_analysis(ModuleInfo, PredId) :-
      module_info_get_special_pred_map(ModuleInfo, SpecialPredMap),
Index: compiler/dead_proc_elim.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/dead_proc_elim.m,v
retrieving revision 1.116
diff -u -r1.116 dead_proc_elim.m
--- compiler/dead_proc_elim.m	20 Aug 2006 08:20:56 -0000	1.116
+++ compiler/dead_proc_elim.m	1 Dec 2006 13:01:01 -0000
@@ -80,7 +80,6 @@
  :- import_module libs.options.
  :- import_module parse_tree.error_util.
  :- import_module parse_tree.prog_data.
-:- import_module parse_tree.prog_util.

  :- import_module bool.
  :- import_module int.
Index: compiler/deep_profiling.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/deep_profiling.m,v
retrieving revision 1.58
diff -u -r1.58 deep_profiling.m
--- compiler/deep_profiling.m	7 Nov 2006 03:41:48 -0000	1.58
+++ compiler/deep_profiling.m	1 Dec 2006 10:42:09 -0000
@@ -32,23 +32,17 @@

  :- import_module backend_libs.rtti.
  :- import_module check_hlds.mode_util.
-:- import_module check_hlds.type_util.
  :- import_module hlds.code_model.
-:- import_module hlds.hlds_data.
  :- import_module hlds.hlds_goal.
  :- import_module hlds.hlds_pred.
  :- 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 ll_backend.code_util.
-:- import_module ll_backend.trace_gen.
  :- import_module mdbcomp.prim_data.
  :- import_module parse_tree.prog_data.
  :- import_module parse_tree.prog_type.
-:- import_module parse_tree.prog_util.
  :- import_module transform_hlds.
  :- import_module transform_hlds.dependency_graph.

Index: compiler/deforest.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/deforest.m,v
retrieving revision 1.76
diff -u -r1.76 deforest.m
--- compiler/deforest.m	15 Oct 2006 23:26:38 -0000	1.76
+++ compiler/deforest.m	1 Dec 2006 13:01:36 -0000
@@ -51,16 +51,11 @@
  :- import_module check_hlds.det_analysis.
  :- import_module check_hlds.det_report.
  :- import_module check_hlds.inst_match.
-:- import_module check_hlds.mode_info.
  :- import_module check_hlds.mode_util.
  :- import_module check_hlds.modes.
-:- import_module check_hlds.purity.
  :- import_module check_hlds.simplify.
-:- import_module check_hlds.unique_modes.
  :- import_module hlds.goal_util.
-:- import_module hlds.hlds_data.
  :- import_module hlds.hlds_goal.
-:- import_module hlds.hlds_out.
  :- import_module hlds.hlds_pred.
  :- import_module hlds.instmap.
  :- import_module hlds.passes_aux.
@@ -71,7 +66,6 @@
  :- import_module mdbcomp.prim_data.
  :- import_module parse_tree.error_util.
  :- import_module parse_tree.prog_data.
-:- import_module parse_tree.prog_out.
  :- import_module parse_tree.prog_type_subst.
  :- import_module parse_tree.prog_util.
  :- import_module transform_hlds.dependency_graph.
Index: compiler/delay_construct.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/delay_construct.m,v
retrieving revision 1.22
diff -u -r1.22 delay_construct.m
--- compiler/delay_construct.m	31 Jul 2006 08:31:34 -0000	1.22
+++ compiler/delay_construct.m	1 Dec 2006 13:01:59 -0000
@@ -43,7 +43,6 @@
  :- implementation.

  :- import_module check_hlds.inst_match.
-:- import_module hlds.hlds_data.
  :- import_module hlds.hlds_goal.
  :- import_module hlds.hlds_rtti.
  :- import_module hlds.instmap.
Index: compiler/dense_switch.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/dense_switch.m,v
retrieving revision 1.64
diff -u -r1.64 dense_switch.m
--- compiler/dense_switch.m	15 Oct 2006 23:26:38 -0000	1.64
+++ compiler/dense_switch.m	1 Dec 2006 10:42:33 -0000
@@ -58,15 +58,12 @@
  :- import_module hlds.hlds_data.
  :- import_module hlds.hlds_goal.
  :- import_module hlds.hlds_llds.
-:- import_module hlds.hlds_module.
  :- import_module libs.tree.
  :- import_module ll_backend.code_gen.
  :- import_module ll_backend.trace_gen.

-:- import_module char.
  :- import_module int.
  :- import_module list.
-:- import_module map.
  :- import_module pair.

  %-----------------------------------------------------------------------------%
Index: compiler/dep_par_conj.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/dep_par_conj.m,v
retrieving revision 1.13
diff -u -r1.13 dep_par_conj.m
--- compiler/dep_par_conj.m	20 Oct 2006 02:06:29 -0000	1.13
+++ compiler/dep_par_conj.m	1 Dec 2006 13:02:19 -0000
@@ -94,7 +94,6 @@
  :- import_module parse_tree.prog_data.
  :- import_module parse_tree.prog_type.
  :- import_module parse_tree.prog_util.
-:- import_module transform_hlds.dependency_graph.

  :- import_module assoc_list.
  :- import_module bool.
@@ -107,7 +106,6 @@
  :- import_module std_util.
  :- import_module string.
  :- import_module svmap.
-:- import_module svset.
  :- import_module svvarset.
  :- import_module term.
  :- import_module varset.
Index: compiler/dependency_graph.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/dependency_graph.m,v
retrieving revision 1.91
diff -u -r1.91 dependency_graph.m
--- compiler/dependency_graph.m	3 Nov 2006 08:31:07 -0000	1.91
+++ compiler/dependency_graph.m	1 Dec 2006 13:03:35 -0000
@@ -115,20 +115,13 @@
  :- import_module backend_libs.
  :- import_module backend_libs.name_mangle.
  :- import_module backend_libs.proc_label.
-:- import_module check_hlds.mode_util.
-:- import_module hlds.goal_util.
  :- import_module hlds.hlds_clauses.
-:- import_module hlds.hlds_data.
  :- import_module hlds.hlds_goal.
-:- import_module libs.compiler_util.
-:- import_module libs.globals.
-:- import_module libs.options.
  :- import_module mdbcomp.prim_data.
  :- import_module parse_tree.mercury_to_mercury.
  :- import_module parse_tree.prog_data.

  :- import_module bool.
-:- import_module eqvclass.
  :- import_module int.
  :- import_module map.
  :- import_module maybe.
@@ -137,7 +130,6 @@
  :- import_module relation.
  :- import_module set.
  :- import_module std_util.
-:- import_module string.
  :- import_module term.
  :- import_module varset.

Index: compiler/det_report.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/det_report.m,v
retrieving revision 1.133
diff -u -r1.133 det_report.m
--- compiler/det_report.m	18 Nov 2006 00:06:50 -0000	1.133
+++ compiler/det_report.m	1 Dec 2006 08:06:53 -0000
@@ -141,7 +141,6 @@
  :- import_module mdbcomp.prim_data.
  :- import_module parse_tree.mercury_to_mercury.
  :- import_module parse_tree.prog_out.
-:- import_module parse_tree.prog_type.
  :- import_module parse_tree.prog_util.

  :- import_module assoc_list.
@@ -150,7 +149,6 @@
  :- import_module int.
  :- import_module map.
  :- import_module maybe.
-:- import_module set.
  :- import_module solutions.
  :- import_module string.
  :- import_module term.
Index: compiler/disj_gen.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/disj_gen.m,v
retrieving revision 1.98
diff -u -r1.98 disj_gen.m
--- compiler/disj_gen.m	15 Oct 2006 23:26:38 -0000	1.98
+++ compiler/disj_gen.m	1 Dec 2006 10:43:02 -0000
@@ -34,7 +34,6 @@
  :- implementation.

  :- import_module hlds.goal_form.
-:- import_module hlds.hlds_data.
  :- import_module hlds.hlds_llds.
  :- import_module libs.compiler_util.
  :- import_module libs.globals.
@@ -46,7 +45,6 @@
  :- import_module parse_tree.prog_data.

  :- import_module bool.
-:- import_module map.
  :- import_module maybe.
  :- import_module pair.
  :- import_module set.
Index: compiler/dupelim.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/dupelim.m,v
retrieving revision 1.86
diff -u -r1.86 dupelim.m
--- compiler/dupelim.m	1 Nov 2006 02:31:04 -0000	1.86
+++ compiler/dupelim.m	1 Dec 2006 10:43:19 -0000
@@ -65,7 +65,6 @@
  :- import_module ll_backend.basic_block.
  :- import_module ll_backend.opt_util.

-:- import_module assoc_list.
  :- import_module bool.
  :- import_module map.
  :- import_module maybe.
Index: compiler/equiv_type.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/equiv_type.m,v
retrieving revision 1.75
diff -u -r1.75 equiv_type.m
--- compiler/equiv_type.m	24 Nov 2006 03:48:01 -0000	1.75
+++ compiler/equiv_type.m	1 Dec 2006 12:44:04 -0000
@@ -113,7 +113,6 @@
  :- import_module libs.compiler_util.
  :- import_module parse_tree.prog_data.
  :- import_module parse_tree.prog_mode.
-:- import_module parse_tree.prog_out.
  :- import_module parse_tree.prog_util.
  :- import_module parse_tree.prog_type.
  :- import_module parse_tree.prog_type_subst.
Index: compiler/equiv_type_hlds.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/equiv_type_hlds.m,v
retrieving revision 1.38
diff -u -r1.38 equiv_type_hlds.m
--- compiler/equiv_type_hlds.m	20 Sep 2006 09:42:04 -0000	1.38
+++ compiler/equiv_type_hlds.m	1 Dec 2006 13:03:54 -0000
@@ -54,7 +54,6 @@
  :- import_module maybe.
  :- import_module pair.
  :- import_module set.
-:- import_module string.
  :- import_module svmap.
  :- import_module svset.
  :- import_module term.
Index: compiler/error_util.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/error_util.m,v
retrieving revision 1.58
diff -u -r1.58 error_util.m
--- compiler/error_util.m	1 Nov 2006 06:32:50 -0000	1.58
+++ compiler/error_util.m	1 Dec 2006 12:44:50 -0000
@@ -415,7 +415,6 @@

  :- import_module parse_tree.prog_out.
  :- import_module parse_tree.prog_type.
-:- import_module parse_tree.prog_util.
  :- import_module libs.compiler_util.

  :- import_module char.
Index: compiler/exception_analysis.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/exception_analysis.m,v
retrieving revision 1.33
diff -u -r1.33 exception_analysis.m
--- compiler/exception_analysis.m	5 Sep 2006 06:21:24 -0000	1.33
+++ compiler/exception_analysis.m	1 Dec 2006 14:15:27 -0000
@@ -128,13 +128,9 @@

  :- implementation.

-:- import_module check_hlds.mode_util.
  :- import_module check_hlds.type_util.
  :- import_module hlds.hlds_goal.
  :- import_module hlds.hlds_pred.
-:- import_module hlds.make_hlds.
-:- import_module hlds.passes_aux.
-:- import_module hlds.special_pred.
  :- import_module libs.compiler_util.
  :- import_module libs.globals.
  :- import_module libs.options.
@@ -143,7 +139,6 @@
  :- import_module parse_tree.modules.
  :- import_module parse_tree.prog_out.
  :- import_module parse_tree.prog_type.
-:- import_module parse_tree.prog_util.
  :- import_module transform_hlds.dependency_graph.
  :- import_module transform_hlds.mmc_analysis.

@@ -153,7 +148,6 @@
  :- import_module maybe.
  :- import_module pair.
  :- import_module set.
-:- 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.80
diff -u -r1.80 fact_table.m
--- compiler/fact_table.m	1 Nov 2006 06:32:51 -0000	1.80
+++ compiler/fact_table.m	1 Dec 2006 10:44:40 -0000
@@ -97,13 +97,10 @@
  :- import_module backend_libs.c_util.
  :- import_module backend_libs.export.
  :- import_module backend_libs.foreign.
-:- import_module backend_libs.name_mangle.
  :- import_module check_hlds.inst_match.
  :- import_module check_hlds.mode_util.
  :- import_module hlds.arg_info.
  :- import_module hlds.code_model.
-:- import_module hlds.hlds_data.
-:- import_module hlds.hlds_out.
  :- import_module hlds.passes_aux.
  :- import_module libs.compiler_util.
  :- import_module libs.globals.
@@ -114,7 +111,6 @@
  :- import_module parse_tree.error_util.
  :- import_module parse_tree.modules.
  :- import_module parse_tree.prog_foreign.
-:- import_module parse_tree.prog_io.
  :- import_module parse_tree.prog_out.
  :- import_module parse_tree.prog_util.

@@ -122,11 +118,9 @@
  :- import_module bool.
  :- import_module char.
  :- import_module float.
-:- import_module getopt_io.
  :- import_module int.
  :- import_module library.
  :- import_module map.
-:- import_module math.
  :- import_module maybe.
  :- import_module pair.
  :- import_module parser.
Index: compiler/follow_code.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/follow_code.m,v
retrieving revision 1.86
diff -u -r1.86 follow_code.m
--- compiler/follow_code.m	4 Aug 2006 10:51:17 -0000	1.86
+++ compiler/follow_code.m	1 Dec 2006 10:45:16 -0000
@@ -52,10 +52,8 @@

  :- implementation.

-:- import_module check_hlds.det_analysis.
  :- import_module check_hlds.mode_util.
  :- import_module hlds.goal_util.
-:- import_module hlds.hlds_data.
  :- import_module hlds.quantification.
  :- import_module libs.compiler_util.
  :- import_module libs.globals.
@@ -63,10 +61,7 @@
  :- import_module parse_tree.prog_data.

  :- import_module bool.
-:- import_module map.
  :- import_module pair.
-:- import_module set.
-:- import_module term.

  %-----------------------------------------------------------------------------%

Index: compiler/follow_vars.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/follow_vars.m,v
retrieving revision 1.85
diff -u -r1.85 follow_vars.m
--- compiler/follow_vars.m	31 Jul 2006 08:31:37 -0000	1.85
+++ compiler/follow_vars.m	1 Dec 2006 10:46:01 -0000
@@ -51,16 +51,10 @@

  :- implementation.

-:- import_module check_hlds.mode_util.
  :- import_module hlds.arg_info.
  :- import_module hlds.code_model.
-:- import_module hlds.hlds_data.
-:- import_module hlds.quantification.
  :- import_module libs.compiler_util.
-:- import_module libs.globals.
  :- import_module ll_backend.call_gen.
-:- import_module ll_backend.code_util.
-:- import_module ll_backend.llds.
  :- import_module parse_tree.prog_data.

  :- import_module assoc_list.
@@ -70,7 +64,6 @@
  :- import_module map.
  :- import_module maybe.
  :- import_module pair.
-:- import_module set.
  :- import_module svmap.

  %-----------------------------------------------------------------------------%
Index: compiler/frameopt.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/frameopt.m,v
retrieving revision 1.107
diff -u -r1.107 frameopt.m
--- compiler/frameopt.m	1 Nov 2006 02:31:05 -0000	1.107
+++ compiler/frameopt.m	1 Dec 2006 10:46:20 -0000
@@ -157,8 +157,6 @@

  :- import_module libs.compiler_util.
  :- import_module libs.options.
-:- import_module ll_backend.code_util.
-:- import_module ll_backend.livemap.
  :- import_module ll_backend.opt_debug.
  :- import_module ll_backend.opt_util.
  :- import_module parse_tree.prog_data.
Index: compiler/global_data.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/global_data.m,v
retrieving revision 1.27
diff -u -r1.27 global_data.m
--- compiler/global_data.m	1 Nov 2006 02:31:05 -0000	1.27
+++ compiler/global_data.m	1 Dec 2006 10:46:43 -0000
@@ -131,10 +131,8 @@

  :- implementation.

-:- import_module backend_libs.rtti.
  :- import_module libs.compiler_util.
  :- import_module ll_backend.layout.
-:- import_module ll_backend.llds_out.

  :- import_module bimap.
  :- import_module counter.
@@ -142,7 +140,6 @@
  :- import_module map.
  :- import_module pair.
  :- import_module require.
-:- import_module set.
  :- import_module svbimap.
  :- import_module svmap.

Index: compiler/goal_form.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/goal_form.m,v
retrieving revision 1.36
diff -u -r1.36 goal_form.m
--- compiler/goal_form.m	22 Aug 2006 05:03:45 -0000	1.36
+++ compiler/goal_form.m	1 Dec 2006 08:12:49 -0000
@@ -172,12 +172,10 @@

  :- implementation.

-:- import_module hlds.hlds_data.
  :- import_module libs.compiler_util.
  :- import_module parse_tree.prog_data.
  :- import_module transform_hlds.exception_analysis.
  :- import_module transform_hlds.term_constr_main.
-:- import_module transform_hlds.term_util.

  :- import_module bool.
  :- import_module int.
Index: compiler/goal_store.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/goal_store.m,v
retrieving revision 1.14
diff -u -r1.14 goal_store.m
--- compiler/goal_store.m	31 Jul 2006 08:31:38 -0000	1.14
+++ compiler/goal_store.m	1 Dec 2006 13:10:57 -0000
@@ -14,7 +14,6 @@
  % that are specific to hlds_goals.
  %
  %-----------------------------------------------------------------------------%
-%-----------------------------------------------------------------------------%

  :- module transform_hlds.goal_store.
  :- interface.
@@ -54,7 +53,6 @@

  :- import_module hlds.goal_util.

-:- import_module int.
  :- import_module list.
  :- import_module map.
  :- import_module solutions.
Index: compiler/goal_util.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/goal_util.m,v
retrieving revision 1.142
diff -u -r1.142 goal_util.m
--- compiler/goal_util.m	6 Nov 2006 07:55:08 -0000	1.142
+++ compiler/goal_util.m	1 Dec 2006 08:13:13 -0000
@@ -383,10 +383,8 @@
  :- implementation.

  :- import_module check_hlds.inst_match.
-:- import_module check_hlds.mode_util.
  :- import_module check_hlds.type_util.
  :- import_module hlds.goal_form.
-:- import_module hlds.hlds_data.
  :- import_module hlds.hlds_llds.
  :- import_module libs.compiler_util.
  :- import_module parse_tree.prog_data.
Index: compiler/granularity.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/granularity.m,v
retrieving revision 1.2
diff -u -r1.2 granularity.m
--- compiler/granularity.m	3 Nov 2006 08:36:56 -0000	1.2
+++ compiler/granularity.m	1 Dec 2006 13:11:16 -0000
@@ -28,7 +28,6 @@
  :- import_module hlds.goal_util.
  :- import_module hlds.hlds_pred.
  :- import_module hlds.hlds_goal.
-:- import_module hlds.instmap.
  :- import_module hlds.pred_table.
  :- import_module hlds.quantification.
  :- import_module libs.compiler_util.
Index: compiler/handle_options.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/handle_options.m,v
retrieving revision 1.284
diff -u -r1.284 handle_options.m
--- compiler/handle_options.m	30 Nov 2006 12:45:46 -0000	1.284
+++ compiler/handle_options.m	1 Dec 2006 10:27:48 -0000
@@ -83,7 +83,6 @@
  :- import_module libs.trace_params.
  :- import_module parse_tree.
  :- import_module parse_tree.error_util.
-:- import_module parse_tree.prog_io_util.

  :- import_module char.
  :- import_module dir.
Index: compiler/hhf.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/hhf.m,v
retrieving revision 1.26
diff -u -r1.26 hhf.m
--- compiler/hhf.m	1 Nov 2006 06:32:52 -0000	1.26
+++ compiler/hhf.m	1 Dec 2006 08:13:42 -0000
@@ -43,10 +43,8 @@
  :- implementation.

  :- import_module check_hlds.type_util.
-:- import_module hlds.hlds_data.
  :- import_module hlds.hlds_goal.
  :- import_module hlds.passes_aux.
-:- import_module hlds.quantification.
  :- import_module libs.compiler_util.
  :- import_module parse_tree.prog_data.
  :- import_module parse_tree.prog_type.
Index: compiler/higher_order.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/higher_order.m,v
retrieving revision 1.162
diff -u -r1.162 higher_order.m
--- compiler/higher_order.m	2 Oct 2006 05:21:10 -0000	1.162
+++ compiler/higher_order.m	1 Dec 2006 13:11:47 -0000
@@ -55,7 +55,6 @@
  :- import_module hlds.hlds_pred.
  :- import_module hlds.hlds_rtti.
  :- import_module hlds.instmap.
-:- import_module hlds.passes_aux.
  :- import_module hlds.pred_table.
  :- import_module hlds.quantification.
  :- import_module hlds.special_pred.
@@ -63,18 +62,15 @@
  :- import_module libs.globals.
  :- import_module libs.options.
  :- import_module mdbcomp.prim_data.
-:- import_module parse_tree.mercury_to_mercury.
  :- import_module parse_tree.prog_data.
  :- import_module parse_tree.prog_mode.
  :- import_module parse_tree.prog_out.
  :- import_module parse_tree.prog_type.
  :- import_module parse_tree.prog_type_subst.
-:- import_module parse_tree.prog_util.
  :- import_module transform_hlds.inlining.

  :- import_module assoc_list.
  :- import_module bool.
-:- import_module char.
  :- import_module counter.
  :- import_module int.
  :- import_module list.
Index: compiler/hlds_clauses.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/hlds_clauses.m,v
retrieving revision 1.5
diff -u -r1.5 hlds_clauses.m
--- compiler/hlds_clauses.m	4 Aug 2006 10:51:17 -0000	1.5
+++ compiler/hlds_clauses.m	1 Dec 2006 08:14:58 -0000
@@ -172,25 +172,15 @@

  :- implementation.

-:- import_module check_hlds.inst_match.
-:- 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.make_hlds.
-:- import_module libs.compiler_util.
-:- import_module libs.options.
-:- import_module parse_tree.prog_type.
-:- import_module parse_tree.prog_type_subst.
  :- import_module parse_tree.prog_util.

  :- import_module int.
  :- import_module map.
-:- import_module string.
-:- import_module svmap.
  :- import_module term.
  :- import_module varset.

+%-----------------------------------------------------------------------------%
+
  clauses_info_init(Arity, ClausesInfo) :-
      map.init(VarTypes),
      map.init(TVarNameMap),
Index: compiler/hlds_code_util.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/hlds_code_util.m,v
retrieving revision 1.32
diff -u -r1.32 hlds_code_util.m
--- compiler/hlds_code_util.m	4 Oct 2006 06:36:55 -0000	1.32
+++ compiler/hlds_code_util.m	1 Dec 2006 08:15:52 -0000
@@ -50,23 +50,18 @@
  :- implementation.

  :- import_module check_hlds.mode_util.
-:- import_module check_hlds.type_util.
  :- import_module hlds.hlds_pred.
  :- import_module libs.compiler_util.
  :- import_module libs.globals.
  :- import_module libs.options.
  :- import_module mdbcomp.prim_data.
-:- import_module parse_tree.prog_io.
-:- import_module parse_tree.prog_out.
  :- import_module parse_tree.prog_type.

  :- import_module bool.
  :- import_module char.
  :- import_module map.
-:- import_module pair.
  :- import_module set.
  :- import_module string.
-:- import_module term.

  %-----------------------------------------------------------------------------%

Index: compiler/hlds_data.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/hlds_data.m,v
retrieving revision 1.110
diff -u -r1.110 hlds_data.m
--- compiler/hlds_data.m	22 Oct 2006 09:14:24 -0000	1.110
+++ compiler/hlds_data.m	1 Dec 2006 08:16:37 -0000
@@ -5,14 +5,16 @@
  % This file may only be copied under the terms of the GNU General
  % Public License - see the file COPYING in the Mercury distribution.
  %-----------------------------------------------------------------------------%
-
+% 
+% File: hlds_data.m.
+% Main authors: fjh, conway.
+%
  % This module defines the part of the HLDS that deals with issues related
  % to data and its representation: function symbols, types, insts, modes.
-
-% Main authors: fjh, conway.
+% 
+%-----------------------------------------------------------------------------%

  :- module hlds.hlds_data.
-
  :- interface.

  :- import_module hlds.hlds_pred.
@@ -32,7 +34,6 @@

  :- 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 int.
Index: compiler/hlds_error_util.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/hlds_error_util.m,v
retrieving revision 1.24
diff -u -r1.24 hlds_error_util.m
--- compiler/hlds_error_util.m	2 Oct 2006 05:21:11 -0000	1.24
+++ compiler/hlds_error_util.m	1 Dec 2006 08:16:59 -0000
@@ -69,7 +69,6 @@

  :- implementation.

-:- import_module check_hlds.mode_util.
  :- import_module hlds.special_pred.
  :- import_module mdbcomp.prim_data.
  :- import_module libs.compiler_util.
Index: compiler/hlds_goal.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/hlds_goal.m,v
retrieving revision 1.170
diff -u -r1.170 hlds_goal.m
--- compiler/hlds_goal.m	6 Nov 2006 07:55:08 -0000	1.170
+++ compiler/hlds_goal.m	1 Dec 2006 10:12:30 -0000
@@ -1442,12 +1442,9 @@

  :- implementation.

-:- import_module check_hlds.mode_util.
-:- import_module check_hlds.type_util.
  :- import_module libs.compiler_util.
  :- import_module parse_tree.prog_mode.
  :- import_module parse_tree.prog_type.
-:- import_module parse_tree.prog_util.

  :- import_module assoc_list.
  :- import_module map.
Index: compiler/hlds_module.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/hlds_module.m,v
retrieving revision 1.145
diff -u -r1.145 hlds_module.m
--- compiler/hlds_module.m	24 Nov 2006 03:48:01 -0000	1.145
+++ compiler/hlds_module.m	1 Dec 2006 10:13:38 -0000
@@ -50,17 +50,11 @@

  :- implementation.

-:- import_module hlds.hlds_out.
  :- import_module transform_hlds.mmc_analysis.
  :- import_module parse_tree.modules.
-:- import_module parse_tree.prog_out.
-:- import_module parse_tree.prog_type.
-:- import_module parse_tree.prog_util.

  :- import_module int.
  :- import_module string.
-:- import_module svmap.
-:- import_module svmulti_map.

  %-----------------------------------------------------------------------------%

Index: compiler/hlds_out.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/hlds_out.m,v
retrieving revision 1.411
diff -u -r1.411 hlds_out.m
--- compiler/hlds_out.m	6 Nov 2006 07:55:08 -0000	1.411
+++ compiler/hlds_out.m	1 Dec 2006 10:14:08 -0000
@@ -260,7 +260,6 @@
  :- implementation.

  :- import_module check_hlds.mode_util.
-:- import_module check_hlds.type_util.
  :- import_module hlds.hlds_data.
  :- import_module hlds.hlds_llds.
  :- import_module hlds.hlds_rtti.
@@ -283,7 +282,6 @@
  :- import_module int.
  :- import_module map.
  :- import_module maybe.
-:- import_module multi_map.
  :- import_module pair.
  :- import_module set.
  :- import_module string.
Index: compiler/hlds_pred.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/hlds_pred.m,v
retrieving revision 1.212
diff -u -r1.212 hlds_pred.m
--- compiler/hlds_pred.m	1 Oct 2006 06:05:02 -0000	1.212
+++ compiler/hlds_pred.m	1 Dec 2006 10:14:50 -0000
@@ -52,17 +52,13 @@
  :- import_module hlds.goal_form.
  :- import_module hlds.goal_util.
  :- import_module hlds.hlds_rtti.
-:- import_module hlds.make_hlds.
  :- import_module libs.compiler_util.
  :- import_module libs.options.
  :- import_module parse_tree.prog_type.
-:- import_module parse_tree.prog_type_subst.
  :- import_module parse_tree.prog_util.

-% Standard library modules.
  :- import_module int.
  :- import_module string.
-:- import_module svmap.
  :- import_module term.
  :- import_module unit.
  :- import_module varset.
Index: compiler/hlds_rtti.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/hlds_rtti.m,v
retrieving revision 1.10
diff -u -r1.10 hlds_rtti.m
--- compiler/hlds_rtti.m	20 Sep 2006 09:42:05 -0000	1.10
+++ compiler/hlds_rtti.m	1 Dec 2006 13:44:49 -0000
@@ -13,7 +13,6 @@
  % relating to RTTI.
  %
  %-----------------------------------------------------------------------------%
-%-----------------------------------------------------------------------------%

  :- module hlds.hlds_rtti.
  :- interface.
@@ -28,6 +27,8 @@
  :- import_module map.
  :- import_module set.

+%-----------------------------------------------------------------------------%
+
  :- type prog_var_name == string.

      % The rtti_proc_label type holds all the information about a procedure
@@ -309,24 +310,15 @@

  :- implementation.

-:- import_module check_hlds.inst_match.
-:- 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.make_hlds.
  :- import_module libs.compiler_util.
-:- import_module libs.options.
  :- import_module parse_tree.prog_type.
  :- import_module parse_tree.prog_type_subst.
-:- import_module parse_tree.prog_util.

-:- import_module int.
  :- import_module solutions.
-:- import_module string.
  :- import_module svmap.
  :- import_module term.
-:- import_module varset.
+
+%-----------------------------------------------------------------------------%

  type_info_locn_var(type_info(Var), Var).
  type_info_locn_var(typeclass_info(Var, _), Var).
Index: compiler/il_peephole.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/il_peephole.m,v
retrieving revision 1.18
diff -u -r1.18 il_peephole.m
--- compiler/il_peephole.m	31 Jul 2006 08:31:41 -0000	1.18
+++ compiler/il_peephole.m	1 Dec 2006 12:12:11 -0000
@@ -61,7 +61,6 @@
  :- import_module assoc_list.
  :- import_module bool.
  :- import_module int.
-:- import_module map.
  :- import_module pair.
  :- import_module string.

Index: compiler/inlining.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/inlining.m,v
retrieving revision 1.147
diff -u -r1.147 inlining.m
--- compiler/inlining.m	13 Oct 2006 04:52:19 -0000	1.147
+++ compiler/inlining.m	1 Dec 2006 13:12:15 -0000
@@ -151,7 +151,6 @@
  :- import_module check_hlds.mode_util.
  :- import_module check_hlds.purity.
  :- import_module hlds.goal_util.
-:- import_module hlds.hlds_data.
  :- import_module hlds.passes_aux.
  :- import_module hlds.quantification.
  :- import_module libs.compiler_util.
@@ -166,10 +165,8 @@
  :- import_module transform_hlds.dead_proc_elim.
  :- import_module transform_hlds.dependency_graph.

-:- import_module assoc_list.
  :- import_module bool.
  :- import_module int.
-:- import_module io.
  :- import_module list.
  :- import_module maybe.
  :- import_module pair.
Index: compiler/inst_graph.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/inst_graph.m,v
retrieving revision 1.13
diff -u -r1.13 inst_graph.m
--- compiler/inst_graph.m	23 Nov 2006 04:03:42 -0000	1.13
+++ compiler/inst_graph.m	1 Dec 2006 10:16:08 -0000
@@ -185,7 +185,6 @@

  :- implementation.

-:- import_module hlds.hlds_data.
  :- import_module hlds.hlds_out.
  :- import_module libs.compiler_util.

Index: compiler/instmap.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/instmap.m,v
retrieving revision 1.52
diff -u -r1.52 instmap.m
--- compiler/instmap.m	9 Aug 2006 03:17:14 -0000	1.52
+++ compiler/instmap.m	1 Dec 2006 10:16:33 -0000
@@ -322,8 +322,6 @@
  :- import_module check_hlds.inst_util.
  :- import_module check_hlds.mode_util.
  :- import_module check_hlds.type_util.
-:- import_module hlds.goal_util.
-:- import_module hlds.hlds_data.
  :- import_module libs.compiler_util.
  :- import_module parse_tree.prog_data.

Index: compiler/intermod.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/intermod.m,v
retrieving revision 1.212
diff -u -r1.212 intermod.m
--- compiler/intermod.m	1 Nov 2006 06:32:54 -0000	1.212
+++ compiler/intermod.m	1 Dec 2006 13:12:41 -0000
@@ -103,8 +103,6 @@
  :- import_module hlds.hlds_goal.
  :- import_module hlds.hlds_out.
  :- import_module hlds.hlds_pred.
-:- import_module hlds.instmap.
-:- import_module hlds.passes_aux.
  :- import_module hlds.pred_table.
  :- import_module hlds.special_pred.
  :- import_module libs.compiler_util.
@@ -121,7 +119,6 @@
  :- import_module transform_hlds.inlining.

  :- import_module assoc_list.
-:- import_module dir.
  :- import_module getopt_io.
  :- import_module int.
  :- import_module list.
Index: compiler/java_util.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/java_util.m,v
retrieving revision 1.19
diff -u -r1.19 java_util.m
--- compiler/java_util.m	31 Jul 2006 08:31:44 -0000	1.19
+++ compiler/java_util.m	1 Dec 2006 12:12:37 -0000
@@ -20,8 +20,6 @@

  :- import_module backend_libs.builtin_ops.

-:- import_module string.
-
  %-----------------------------------------------------------------------------%

      % Succeeds iff the given string matches a reserved word in Java.
@@ -66,10 +64,6 @@

  :- implementation.

-:- import_module parse_tree.error_util.
-
-:- import_module list.
-
  %-----------------------------------------------------------------------------%

      % Tags are not used in the Java back-end, as such, all of the tagging
Index: compiler/jumpopt.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/jumpopt.m,v
retrieving revision 1.95
diff -u -r1.95 jumpopt.m
--- compiler/jumpopt.m	1 Nov 2006 02:31:06 -0000	1.95
+++ compiler/jumpopt.m	1 Dec 2006 10:47:01 -0000
@@ -67,7 +67,6 @@
  :- import_module ll_backend.code_util.
  :- import_module ll_backend.opt_util.

-:- import_module int.
  :- import_module map.
  :- import_module maybe.
  :- import_module pair.
Index: compiler/lambda.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/lambda.m,v
retrieving revision 1.122
diff -u -r1.122 lambda.m
--- compiler/lambda.m	20 Sep 2006 09:42:06 -0000	1.122
+++ compiler/lambda.m	1 Dec 2006 13:13:09 -0000
@@ -83,9 +83,7 @@

  :- implementation.

-:- import_module check_hlds.inst_match.
  :- import_module check_hlds.mode_util.
-:- import_module check_hlds.type_util.
  :- import_module hlds.code_model.
  :- import_module hlds.goal_util.
  :- import_module hlds.hlds_data.
@@ -107,7 +105,6 @@
  :- import_module map.
  :- import_module pair.
  :- import_module set.
-:- import_module string.
  :- 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.78
diff -u -r1.78 layout_out.m
--- compiler/layout_out.m	29 Nov 2006 05:18:09 -0000	1.78
+++ compiler/layout_out.m	1 Dec 2006 13:49:41 -0000
@@ -31,6 +31,8 @@
  :- import_module bool.
  :- import_module io.

+%-----------------------------------------------------------------------------%
+
      % Given a Mercury representation of a layout structure, output its
      % definition in the appropriate C global variable.
      %
@@ -97,22 +99,16 @@
  :- import_module backend_libs.c_util.
  :- import_module backend_libs.name_mangle.
  :- import_module backend_libs.proc_label.
-:- import_module backend_libs.rtti.
  :- import_module hlds.hlds_goal.
  :- import_module hlds.hlds_pred.
  :- import_module hlds.hlds_rtti.
  :- import_module hlds.special_pred.
  :- import_module libs.compiler_util.
-:- import_module libs.globals.
-:- import_module libs.options.
  :- import_module libs.trace_params.
-:- import_module ll_backend.code_util.
  :- import_module parse_tree.mercury_to_mercury.
  :- import_module parse_tree.prog_data.
  :- import_module parse_tree.prog_foreign.
-:- import_module parse_tree.prog_out.

-:- import_module char.
  :- import_module int.
  :- import_module list.
  :- import_module maybe.
Index: compiler/lco.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/lco.m,v
retrieving revision 1.42
diff -u -r1.42 lco.m
--- compiler/lco.m	22 Aug 2006 05:03:50 -0000	1.42
+++ compiler/lco.m	1 Dec 2006 13:13:24 -0000
@@ -116,7 +116,6 @@

  :- import_module check_hlds.inst_match.
  :- import_module check_hlds.mode_util.
-:- import_module check_hlds.type_util.
  :- import_module hlds.arg_info.
  :- import_module hlds.goal_util.
  :- import_module hlds.hlds_code_util.
Index: compiler/live_vars.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/live_vars.m,v
retrieving revision 1.127
diff -u -r1.127 live_vars.m
--- compiler/live_vars.m	15 Oct 2006 23:26:42 -0000	1.127
+++ compiler/live_vars.m	1 Dec 2006 13:50:17 -0000
@@ -22,19 +22,17 @@
  :- module ll_backend.live_vars.
  :- interface.

-% Parse tree modules
-:- import_module parse_tree.prog_data.
-
-% HLDS modules
  :- import_module hlds.hlds_goal.
  :- import_module hlds.hlds_llds.
  :- import_module hlds.hlds_module.
  :- import_module hlds.hlds_pred.
+:- import_module parse_tree.prog_data.

-% Standard library modules
  :- import_module bool.
  :- import_module set.

+%-----------------------------------------------------------------------------%
+
  :- type alloc_data
      --->    alloc_data(
                  module_info         ::  module_info,
@@ -62,25 +60,20 @@

  :- implementation.

-:- import_module check_hlds.mode_util.
  :- import_module hlds.arg_info.
  :- import_module hlds.code_model.
-:- import_module hlds.goal_util.
-:- import_module hlds.hlds_data.
  :- import_module hlds.hlds_goal.
  :- import_module hlds.hlds_llds.
  :- import_module hlds.hlds_rtti.
  :- import_module hlds.instmap.
  :- import_module libs.compiler_util.
-:- import_module ll_backend.liveness.
-:- import_module ll_backend.llds.

-:- import_module assoc_list.
-:- import_module int.
  :- import_module list.
  :- import_module map.
  :- import_module pair.

+%-----------------------------------------------------------------------------%
+
      % Information about which variables in a parallel conjunction need stack
      % slots.
      %
Index: compiler/liveness.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/liveness.m,v
retrieving revision 1.151
diff -u -r1.151 liveness.m
--- compiler/liveness.m	4 Sep 2006 01:47:30 -0000	1.151
+++ compiler/liveness.m	1 Dec 2006 10:50:31 -0000
@@ -184,29 +184,23 @@
  :- implementation.

  :- import_module check_hlds.mode_util.
-:- import_module check_hlds.polymorphism.
  :- import_module hlds.arg_info.
  :- import_module hlds.code_model.
  :- import_module hlds.goal_form.
-:- import_module hlds.hlds_data.
  :- import_module hlds.hlds_goal.
  :- import_module hlds.hlds_llds.
  :- import_module hlds.hlds_out.
  :- import_module hlds.hlds_rtti.
  :- 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 libs.trace_params.
-:- import_module ll_backend.llds.
  :- import_module ll_backend.trace_gen.
-:- import_module parse_tree.prog_util.

  :- import_module assoc_list.
  :- import_module bool.
-:- import_module int.
  :- import_module list.
  :- import_module map.
  :- import_module maybe.
Index: compiler/ll_pseudo_type_info.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/ll_pseudo_type_info.m,v
retrieving revision 1.21
diff -u -r1.21 ll_pseudo_type_info.m
--- compiler/ll_pseudo_type_info.m	22 Aug 2006 05:03:51 -0000	1.21
+++ compiler/ll_pseudo_type_info.m	1 Dec 2006 10:50:49 -0000
@@ -63,8 +63,6 @@
  :- import_module backend_libs.pseudo_type_info.
  :- import_module backend_libs.rtti.

-:- import_module bool.
-:- import_module int.
  :- import_module list.
  :- import_module maybe.

Index: compiler/llds_out.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/llds_out.m,v
retrieving revision 1.298
diff -u -r1.298 llds_out.m
--- compiler/llds_out.m	29 Nov 2006 05:18:09 -0000	1.298
+++ compiler/llds_out.m	1 Dec 2006 10:51:46 -0000
@@ -180,20 +180,15 @@
  :- implementation.

  :- import_module backend_libs.c_util.
-:- import_module backend_libs.compile_target_code.
  :- import_module backend_libs.export.
-:- import_module backend_libs.foreign.
  :- import_module backend_libs.name_mangle.
  :- import_module backend_libs.proc_label.
  :- import_module backend_libs.rtti.
-:- import_module check_hlds.type_util.
  :- import_module hlds.hlds_data.
  :- import_module hlds.hlds_pred.
-:- import_module hlds.passes_aux.
  :- import_module libs.compiler_util.
  :- import_module libs.options.
  :- import_module libs.trace_params.
-:- import_module ll_backend.exprn_aux.
  :- import_module ll_backend.layout.
  :- import_module ll_backend.layout_out.
  :- import_module ll_backend.pragma_c_gen.
@@ -202,12 +197,10 @@
  :- import_module parse_tree.modules.
  :- import_module parse_tree.prog_foreign.
  :- import_module parse_tree.prog_out.
-:- import_module parse_tree.prog_util.

  :- import_module assoc_list.
  :- import_module char.
  :- import_module deconstruct.
-:- import_module dir.
  :- import_module int.
  :- import_module library.   % for the version number.
  :- import_module maybe.
Index: compiler/lookup_switch.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/lookup_switch.m,v
retrieving revision 1.71
diff -u -r1.71 lookup_switch.m
--- compiler/lookup_switch.m	15 Oct 2006 23:26:44 -0000	1.71
+++ compiler/lookup_switch.m	1 Dec 2006 10:52:38 -0000
@@ -74,19 +74,15 @@
  :- implementation.

  :- import_module backend_libs.builtin_ops.
-:- import_module check_hlds.mode_util.
  :- import_module check_hlds.type_util.
  :- import_module hlds.goal_form.
  :- import_module hlds.hlds_data.
-:- import_module hlds.instmap.
  :- import_module libs.compiler_util.
  :- import_module libs.globals.
  :- import_module libs.options.
  :- import_module libs.tree.
-:- import_module ll_backend.code_gen.
  :- import_module ll_backend.continuation_info.
  :- import_module ll_backend.dense_switch.
-:- import_module ll_backend.exprn_aux.
  :- import_module ll_backend.global_data.
  :- import_module ll_backend.lookup_util.
  :- import_module parse_tree.prog_data.
@@ -99,9 +95,10 @@
  :- import_module maybe.
  :- import_module pair.
  :- import_module set.
-:- import_module solutions.
  :- import_module string.

+%-----------------------------------------------------------------------------%
+
  :- type case_consts
      --->    all_one_soln(
                  assoc_list(int, list(rval))
Index: compiler/loop_inv.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/loop_inv.m,v
retrieving revision 1.38
diff -u -r1.38 loop_inv.m
--- compiler/loop_inv.m	1 Oct 2006 04:57:30 -0000	1.38
+++ compiler/loop_inv.m	1 Dec 2006 13:13:46 -0000
@@ -120,9 +120,7 @@
  :- import_module check_hlds.inst_match.
  :- import_module check_hlds.inst_util.
  :- import_module check_hlds.mode_util.
-:- import_module check_hlds.purity.
  :- import_module hlds.code_model.
-:- import_module hlds.hlds_data.
  :- import_module hlds.hlds_goal.
  :- import_module hlds.instmap.
  :- import_module hlds.quantification.
Index: compiler/lp.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/lp.m,v
retrieving revision 1.17
diff -u -r1.17 lp.m
--- compiler/lp.m	31 Jul 2006 08:31:46 -0000	1.17
+++ compiler/lp.m	1 Dec 2006 10:29:05 -0000
@@ -34,7 +34,6 @@
  :- module libs.lp.
  :- interface.

-:- import_module float.
  :- import_module io.
  :- import_module list.
  :- import_module map.
@@ -86,6 +85,7 @@
  :- import_module libs.compiler_util.

  :- import_module bool.
+:- import_module float.
  :- import_module int.
  :- import_module maybe.
  :- import_module set.
@@ -97,19 +97,17 @@

  %-----------------------------------------------------------------------------%

-:- type lp_info --->
-    lp(
-        varset  :: varset,
-        urs_map :: map(var, pair(var)),
+:- 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
                              % form (x = x' - x'', x', x'' >= 0).
- 
-        slack_vars :: list(var),      % slack variables
- 
-        artificial_vars :: list(var)  % artificial variables
-    ).
+                slack_vars :: list(var),      % slack variables
+                artificial_vars :: list(var)  % artificial variables
+            ).

  %-----------------------------------------------------------------------------%

Index: compiler/lp_rational.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/lp_rational.m,v
retrieving revision 1.7
diff -u -r1.7 lp_rational.m
--- compiler/lp_rational.m	31 Jul 2006 08:31:46 -0000	1.7
+++ compiler/lp_rational.m	1 Dec 2006 10:35:40 -0000
@@ -326,7 +326,6 @@

  :- import_module assoc_list.
  :- import_module bool.
-:- import_module exception.
  :- import_module int.
  :- import_module solutions.
  :- import_module string.
Index: compiler/make.dependencies.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/make.dependencies.m,v
retrieving revision 1.34
diff -u -r1.34 make.dependencies.m
--- compiler/make.dependencies.m	23 Nov 2006 06:10:48 -0000	1.34
+++ compiler/make.dependencies.m	1 Dec 2006 14:33:49 -0000
@@ -115,9 +115,12 @@

  :- implementation.

+:- import_module parse_tree.prog_data.
  :- import_module transform_hlds.
  :- import_module transform_hlds.mmc_analysis.

+:- import_module assoc_list.
+:- import_module dir.
  :- import_module solutions.

  %-----------------------------------------------------------------------------%
Index: compiler/make.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/make.m,v
retrieving revision 1.42
diff -u -r1.42 make.m
--- compiler/make.m	23 Nov 2006 06:10:48 -0000	1.42
+++ compiler/make.m	1 Dec 2006 14:52:30 -0000
@@ -68,34 +68,18 @@

  :- import_module backend_libs.compile_target_code.
  :- import_module libs.globals.
-:- import_module libs.handle_options.
  :- import_module libs.options.
-:- import_module libs.process_util.
  :- import_module libs.timestamp.
-:- import_module parse_tree.error_util.
-:- import_module parse_tree.mercury_to_mercury.
-:- import_module parse_tree.prog_data.
-:- import_module parse_tree.prog_foreign.
-:- import_module parse_tree.prog_io_util.
-:- import_module parse_tree.prog_out.
  :- import_module top_level.mercury_compile. % XXX unwanted dependency

-:- import_module assoc_list.
  :- import_module bool.
-:- import_module char.
-:- import_module dir.
-:- import_module exception.
-:- import_module getopt_io.
  :- import_module int.
  :- import_module map.
  :- import_module maybe.
  :- import_module pair.
-:- import_module parser.
  :- import_module set.
  :- import_module solutions.
  :- import_module string.
-:- import_module term.
-:- import_module term_io.

  %-----------------------------------------------------------------------------%

Index: compiler/make.module_dep_file.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/make.module_dep_file.m,v
retrieving revision 1.27
diff -u -r1.27 make.module_dep_file.m
--- compiler/make.module_dep_file.m	27 Nov 2006 03:14:47 -0000	1.27
+++ compiler/make.module_dep_file.m	1 Dec 2006 14:50:10 -0000
@@ -39,7 +39,20 @@

  :- implementation.

+:- import_module libs.globals.
+:- import_module libs.process_util.
+:- import_module parse_tree.error_util.
+:- import_module parse_tree.mercury_to_mercury.
+:- import_module parse_tree.prog_data.
  :- import_module parse_tree.prog_item.
+:- import_module parse_tree.prog_out.
+
+:- import_module assoc_list.
+:- import_module dir.
+:- import_module getopt_io.
+:- import_module parser.
+:- import_module term.
+:- import_module term_io.

  %-----------------------------------------------------------------------------%

Index: compiler/make.module_target.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/make.module_target.m,v
retrieving revision 1.50
diff -u -r1.50 make.module_target.m
--- compiler/make.module_target.m	23 Nov 2006 06:10:48 -0000	1.50
+++ compiler/make.module_target.m	1 Dec 2006 14:50:41 -0000
@@ -72,9 +72,13 @@
  :- import_module analysis.
  :- import_module hlds.passes_aux.
  :- import_module libs.compiler_util.
+:- import_module libs.process_util.
+:- import_module parse_tree.prog_foreign.
  :- import_module transform_hlds.
  :- import_module transform_hlds.mmc_analysis.

+:- import_module dir.
+
  %-----------------------------------------------------------------------------%

  :- pred make_module_target(dependency_file::in, bool::in, bool::out,
@@ -513,7 +517,7 @@
  foreign_code_file(ModuleName, PIC, Lang, ForeignCodeFile, !IO) :-
      globals.io_get_globals(Globals, !IO),
      (
-        ForeignModName0 = foreign_language_module_name( ModuleName, Lang),
+        ForeignModName0 = foreign_language_module_name(ModuleName, Lang),
          SrcExt0 = foreign_language_file_extension(Lang)
      ->
          ForeignModName = ForeignModName0,
Index: compiler/make.program_target.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/make.program_target.m,v
retrieving revision 1.60
diff -u -r1.60 make.program_target.m
--- compiler/make.program_target.m	23 Nov 2006 06:10:48 -0000	1.60
+++ compiler/make.program_target.m	1 Dec 2006 14:51:21 -0000
@@ -42,11 +42,15 @@
  :- import_module analysis.
  :- import_module hlds.passes_aux.
  :- import_module libs.compiler_util.
+:- import_module libs.handle_options.
+:- import_module libs.process_util.
+:- import_module parse_tree.prog_foreign.
  :- import_module transform_hlds.
  :- import_module transform_hlds.mmc_analysis.

+:- import_module dir.
+:- import_module getopt_io.
  :- import_module relation.
-:- import_module svrelation.

  %-----------------------------------------------------------------------------%

Index: compiler/make.util.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/make.util.m,v
retrieving revision 1.40
diff -u -r1.40 make.util.m
--- compiler/make.util.m	23 Nov 2006 06:10:49 -0000	1.40
+++ compiler/make.util.m	1 Dec 2006 14:52:00 -0000
@@ -16,6 +16,8 @@
  :- module make.util.
  :- interface.

+:- import_module assoc_list.
+
  %-----------------------------------------------------------------------------%
  %
  % Versions of foldl which stop if the supplied predicate returns `no'
@@ -271,9 +273,14 @@

  :- import_module analysis.
  :- import_module libs.compiler_util.
+:- import_module libs.handle_options.
+:- import_module parse_tree.prog_foreign.
  :- import_module transform_hlds.
  :- import_module transform_hlds.mmc_analysis.

+:- import_module char.
+:- import_module dir.
+
  %-----------------------------------------------------------------------------%

  foldl2_maybe_stop_at_error(KeepGoing, MakeTarget, Targets, Success,
Index: compiler/make_hlds_error.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/make_hlds_error.m,v
retrieving revision 1.12
diff -u -r1.12 make_hlds_error.m
--- compiler/make_hlds_error.m	10 Sep 2006 23:39:01 -0000	1.12
+++ compiler/make_hlds_error.m	1 Dec 2006 10:21:09 -0000
@@ -66,13 +66,11 @@

  :- import_module check_hlds.mode_errors.
  :- import_module hlds.hlds_error_util.
-:- import_module hlds.hlds_out.
  :- import_module libs.options.
  :- import_module parse_tree.mercury_to_mercury.
  :- import_module parse_tree.prog_mode.
  :- import_module parse_tree.prog_out.

-:- import_module string.
  :- import_module varset.

  %-----------------------------------------------------------------------------%
Index: compiler/make_hlds_passes.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/make_hlds_passes.m,v
retrieving revision 1.59
diff -u -r1.59 make_hlds_passes.m
--- compiler/make_hlds_passes.m	1 Nov 2006 06:32:54 -0000	1.59
+++ compiler/make_hlds_passes.m	1 Dec 2006 10:21:45 -0000
@@ -124,7 +124,6 @@
  :- import_module parse_tree.prog_util.
  :- import_module recompilation.

-:- import_module int.
  :- import_module map.
  :- import_module pair.
  :- import_module set.
Index: compiler/make_hlds_warn.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/make_hlds_warn.m,v
retrieving revision 1.20
diff -u -r1.20 make_hlds_warn.m
--- compiler/make_hlds_warn.m	6 Nov 2006 07:55:09 -0000	1.20
+++ compiler/make_hlds_warn.m	1 Dec 2006 10:22:05 -0000
@@ -72,8 +72,6 @@

  :- import_module check_hlds.mode_util.
  :- import_module hlds.goal_util.
-:- import_module hlds.hlds_out.
-:- import_module libs.compiler_util.
  :- import_module libs.options.
  :- import_module parse_tree.mercury_to_mercury.
  :- import_module parse_tree.prog_out.
Index: compiler/mark_static_terms.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/mark_static_terms.m,v
retrieving revision 1.26
diff -u -r1.26 mark_static_terms.m
--- compiler/mark_static_terms.m	31 Jul 2006 08:31:48 -0000	1.26
+++ compiler/mark_static_terms.m	1 Dec 2006 12:13:04 -0000
@@ -35,13 +35,10 @@

  :- implementation.

-:- import_module hlds.hlds_data.
  :- import_module hlds.hlds_goal.
  :- import_module libs.compiler_util.
  :- import_module parse_tree.prog_data.

-:- import_module bool.
-:- import_module int.
  :- import_module list.
  :- import_module map.
  :- import_module pair.
Index: compiler/mercury_compile.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/mercury_compile.m,v
retrieving revision 1.415
diff -u -r1.415 mercury_compile.m
--- compiler/mercury_compile.m	24 Nov 2006 03:48:03 -0000	1.415
+++ compiler/mercury_compile.m	1 Dec 2006 12:56:45 -0000
@@ -106,7 +106,6 @@
  :- import_module ll_backend.follow_code.
  :- import_module ll_backend.global_data.
  :- import_module ll_backend.liveness.
-:- import_module ll_backend.live_vars.
  :- import_module ll_backend.llds_out.
  :- import_module ll_backend.optimize.
  :- import_module ll_backend.proc_gen.
@@ -143,7 +142,6 @@
  :- import_module check_hlds.unused_imports.
  :- import_module check_hlds.xml_documentation.
  :- import_module hlds.arg_info.
-:- import_module hlds.hlds_data.
  :- import_module hlds.hlds_module.
  :- import_module hlds.hlds_out.
  :- import_module hlds.hlds_pred.
@@ -159,7 +157,6 @@
  :- import_module parse_tree.mercury_to_mercury.
  :- import_module parse_tree.prog_data.
  :- import_module parse_tree.prog_item.
-:- import_module parse_tree.prog_util.
  :- import_module recompilation.
  :- import_module recompilation.check.
  :- import_module recompilation.usage.
@@ -174,7 +171,6 @@
  :- import_module backend_libs.compile_target_code.
  :- import_module backend_libs.export.
  :- import_module backend_libs.foreign.
-:- import_module backend_libs.name_mangle.
  :- import_module backend_libs.proc_label.
  :- import_module backend_libs.rtti.
  :- import_module backend_libs.type_class_info.
@@ -190,11 +186,9 @@
  :- import_module assoc_list.
  :- import_module benchmarking.
  :- import_module bool.
-:- import_module dir.
  :- import_module gc.
  :- import_module getopt_io.
  :- import_module int.
-:- import_module library.
  :- import_module list.
  :- import_module map.
  :- import_module maybe.
@@ -203,7 +197,6 @@
  :- import_module set.
  :- import_module string.
  :- import_module term.
-:- import_module varset.
  :- import_module unit.

  %-----------------------------------------------------------------------------%
Index: compiler/mercury_to_mercury.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/mercury_to_mercury.m,v
retrieving revision 1.308
diff -u -r1.308 mercury_to_mercury.m
--- compiler/mercury_to_mercury.m	6 Nov 2006 07:55:10 -0000	1.308
+++ compiler/mercury_to_mercury.m	1 Dec 2006 12:45:15 -0000
@@ -401,14 +401,12 @@
  :- import_module libs.globals.
  :- import_module libs.options.
  :- import_module libs.rat.
-:- import_module parse_tree.error_util.
  :- import_module parse_tree.prog_ctgc.
  :- import_module parse_tree.prog_io_util.
  :- import_module parse_tree.prog_out.
  :- import_module parse_tree.prog_util.
  :- import_module recompilation.version.

-:- import_module assoc_list.
  :- import_module int.
  :- import_module lexer.
  :- import_module map.
Index: compiler/middle_rec.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/middle_rec.m,v
retrieving revision 1.125
diff -u -r1.125 middle_rec.m
--- compiler/middle_rec.m	1 Nov 2006 02:31:08 -0000	1.125
+++ compiler/middle_rec.m	1 Dec 2006 10:53:28 -0000
@@ -32,10 +32,7 @@

  :- import_module backend_libs.builtin_ops.
  :- import_module hlds.code_model.
-:- import_module hlds.goal_form.
-:- import_module hlds.hlds_data.
  :- import_module hlds.hlds_llds.
-:- import_module hlds.hlds_module.
  :- import_module libs.compiler_util.
  :- import_module libs.tree.
  :- import_module ll_backend.code_gen.
@@ -45,7 +42,6 @@
  :- import_module ll_backend.proc_gen.
  :- import_module ll_backend.unify_gen.
  :- import_module parse_tree.prog_data.
-:- import_module parse_tree.prog_out.

  :- import_module assoc_list.
  :- import_module bool.
Index: compiler/ml_call_gen.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/ml_call_gen.m,v
retrieving revision 1.74
diff -u -r1.74 ml_call_gen.m
--- compiler/ml_call_gen.m	5 Sep 2006 06:21:27 -0000	1.74
+++ compiler/ml_call_gen.m	1 Dec 2006 12:14:00 -0000
@@ -122,7 +122,6 @@
  :- import_module backend_libs.builtin_ops.
  :- import_module check_hlds.mode_util.
  :- import_module check_hlds.type_util.
-:- import_module hlds.hlds_data.
  :- import_module hlds.hlds_module.
  :- import_module libs.compiler_util.
  :- import_module libs.globals.
@@ -135,10 +134,8 @@
  :- import_module int.
  :- import_module map.
  :- import_module maybe.
-:- import_module pair.
  :- import_module string.
  :- import_module term.
-:- import_module varset.

  %-----------------------------------------------------------------------------%
  %
Index: compiler/ml_code_gen.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/ml_code_gen.m,v
retrieving revision 1.190
diff -u -r1.190 ml_code_gen.m
--- compiler/ml_code_gen.m	5 Oct 2006 04:45:33 -0000	1.190
+++ compiler/ml_code_gen.m	1 Dec 2006 12:14:52 -0000
@@ -764,7 +764,6 @@

  :- import_module backend_libs.builtin_ops.
  :- import_module backend_libs.c_util.
-:- import_module backend_libs.export.
  :- import_module backend_libs.foreign. % XXX needed for pragma foreign code
  :- import_module backend_libs.rtti.
  :- import_module check_hlds.mode_util.
@@ -784,19 +783,14 @@
  :- import_module ml_backend.ml_type_gen.
  :- import_module ml_backend.ml_unify_gen.
  :- import_module ml_backend.ml_util.
-:- import_module parse_tree.modules.
  :- import_module parse_tree.prog_foreign.
  :- import_module parse_tree.prog_type.
-:- import_module parse_tree.prog_util.

-:- 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 solutions.
  :- 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.118
diff -u -r1.118 ml_code_util.m
--- compiler/ml_code_util.m	2 Oct 2006 05:21:14 -0000	1.118
+++ compiler/ml_code_util.m	1 Dec 2006 12:16:19 -0000
@@ -28,7 +28,6 @@
  :- import_module parse_tree.prog_data.

  :- import_module bool.
-:- import_module int.
  :- import_module list.
  :- import_module map.
  :- import_module maybe.
@@ -747,7 +746,6 @@
  :- import_module check_hlds.type_util.
  :- import_module hlds.hlds_goal.
  :- import_module hlds.instmap.
-:- import_module hlds.special_pred.
  :- import_module libs.compiler_util.
  :- import_module libs.globals.
  :- import_module libs.options.
@@ -755,11 +753,11 @@
  :- import_module ml_backend.ml_call_gen.
  :- import_module ml_backend.ml_code_gen.
  :- import_module parse_tree.prog_data.
-:- import_module parse_tree.prog_io.
  :- import_module parse_tree.prog_type.
  :- import_module parse_tree.prog_util.

  :- import_module counter.
+:- import_module int.
  :- import_module pair.
  :- import_module stack.
  :- import_module string.
Index: compiler/ml_elim_nested.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/ml_elim_nested.m,v
retrieving revision 1.86
diff -u -r1.86 ml_elim_nested.m
--- compiler/ml_elim_nested.m	2 Oct 2006 05:21:15 -0000	1.86
+++ compiler/ml_elim_nested.m	1 Dec 2006 12:17:11 -0000
@@ -437,20 +437,14 @@

  :- implementation.

-:- import_module check_hlds.type_util.
  :- import_module hlds.hlds_data.
+:- import_module hlds.hlds_pred.
  :- import_module libs.compiler_util.
  :- import_module libs.globals.
  :- import_module libs.options.
+:- import_module mdbcomp.prim_data.
  :- import_module ml_backend.ml_code_util.
  :- import_module ml_backend.ml_util.
-:- import_module parse_tree.prog_util.
-
-% The following imports are needed for mangling pred names.
-:- import_module hlds.hlds_pred.
-:- import_module mdbcomp.prim_data.
-:- import_module parse_tree.prog_data.
-:- import_module parse_tree.prog_out.

  :- import_module bool.
  :- import_module counter.
Index: compiler/ml_optimize.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/ml_optimize.m,v
retrieving revision 1.45
diff -u -r1.45 ml_optimize.m
--- compiler/ml_optimize.m	2 Oct 2006 05:21:15 -0000	1.45
+++ compiler/ml_optimize.m	1 Dec 2006 12:17:35 -0000
@@ -45,15 +45,12 @@

  :- implementation.

-:- import_module backend_libs.builtin_ops.
  :- import_module libs.compiler_util.
  :- import_module libs.globals.
  :- import_module libs.options.
  :- import_module mdbcomp.prim_data.
  :- import_module ml_backend.ml_code_util.
  :- import_module ml_backend.ml_util.
-:- import_module parse_tree.prog_data.
-:- import_module parse_tree.prog_util.

  :- import_module bool.
  :- import_module int.
Index: compiler/ml_string_switch.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/ml_string_switch.m,v
retrieving revision 1.28
diff -u -r1.28 ml_string_switch.m
--- compiler/ml_string_switch.m	22 Aug 2006 05:03:55 -0000	1.28
+++ compiler/ml_string_switch.m	1 Dec 2006 12:18:17 -0000
@@ -36,17 +36,11 @@
  :- implementation.

  :- import_module backend_libs.builtin_ops.
-:- import_module check_hlds.type_util.
  :- import_module hlds.hlds_data.
  :- import_module libs.compiler_util.
-:- import_module libs.globals.
-:- import_module libs.options.
  :- import_module ml_backend.ml_code_gen.
  :- import_module ml_backend.ml_simplify_switch.
-:- import_module ml_backend.ml_switch_gen.
-:- import_module parse_tree.error_util.

-:- import_module assoc_list.
  :- import_module bool.
  :- import_module int.
  :- import_module list.
Index: compiler/ml_switch_gen.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/ml_switch_gen.m,v
retrieving revision 1.27
diff -u -r1.27 ml_switch_gen.m
--- compiler/ml_switch_gen.m	22 Aug 2006 05:03:55 -0000	1.27
+++ compiler/ml_switch_gen.m	1 Dec 2006 12:18:50 -0000
@@ -107,7 +107,6 @@
  :- import_module hlds.hlds_data.
  :- import_module libs.compiler_util.
  :- import_module libs.options.
-:- import_module libs.tree.
  :- import_module ml_backend.ml_code_gen.
  :- import_module ml_backend.ml_code_util.
  :- import_module ml_backend.ml_simplify_switch.
@@ -117,10 +116,8 @@

  :- import_module bool.
  :- import_module int.
-:- import_module map.
  :- import_module maybe.
  :- import_module pair.
-:- import_module string.

  %-----------------------------------------------------------------------------%

Index: compiler/ml_tag_switch.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/ml_tag_switch.m,v
retrieving revision 1.20
diff -u -r1.20 ml_tag_switch.m
--- compiler/ml_tag_switch.m	22 Aug 2006 05:03:55 -0000	1.20
+++ compiler/ml_tag_switch.m	1 Dec 2006 12:19:22 -0000
@@ -40,10 +40,7 @@

  :- import_module backend_libs.builtin_ops.
  :- import_module backend_libs.rtti.
-:- import_module check_hlds.type_util.
  :- import_module hlds.hlds_data.
-:- import_module hlds.hlds_goal.
-:- import_module hlds.hlds_module.
  :- import_module libs.compiler_util.
  :- import_module ml_backend.ml_code_gen.
  :- import_module ml_backend.ml_simplify_switch.
@@ -54,7 +51,6 @@
  :- import_module int.
  :- import_module map.
  :- import_module pair.
-:- import_module string.

  %-----------------------------------------------------------------------------%

Index: compiler/ml_tailcall.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/ml_tailcall.m,v
retrieving revision 1.43
diff -u -r1.43 ml_tailcall.m
--- compiler/ml_tailcall.m	13 Oct 2006 04:52:21 -0000	1.43
+++ compiler/ml_tailcall.m	1 Dec 2006 12:22:26 -0000
@@ -77,20 +77,17 @@

  :- implementation.

-:- import_module hlds.hlds_out.
  :- import_module hlds.hlds_pred.
  :- import_module mdbcomp.prim_data.
  :- import_module ml_backend.ml_util.
  :- import_module parse_tree.error_util.
  :- import_module parse_tree.prog_data.
-:- import_module parse_tree.prog_out.

  :- import_module int.
  :- import_module list.
  :- import_module maybe.
  :- import_module pair.
  :- import_module solutions.
-:- import_module string.

  %-----------------------------------------------------------------------------%

Index: compiler/ml_type_gen.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/ml_type_gen.m,v
retrieving revision 1.61
diff -u -r1.61 ml_type_gen.m
--- compiler/ml_type_gen.m	1 Nov 2006 06:32:58 -0000	1.61
+++ compiler/ml_type_gen.m	1 Dec 2006 12:22:55 -0000
@@ -81,7 +81,6 @@
  :- implementation.

  :- import_module check_hlds.polymorphism.
-:- import_module check_hlds.type_util.
  :- import_module hlds.hlds_pred.
  :- import_module libs.compiler_util.
  :- import_module libs.globals.
@@ -98,9 +97,7 @@
  :- import_module list.
  :- import_module map.
  :- import_module maybe.
-:- import_module pair.
  :- 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.108
diff -u -r1.108 ml_unify_gen.m
--- compiler/ml_unify_gen.m	1 Nov 2006 06:32:58 -0000	1.108
+++ compiler/ml_unify_gen.m	1 Dec 2006 12:23:14 -0000
@@ -109,11 +109,9 @@
  :- import_module parse_tree.prog_type.
  :- import_module parse_tree.prog_util.

-:- import_module assoc_list.
  :- import_module int.
  :- import_module map.
  :- import_module pair.
-:- import_module set.
  :- import_module string.
  :- import_module term.
  :- import_module varset.
Index: compiler/ml_util.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/ml_util.m,v
retrieving revision 1.53
diff -u -r1.53 ml_util.m
--- compiler/ml_util.m	4 Oct 2006 07:14:47 -0000	1.53
+++ compiler/ml_util.m	1 Dec 2006 12:23:33 -0000
@@ -195,12 +195,9 @@
  :- implementation.

  :- import_module backend_libs.rtti.
-:- import_module check_hlds.type_util.
  :- import_module mdbcomp.prim_data.
  :- import_module ml_backend.ml_unify_gen.
-:- import_module parse_tree.prog_io.
  :- import_module parse_tree.prog_type.
-:- import_module parse_tree.prog_util.

  :- import_module bool.
  :- import_module list.
Index: compiler/mlds.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/mlds.m,v
retrieving revision 1.142
diff -u -r1.142 mlds.m
--- compiler/mlds.m	4 Oct 2006 07:14:48 -0000	1.142
+++ compiler/mlds.m	1 Dec 2006 12:23:51 -0000
@@ -1716,7 +1716,6 @@
  :- import_module hlds.hlds_data.
  :- import_module libs.compiler_util.
  :- import_module libs.globals.
-:- import_module parse_tree.modules.
  :- import_module parse_tree.prog_type.

  :- import_module char.
Index: compiler/mlds_to_c.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/mlds_to_c.m,v
retrieving revision 1.203
diff -u -r1.203 mlds_to_c.m
--- compiler/mlds_to_c.m	14 Nov 2006 04:10:22 -0000	1.203
+++ compiler/mlds_to_c.m	1 Dec 2006 12:24:36 -0000
@@ -78,7 +78,6 @@
  :- import_module backend_libs.c_util.
  :- import_module backend_libs.foreign.
  :- import_module backend_libs.name_mangle.
-:- import_module check_hlds.type_util.
  :- import_module hlds.code_model.
  :- import_module hlds.hlds_data.
  :- import_module hlds.hlds_pred.         % for pred_proc_id.
@@ -93,14 +92,12 @@
                                           % handles derived classes
  :- import_module ml_backend.ml_type_gen. % for ml_gen_type_name
  :- import_module ml_backend.ml_util.
-:- import_module ml_backend.rtti_to_mlds.% for mlds_rtti_type_name.
  :- import_module parse_tree.modules.
  :- import_module parse_tree.prog_data.
  :- import_module parse_tree.prog_foreign.
  :- import_module parse_tree.prog_out.
  :- import_module parse_tree.prog_type.

-:- import_module assoc_list.
  :- import_module bool.
  :- import_module int.
  :- import_module library.
Index: compiler/mlds_to_gcc.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/mlds_to_gcc.m,v
retrieving revision 1.124
diff -u -r1.124 mlds_to_gcc.m
--- compiler/mlds_to_gcc.m	4 Oct 2006 07:14:48 -0000	1.124
+++ compiler/mlds_to_gcc.m	1 Dec 2006 12:43:11 -0000
@@ -3,10 +3,10 @@
  % This file may only be copied under the terms of the GNU General
  % Public License - see the file COPYING in the Mercury distribution.
  %-----------------------------------------------------------------------------%
-
+%
  % mlds_to_gcc - Convert MLDS to the GCC back-end representation.
  % Main author: fjh.
-
+%
  % Note that this does *not* compile to GNU C -- instead it
  % actually generates GCC's internal "Tree" representation,
  % and then invokes the GCC back-end to compile it to assembler,
@@ -32,9 +32,9 @@
  % Trailing will probably work too, but since trailing
  % is currently implemented using the C interface,
  % it will end up compiling everything via C.
-
+%
  % See also gcc/mercury/README.
-
+%
  % TODO:
  %	Fix configuration issues:
  %	- document installation procedure better
@@ -85,7 +85,7 @@
  %	- improve symbol table handling
  %
  %	See also the TODO list in ml_code_gen.m.
-
+%
  %-----------------------------------------------------------------------------%

  :- module mlds_to_gcc.
@@ -149,20 +149,14 @@
  :- use_module gcc.

  :- import_module backend_libs.
-:- import_module check_hlds.
  :- import_module hlds.
  :- import_module libs.
  :- import_module parse_tree.

-% XXX some of these imports might be unused
-
  :- import_module backend_libs.builtin_ops.
-:- import_module backend_libs.name_mangle.
-:- import_module backend_libs.pseudo_type_info.
  :- 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 hlds.passes_aux.
  :- import_module libs.compiler_util.
  :- import_module libs.globals.
  :- import_module libs.options.
@@ -177,11 +171,8 @@
  :- import_module parse_tree.prog_foreign.
  :- import_module parse_tree.prog_out.
  :- import_module parse_tree.prog_type.
-:- import_module parse_tree.prog_util.

-:- import_module assoc_list.
  :- import_module int.
-:- import_module library.
  :- import_module list.
  :- import_module map.
  :- import_module maybe.
Index: compiler/mlds_to_il.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/mlds_to_il.m,v
retrieving revision 1.173
diff -u -r1.173 mlds_to_il.m
--- compiler/mlds_to_il.m	23 Oct 2006 11:38:42 -0000	1.173
+++ compiler/mlds_to_il.m	1 Dec 2006 12:25:39 -0000
@@ -149,26 +149,18 @@
  :- implementation.

  :- import_module backend_libs.builtin_ops.
-:- import_module backend_libs.c_util.
  :- import_module backend_libs.foreign.
-:- import_module backend_libs.name_mangle.
-:- import_module backend_libs.pseudo_type_info.
  :- import_module backend_libs.rtti.
-:- import_module check_hlds.type_util.
  :- import_module hlds.code_model.
-:- import_module hlds.passes_aux.
  :- import_module libs.compiler_util.
  :- import_module libs.options.
  :- import_module libs.tree.
  :- import_module mdbcomp.prim_data.
-:- import_module ml_backend.il_peephole.
  :- import_module ml_backend.ml_code_util.
  :- import_module ml_backend.ml_type_gen.
  :- import_module ml_backend.ml_util.
  :- import_module parse_tree.error_util.
-:- import_module parse_tree.modules.
  :- import_module parse_tree.prog_data.
-:- import_module parse_tree.prog_out.
  :- import_module parse_tree.prog_type.
  :- import_module parse_tree.prog_util.

@@ -176,7 +168,6 @@
  :- import_module counter.
  :- import_module deconstruct.
  :- import_module int.
-:- import_module library.
  :- import_module map.
  :- import_module pair.
  :- import_module string.
Index: compiler/mlds_to_ilasm.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/mlds_to_ilasm.m,v
retrieving revision 1.35
diff -u -r1.35 mlds_to_ilasm.m
--- compiler/mlds_to_ilasm.m	31 Jul 2006 08:31:53 -0000	1.35
+++ compiler/mlds_to_ilasm.m	1 Dec 2006 12:27:04 -0000
@@ -33,40 +33,22 @@

  :- implementation.

-:- import_module backend_libs.builtin_ops.
-:- import_module backend_libs.c_util.
-:- import_module backend_libs.foreign.
-:- import_module backend_libs.rtti.
-:- import_module check_hlds.type_util.
-:- import_module hlds.hlds_pred. % for `pred_proc_id'.
  :- import_module hlds.passes_aux.
  :- import_module libs.compiler_util.
  :- import_module libs.globals.
  :- import_module libs.options.
-:- import_module libs.tree.
  :- import_module ml_backend.ilasm.
-:- import_module ml_backend.ilds.
  :- import_module ml_backend.il_peephole.
-:- import_module ml_backend.ml_code_util.
  :- import_module ml_backend.mlds_to_il.
  :- import_module ml_backend.mlds_to_managed.
-:- import_module ml_backend.ml_util.
  :- import_module parse_tree.modules.
-:- import_module parse_tree.prog_data.
  :- import_module parse_tree.prog_foreign.
-:- import_module parse_tree.prog_out.

-:- import_module assoc_list.
  :- import_module bool.
-:- import_module counter.
-:- import_module int.
-:- import_module library.
  :- import_module list.
-:- import_module map.
  :- import_module maybe.
  :- import_module set.
  :- import_module string.
-:- import_module term.

  %-----------------------------------------------------------------------------%

Index: compiler/mlds_to_java.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/mlds_to_java.m,v
retrieving revision 1.86
diff -u -r1.86 mlds_to_java.m
--- compiler/mlds_to_java.m	4 Oct 2006 07:14:48 -0000	1.86
+++ compiler/mlds_to_java.m	1 Dec 2006 13:54:59 -0000
@@ -103,9 +103,6 @@
      %     c_util.make_float_literal.
  :- import_module backend_libs.builtin_ops.
  :- import_module backend_libs.c_util.
-:- import_module backend_libs.export.      % for export.type_to_type_string
-:- import_module backend_libs.foreign.
-:- import_module backend_libs.name_mangle.
  :- import_module backend_libs.rtti.
  :- import_module check_hlds.type_util.
  :- import_module hlds.hlds_pred.           % for pred_proc_id.
@@ -118,19 +115,15 @@
  :- import_module ml_backend.ml_code_util.  % for ml_gen_local_var_decl_flags.
  :- import_module ml_backend.ml_type_gen.   % for ml_gen_type_name
  :- import_module ml_backend.ml_util.
-:- import_module ml_backend.rtti_to_mlds.  % for mlds_rtti_type_name.
-:- import_module parse_tree.error_util.
  :- import_module parse_tree.modules.       % for mercury_std_library_name.
  :- import_module parse_tree.prog_data.
  :- import_module parse_tree.prog_foreign.
-:- import_module parse_tree.prog_io.
  :- import_module parse_tree.prog_out.
  :- import_module parse_tree.prog_type.
  :- import_module parse_tree.prog_util.

  :- import_module assoc_list.
  :- import_module bool.
-:- import_module char.
  :- import_module int.
  :- import_module library.
  :- import_module list.
Index: compiler/mlds_to_managed.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/mlds_to_managed.m,v
retrieving revision 1.36
diff -u -r1.36 mlds_to_managed.m
--- compiler/mlds_to_managed.m	2 Oct 2006 05:21:17 -0000	1.36
+++ compiler/mlds_to_managed.m	1 Dec 2006 12:29:23 -0000
@@ -44,21 +44,11 @@

  :- implementation.

-:- import_module backend_libs.builtin_ops.
  :- import_module backend_libs.c_util.
-:- import_module backend_libs.foreign.
-:- import_module backend_libs.rtti.
-:- import_module check_hlds.type_util.
-:- import_module hlds.hlds_pred. % for `pred_proc_id'.
-:- import_module hlds.passes_aux.
  :- import_module libs.compiler_util.
  :- import_module libs.options.
-:- import_module libs.tree.
  :- import_module mdbcomp.prim_data.
-:- import_module ml_backend.ilasm.
  :- import_module ml_backend.ilds.
-:- import_module ml_backend.il_peephole.
-:- import_module ml_backend.ml_code_util.
  :- import_module ml_backend.mlds_to_il.
  :- import_module ml_backend.ml_util.
  :- import_module parse_tree.modules.
@@ -66,11 +56,8 @@
  :- import_module parse_tree.prog_foreign.
  :- import_module parse_tree.prog_out.

-:- import_module assoc_list.
  :- import_module bool.
-:- import_module counter.
  :- import_module deconstruct.
-:- import_module int.
  :- import_module library.
  :- import_module list.
  :- import_module map.
Index: compiler/mmc_analysis.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/mmc_analysis.m,v
retrieving revision 1.20
diff -u -r1.20 mmc_analysis.m
--- compiler/mmc_analysis.m	2 Oct 2006 05:21:18 -0000	1.20
+++ compiler/mmc_analysis.m	1 Dec 2006 13:14:03 -0000
@@ -49,7 +49,6 @@
  :- import_module parse_tree.modules.
  :- import_module parse_tree.prog_io.
  :- import_module parse_tree.prog_out.
-:- import_module parse_tree.prog_util.
  :- import_module transform_hlds.exception_analysis.
  :- import_module transform_hlds.tabling_analysis.
  :- import_module transform_hlds.trailing_analysis.
@@ -58,7 +57,6 @@
  :- import_module bool.
  :- import_module list.
  :- import_module maybe.
-:- import_module pair.
  :- import_module string.
  :- import_module io.
  :- import_module unit.
Index: compiler/mode_robdd.equiv_vars.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/mode_robdd.equiv_vars.m,v
retrieving revision 1.6
diff -u -r1.6 mode_robdd.equiv_vars.m
--- compiler/mode_robdd.equiv_vars.m	31 Jul 2006 08:31:55 -0000	1.6
+++ compiler/mode_robdd.equiv_vars.m	1 Dec 2006 12:43:27 -0000
@@ -69,7 +69,6 @@

  :- implementation.

-:- import_module assoc_list.
  :- import_module list.
  :- import_module map.
  :- import_module pair.
Index: compiler/mode_robdd.implications.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/mode_robdd.implications.m,v
retrieving revision 1.6
diff -u -r1.6 mode_robdd.implications.m
--- compiler/mode_robdd.implications.m	31 Jul 2006 08:31:55 -0000	1.6
+++ compiler/mode_robdd.implications.m	1 Dec 2006 12:43:47 -0000
@@ -69,7 +69,6 @@
  :- import_module list.
  :- import_module map.
  :- import_module pair.
-:- import_module require.
  :- import_module sparse_bitset.
  :- import_module term.

Index: compiler/module_qual.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/module_qual.m,v
retrieving revision 1.152
diff -u -r1.152 module_qual.m
--- compiler/module_qual.m	24 Nov 2006 03:48:05 -0000	1.152
+++ compiler/module_qual.m	1 Dec 2006 12:45:46 -0000
@@ -130,23 +130,18 @@

  :- import_module libs.compiler_util.
  :- import_module libs.options.
-:- import_module parse_tree.mercury_to_mercury.
  :- import_module parse_tree.modules.
  :- import_module parse_tree.prog_io.
  :- import_module parse_tree.prog_out.
-:- import_module parse_tree.prog_type.
  :- import_module parse_tree.prog_util.

  :- import_module assoc_list.
-:- import_module int.
  :- import_module map.
  :- import_module pair.
  :- import_module set.
  :- import_module solutions.
-:- import_module string.
  :- import_module svmap.
  :- import_module term.
-:- import_module varset.

  %-----------------------------------------------------------------------------%

Index: compiler/modules.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/modules.m,v
retrieving revision 1.414
diff -u -r1.414 modules.m
--- compiler/modules.m	30 Nov 2006 12:45:47 -0000	1.414
+++ compiler/modules.m	1 Dec 2006 12:46:09 -0000
@@ -792,8 +792,6 @@
  :- import_module parse_tree.mercury_to_mercury.
  :- import_module parse_tree.module_qual.
  :- import_module parse_tree.prog_foreign.
-:- import_module parse_tree.prog_io_util.
-:- import_module parse_tree.prog_mode.
  :- import_module parse_tree.prog_mutable.
  :- import_module parse_tree.prog_out.
  :- import_module parse_tree.prog_type.
Index: compiler/opt_debug.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/opt_debug.m,v
retrieving revision 1.181
diff -u -r1.181 opt_debug.m
--- compiler/opt_debug.m	24 Nov 2006 03:48:06 -0000	1.181
+++ compiler/opt_debug.m	1 Dec 2006 10:54:49 -0000
@@ -5,11 +5,12 @@
  % This file may only be copied under the terms of the GNU General
  % Public License - see the file COPYING in the Mercury distribution.
  %-----------------------------------------------------------------------------%
-
-% Debugging support for LLDS to LLDS peephole optimization.
-
+%
+% File: opt_debug.m.
  % Main author: zs.
-
+%
+% Debugging support for LLDS to LLDS peephole optimization.
+%
  %-----------------------------------------------------------------------------%

  :- module ll_backend.opt_debug.
@@ -119,23 +120,19 @@
  :- func dump_fullinstrs(proc_label, bool, list(instruction)) = string.

  %-----------------------------------------------------------------------------%
+%-----------------------------------------------------------------------------%

  :- implementation.

-:- import_module backend_libs.name_mangle.
  :- import_module backend_libs.proc_label.
  :- import_module hlds.hlds_data.
-:- import_module hlds.hlds_pred.
  :- import_module hlds.hlds_rtti.
  :- import_module hlds.special_pred.
  :- import_module libs.globals.
  :- import_module libs.options.
-:- import_module ll_backend.code_util.
  :- import_module ll_backend.llds_out.
-:- import_module ll_backend.opt_util.
  :- import_module parse_tree.prog_data.
  :- import_module parse_tree.prog_foreign.
-:- import_module parse_tree.prog_out.

  :- import_module char.
  :- import_module int.
Index: compiler/opt_util.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/opt_util.m,v
retrieving revision 1.157
diff -u -r1.157 opt_util.m
--- compiler/opt_util.m	14 Nov 2006 21:35:50 -0000	1.157
+++ compiler/opt_util.m	1 Dec 2006 10:55:31 -0000
@@ -5,12 +5,12 @@
  % This file may only be copied under the terms of the GNU General
  % Public License - see the file COPYING in the Mercury distribution.
  %-----------------------------------------------------------------------------%
-
+%
  % File: opt_util.m.
  % Main author: zs.
-
+%
  % Utilities for LLDS to LLDS optimization.
-
+%
  %-----------------------------------------------------------------------------%

  :- module ll_backend.opt_util.
@@ -309,12 +309,9 @@
  :- implementation.

  :- import_module backend_libs.builtin_ops.
-:- import_module backend_libs.proc_label.
-:- import_module hlds.hlds_pred.
  :- import_module hlds.special_pred.
  :- import_module libs.compiler_util.
  :- import_module ll_backend.exprn_aux.
-:- import_module ll_backend.llds_out.
  :- import_module parse_tree.prog_data.

  :- import_module int.
Index: compiler/optimize.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/optimize.m,v
retrieving revision 1.58
diff -u -r1.58 optimize.m
--- compiler/optimize.m	15 Oct 2006 23:26:48 -0000	1.58
+++ compiler/optimize.m	1 Dec 2006 10:57:11 -0000
@@ -5,12 +5,12 @@
  % This file may only be copied under the terms of the GNU General
  % Public License - see the file COPYING in the Mercury distribution.
  %-----------------------------------------------------------------------------%
-
+%
  % File: optimize.m.
  % Main author: zs.
-
+%
  % This module contains LLDS to LLDS optimizations.
-
+%
  %-----------------------------------------------------------------------------%

  :- module ll_backend.optimize.
@@ -35,11 +35,8 @@

  :- implementation.

-:- import_module backend_libs.name_mangle.
-:- import_module backend_libs.proc_label.
  :- import_module hlds.code_model.
  :- import_module hlds.hlds_pred.
-:- import_module hlds.passes_aux.
  :- import_module libs.compiler_util.
  :- import_module libs.globals.
  :- import_module libs.options.
@@ -50,7 +47,6 @@
  :- import_module ll_backend.jumpopt.
  :- import_module ll_backend.labelopt.
  :- import_module ll_backend.stdlabel.
-:- import_module ll_backend.llds_out.
  :- import_module ll_backend.opt_debug.
  :- import_module ll_backend.opt_util.
  :- import_module ll_backend.peephole.
@@ -58,7 +54,6 @@
  :- import_module ll_backend.use_local_vars.
  :- import_module ll_backend.wrap_blocks.
  :- import_module mdbcomp.prim_data.
-:- import_module parse_tree.prog_foreign.
  :- import_module parse_tree.prog_out.

  :- import_module bool.
Index: compiler/options.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/options.m,v
retrieving revision 1.539
diff -u -r1.539 options.m
--- compiler/options.m	30 Nov 2006 12:45:47 -0000	1.539
+++ compiler/options.m	1 Dec 2006 10:35:54 -0000
@@ -813,7 +813,6 @@
  :- import_module libs.compiler_util.
  :- import_module libs.handle_options.

-:- import_module assoc_list.
  :- import_module bool.
  :- import_module dir.
  :- import_module int.
Index: compiler/options_file.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/options_file.m,v
retrieving revision 1.40
diff -u -r1.40 options_file.m
--- compiler/options_file.m	23 Nov 2006 04:03:43 -0000	1.40
+++ compiler/options_file.m	1 Dec 2006 14:44:06 -0000
@@ -81,7 +81,6 @@
  :- import_module libs.options.
  :- import_module parse_tree.error_util.
  :- import_module parse_tree.prog_io.
-:- import_module parse_tree.prog_out.

  :- import_module assoc_list.
  :- import_module bool.
Index: compiler/par_conj_gen.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/par_conj_gen.m,v
retrieving revision 1.29
diff -u -r1.29 par_conj_gen.m
--- compiler/par_conj_gen.m	26 Sep 2006 03:53:13 -0000	1.29
+++ compiler/par_conj_gen.m	1 Dec 2006 10:57:56 -0000
@@ -106,7 +106,6 @@
  :- implementation.

  :- import_module check_hlds.mode_util.
-:- import_module check_hlds.type_util.
  :- import_module hlds.hlds_data.
  :- import_module hlds.hlds_llds.
  :- import_module hlds.hlds_module.
@@ -117,7 +116,6 @@
  :- import_module libs.tree.
  :- import_module ll_backend.code_gen.
  :- import_module ll_backend.code_info.
-:- import_module ll_backend.code_util.
  :- import_module ll_backend.continuation_info.
  :- import_module ll_backend.exprn_aux.
  :- import_module parse_tree.prog_data.
@@ -129,7 +127,6 @@
  :- import_module maybe.
  :- import_module pair.
  :- import_module set.
-:- import_module string.
  :- import_module unit.

  %---------------------------------------------------------------------------%
Index: compiler/passes_aux.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/passes_aux.m,v
retrieving revision 1.86
diff -u -r1.86 passes_aux.m
--- compiler/passes_aux.m	24 Nov 2006 03:48:08 -0000	1.86
+++ compiler/passes_aux.m	1 Dec 2006 10:23:57 -0000
@@ -5,13 +5,13 @@
  % This file may only be copied under the terms of the GNU General
  % Public License - see the file COPYING in the Mercury distribution.
  %-----------------------------------------------------------------------------%
-
+%
  % File: passes_aux.m.
  % Author: zs
-
+%
  % This file contains auxiliary routines for the passes of the front and back
  % ends of the compiler.
-
+%
  %-----------------------------------------------------------------------------%

  :- module hlds.passes_aux.
@@ -216,7 +216,6 @@

  :- implementation.

-:- import_module check_hlds.mode_util.
  :- import_module hlds.hlds_out.
  :- import_module libs.compiler_util.
  :- import_module libs.globals.
Index: compiler/pd_cost.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/pd_cost.m,v
retrieving revision 1.31
diff -u -r1.31 pd_cost.m
--- compiler/pd_cost.m	20 Aug 2006 08:21:23 -0000	1.31
+++ compiler/pd_cost.m	1 Dec 2006 13:14:36 -0000
@@ -5,14 +5,14 @@
  % This file may only be copied under the terms of the GNU General
  % Public License - see the file COPYING in the Mercury distribution.
  %-----------------------------------------------------------------------------%
-
-% File: pd_cost.m
-% Main author: stayl
-
+%
+% File: pd_cost.m.
+% Main author: stayl.
+%
  % goal_cost gives a very rough guess as to how much work a given goal
  % will cause at runtime. This only counts the local cost not including
  % the time taken by called predicates.
-
+%
  %-----------------------------------------------------------------------------%

  :- module transform_hlds.pd_cost.
@@ -42,7 +42,6 @@

  :- implementation.

-:- import_module hlds.hlds_data.
  :- import_module libs.compiler_util.
  :- import_module parse_tree.prog_data.

Index: compiler/pd_info.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/pd_info.m,v
retrieving revision 1.30
diff -u -r1.30 pd_info.m
--- compiler/pd_info.m	7 Sep 2006 05:51:01 -0000	1.30
+++ compiler/pd_info.m	1 Dec 2006 13:15:28 -0000
@@ -5,12 +5,12 @@
  % This file may only be copied under the terms of the GNU General
  % Public License - see the file COPYING in the Mercury distribution.
  %-----------------------------------------------------------------------------%
-
+%
  % File: pd_info.m.
  % Main author: stayl.
-
+%
  % Types for deforestation.
-
+%
  %-----------------------------------------------------------------------------%

  :- module transform_hlds.pd_info.
@@ -117,23 +117,18 @@

  :- implementation.

-:- import_module check_hlds.det_util.
  :- import_module check_hlds.inst_match.
-:- import_module hlds.hlds_data.
  :- import_module hlds.hlds_goal.
  :- import_module hlds.hlds_pred.
  :- import_module libs.compiler_util.
-:- import_module libs.globals.
  :- import_module mdbcomp.prim_data.
  :- import_module parse_tree.prog_data.
  :- import_module parse_tree.prog_util.
  :- import_module transform_hlds.pd_debug.
  :- import_module transform_hlds.pd_util.

-:- import_module assoc_list.
  :- import_module bool.
  :- import_module int.
-:- import_module string.
  :- import_module term.

  %-----------------------------------------------------------------------------%
Index: compiler/pd_term.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/pd_term.m,v
retrieving revision 1.16
diff -u -r1.16 pd_term.m
--- compiler/pd_term.m	27 Jul 2006 05:01:18 -0000	1.16
+++ compiler/pd_term.m	1 Dec 2006 13:16:07 -0000
@@ -5,10 +5,10 @@
  % This file may only be copied under the terms of the GNU General
  % Public License - see the file COPYING in the Mercury distribution.
  %-----------------------------------------------------------------------------%
-
+%
  % File: pd_term.m.
  % Main author: stayl.
-
+%
  % Termination checking for the deforestation process.
  % There are two places where care must be taken to ensure
  % termination of the process:
@@ -34,7 +34,7 @@
  % - Use homeomorphic embedding instead of term sizes as suggested in
  %   the papers on partial deduction from K.U. Leuven. This will be
  %   useful (necessary?) if we start propagating equality constraints.
-
+%
  %-----------------------------------------------------------------------------%

  :- module transform_hlds.pd_term.
@@ -102,7 +102,6 @@

  :- implementation.

-:- import_module check_hlds.mode_util.
  :- import_module hlds.hlds_pred.
  :- import_module libs.compiler_util.
  :- import_module parse_tree.prog_data.
@@ -112,7 +111,6 @@
  :- import_module bool.
  :- import_module int.
  :- import_module map.
-:- import_module set.

  %-----------------------------------------------------------------------------%

Index: compiler/pd_util.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/pd_util.m,v
retrieving revision 1.58
diff -u -r1.58 pd_util.m
--- compiler/pd_util.m	6 Nov 2006 07:21:40 -0000	1.58
+++ compiler/pd_util.m	1 Dec 2006 13:18:22 -0000
@@ -5,12 +5,12 @@
  % This file may only be copied under the terms of the GNU General
  % Public License - see the file COPYING in the Mercury distribution.
  %-----------------------------------------------------------------------------%
-
+%
  % File pd_util.m.
  % Main author: stayl.
-
+%
  % Utility predicates for deforestation and partial evaluation.
-
+%
  %-----------------------------------------------------------------------------%

  :- module transform_hlds.pd_util.
@@ -162,11 +162,8 @@
  :- import_module check_hlds.inst_util.
  :- import_module check_hlds.mode_info.
  :- import_module check_hlds.mode_util.
-:- import_module check_hlds.purity.
  :- import_module check_hlds.unique_modes.
-:- import_module hlds.goal_form.
  :- import_module hlds.goal_util.
-:- import_module hlds.hlds_data.
  :- import_module hlds.instmap.
  :- import_module hlds.quantification.
  :- import_module libs.compiler_util.
@@ -175,9 +172,7 @@
  :- import_module parse_tree.error_util.
  :- import_module parse_tree.prog_type.
  :- import_module transform_hlds.constraint.
-:- import_module transform_hlds.pd_cost.
  :- import_module transform_hlds.pd_debug.
-:- import_module transform_hlds.unused_args.

  :- import_module assoc_list.
  :- import_module int.
Index: compiler/peephole.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/peephole.m,v
retrieving revision 1.95
diff -u -r1.95 peephole.m
--- compiler/peephole.m	14 Nov 2006 21:35:51 -0000	1.95
+++ compiler/peephole.m	1 Dec 2006 11:00:11 -0000
@@ -5,12 +5,12 @@
  % This file may only be copied under the terms of the GNU General
  % Public License - see the file COPYING in the Mercury distribution.
  %-----------------------------------------------------------------------------%
-
+%
  % File: peeophole.m:
  % Authors: fjh, zs.
-
+%
  % Local LLDS to LLDS optimizations based on pattern-matching.
-
+%
  %-----------------------------------------------------------------------------%

  :- module ll_backend.peephole.
@@ -35,8 +35,6 @@
  :- implementation.

  :- import_module backend_libs.builtin_ops.
-:- import_module ll_backend.code_util.
-:- import_module ll_backend.opt_debug.
  :- import_module ll_backend.opt_util.

  :- import_module int.
Index: compiler/polyhedron.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/polyhedron.m,v
retrieving revision 1.4
diff -u -r1.4 polyhedron.m
--- compiler/polyhedron.m	29 Mar 2006 08:07:14 -0000	1.4
+++ compiler/polyhedron.m	1 Dec 2006 10:37:04 -0000
@@ -6,17 +6,17 @@
  % Public License - see the file COPYING in the Mercury distribution.
  %-----------------------------------------------------------------------------%
  %
-% file: polyhedron.m
-% main author: juliensf
-
+% File: polyhedron.m.
+% Main author: juliensf.
+%
  % Provides closed convex polyhedra over Q^n.
  % These are useful as an abstract domain for describing numerical relational
  % information. 
-
+%
  % The set of closed convex polyhedra is partially ordered by subset inclusion.
  % It forms a lattice with intersection as the binary meet operation and convex
  % hull as the binary join operation.
-
+%
  % This module includes procedures for:
  %   - computing the intersection of two convex polyhedra
  %   - computing the convex hull of two convex polyhedra
@@ -25,9 +25,9 @@
  %     expensive.
  %   - converting a convex polyhedron to and from an equivalent system
  %     of linear constraints.
-
+%
  % It also includes an implementation of widening for convex polyhedra.
-
+%
  % NOTE: many of the operations in this module require you to pass in
  % the varset that the variables in the constraints that define the polyhedron
  % were allocated from.  This because the code for computing the convex hull
@@ -35,10 +35,10 @@
  % variables.
  %
  % XXX We could avoid this with some extra work.
-
+%
  % TODO:
  %   * See if using the double description method is any faster.
-
+%
  %-----------------------------------------------------------------------------%

  :- module libs.polyhedron.
@@ -187,10 +187,7 @@
  :- import_module libs.compiler_util.
  :- import_module libs.rat.

-:- import_module bool.
-:- import_module int.
  :- import_module pair.
-:- import_module string.
  :- import_module svmap.
  :- import_module svvarset.
  :- import_module varset.
Index: compiler/post_term_analysis.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/post_term_analysis.m,v
retrieving revision 1.13
diff -u -r1.13 post_term_analysis.m
--- compiler/post_term_analysis.m	20 Aug 2006 08:21:24 -0000	1.13
+++ compiler/post_term_analysis.m	1 Dec 2006 13:18:57 -0000
@@ -6,8 +6,8 @@
  % Public License - see the file COPYING in the Mercury distribution.
  %----------------------------------------------------------------------------%
  %
-% File: post_term_analysis.m
-% Main author: juliensf
+% File: post_term_analysis.m.
+% Main author: juliensf.
  %
  % This module contains various checks that rely on the information produced by
  % termination analysis. 
@@ -35,9 +35,7 @@
  :- import_module backend_libs.
  :- import_module backend_libs.foreign.
  :- import_module hlds.goal_form.
-:- import_module hlds.goal_util.
  :- import_module hlds.hlds_data.
-:- import_module hlds.hlds_error_util.
  :- import_module hlds.hlds_module.
  :- import_module hlds.hlds_out.
  :- import_module hlds.hlds_pred.
Index: compiler/pragma_c_gen.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/pragma_c_gen.m,v
retrieving revision 1.98
diff -u -r1.98 pragma_c_gen.m
--- compiler/pragma_c_gen.m	15 Oct 2006 23:26:49 -0000	1.98
+++ compiler/pragma_c_gen.m	1 Dec 2006 11:00:43 -0000
@@ -5,10 +5,10 @@
  % This file may only be copied under the terms of the GNU General
  % Public License - see the file COPYING in the Mercury distribution.
  %---------------------------------------------------------------------------%
-
+%
  % File: pragma_c_gen.m
  % Main authors: dgj, conway, zs.
-
+%
  % The code in this module generates code for pragma_c_code goals.
  %
  % The schemes we use to generate code for model_det and model_semi
@@ -17,7 +17,7 @@
  %
  % The scheme for model_non pragma_c_codes is substantially different,
  % so we handle them separately.
-
+%
  %---------------------------------------------------------------------------%

  :- module ll_backend.pragma_c_gen.
@@ -76,7 +76,6 @@
  :- import_module parse_tree.prog_foreign.
  :- import_module parse_tree.prog_type.

-:- import_module assoc_list.
  :- import_module bool.
  :- import_module int.
  :- import_module map.
Index: compiler/pred_table.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/pred_table.m,v
retrieving revision 1.5
diff -u -r1.5 pred_table.m
--- compiler/pred_table.m	2 Oct 2006 05:21:20 -0000	1.5
+++ compiler/pred_table.m	1 Dec 2006 10:24:40 -0000
@@ -5,14 +5,14 @@
  % This file may only be copied under the terms of the GNU General
  % Public License - see the file COPYING in the Mercury distribution.
  %-----------------------------------------------------------------------------%
-
+%
  % File: pred_table.m.
  % Main authors: fjh, conway.
-
+%
  % This module defines the part of the High Level Data Structure or HLDS
  % that allows the compiler to look up predicates by name (qualified,
  % unqualified or some mixture) and/or arity.
-
+%
  %-----------------------------------------------------------------------------%

  :- module hlds.pred_table.
@@ -31,10 +31,8 @@
  :- implementation.

  :- import_module libs.compiler_util.
-:- import_module parse_tree.modules.
  :- import_module parse_tree.prog_out.
  :- import_module parse_tree.prog_type.
-:- import_module parse_tree.prog_util.

  :- import_module bool.
  :- import_module int.
Index: compiler/proc_gen.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/proc_gen.m,v
retrieving revision 1.10
diff -u -r1.10 proc_gen.m
--- compiler/proc_gen.m	1 Nov 2006 02:31:10 -0000	1.10
+++ compiler/proc_gen.m	1 Dec 2006 11:01:20 -0000
@@ -68,8 +68,6 @@
  :- import_module backend_libs.builtin_ops.
  :- import_module backend_libs.proc_label.
  :- import_module backend_libs.rtti.
-:- import_module check_hlds.mode_util.
-:- import_module check_hlds.type_util.
  :- import_module hlds.code_model.
  :- import_module hlds.goal_util.
  :- import_module hlds.hlds_clauses.
@@ -77,8 +75,6 @@
  :- import_module hlds.hlds_llds.
  :- import_module hlds.hlds_out.
  :- import_module hlds.instmap.
-:- import_module hlds.passes_aux.
-:- import_module hlds.special_pred.
  :- import_module libs.compiler_util.
  :- import_module libs.globals.
  :- import_module libs.options.
@@ -98,7 +94,6 @@
  :- import_module mdbcomp.program_representation.
  :- import_module parse_tree.prog_data.
  :- import_module parse_tree.prog_out.
-:- import_module parse_tree.prog_util.

  :- import_module assoc_list.
  :- import_module bool.
@@ -111,7 +106,6 @@
  :- import_module solutions.
  :- import_module string.
  :- import_module term.
-:- import_module varset.

  %---------------------------------------------------------------------------%

Index: compiler/process_util.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/process_util.m,v
retrieving revision 1.22
diff -u -r1.22 process_util.m
--- compiler/process_util.m	15 Oct 2006 23:26:50 -0000	1.22
+++ compiler/process_util.m	1 Dec 2006 10:37:23 -0000
@@ -86,7 +86,6 @@

  :- implementation.

-:- import_module libs.compiler_util.
  :- import_module libs.globals.
  :- import_module libs.options.

Index: compiler/prog_ctgc.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/prog_ctgc.m,v
retrieving revision 1.14
diff -u -r1.14 prog_ctgc.m
--- compiler/prog_ctgc.m	1 Nov 2006 06:33:06 -0000	1.14
+++ compiler/prog_ctgc.m	1 Dec 2006 13:56:15 -0000
@@ -21,7 +21,6 @@
  :- import_module parse_tree.prog_data.

  :- import_module bool.
-:- import_module int.
  :- import_module io.
  :- import_module list.
  :- import_module map.
@@ -187,9 +186,10 @@
  :- import_module parse_tree.prog_type_subst.
  :- import_module parse_tree.prog_util.

-:- import_module string.
+:- import_module int.
  :- import_module pair.
  :- import_module set.
+:- import_module string.
  :- import_module varset.

  %-----------------------------------------------------------------------------%
Index: compiler/prog_foreign.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/prog_foreign.m,v
retrieving revision 1.9
diff -u -r1.9 prog_foreign.m
--- compiler/prog_foreign.m	20 Sep 2006 09:42:12 -0000	1.9
+++ compiler/prog_foreign.m	1 Dec 2006 12:46:59 -0000
@@ -33,7 +33,6 @@

  :- import_module bool.
  :- import_module list.
-:- import_module string.
  :- import_module term.

  %-----------------------------------------------------------------------------%
@@ -194,6 +193,7 @@

  :- import_module char.
  :- import_module int.
+:- import_module string.

  %-----------------------------------------------------------------------------%

Index: compiler/prog_io.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/prog_io.m,v
retrieving revision 1.277
diff -u -r1.277 prog_io.m
--- compiler/prog_io.m	1 Nov 2006 06:33:09 -0000	1.277
+++ compiler/prog_io.m	1 Dec 2006 12:47:19 -0000
@@ -297,7 +297,6 @@
  :- import_module set.
  :- import_module string.
  :- import_module term_io.
-:- import_module time.
  :- import_module unit.

  %-----------------------------------------------------------------------------%
Index: compiler/prog_io_dcg.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/prog_io_dcg.m,v
retrieving revision 1.40
diff -u -r1.40 prog_io_dcg.m
--- compiler/prog_io_dcg.m	1 Nov 2006 06:33:12 -0000	1.40
+++ compiler/prog_io_dcg.m	1 Dec 2006 12:47:52 -0000
@@ -5,10 +5,10 @@
  % This file may only be copied under the terms of the GNU General
  % Public License - see the file COPYING in the Mercury distribution.
  %-----------------------------------------------------------------------------%
-
+%
  % File: prog_io_dcg.m.
  % Main authors: fjh, zs.
-
+%
  % This module handles the parsing of clauses in Definite Clause Grammar
  % notation.
  %
@@ -16,7 +16,7 @@
  % XXX It may be an idea to recode this as a state variable transformation:
  % roughly     Head --> G1, G2, {G3}, G4.
  % becomes     Head(!DCG) :- G1(!DCG), G2(!DCG), G3, G4(!DCG).
-
+%
  %-----------------------------------------------------------------------------%

  :- module parse_tree.prog_io_dcg.
@@ -53,9 +53,7 @@
  :- import_module parse_tree.prog_out.

  :- import_module counter.
-:- import_module int.
  :- import_module list.
-:- import_module map.
  :- import_module pair.
  :- import_module string.

Index: compiler/prog_io_goal.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/prog_io_goal.m,v
retrieving revision 1.49
diff -u -r1.49 prog_io_goal.m
--- compiler/prog_io_goal.m	1 Nov 2006 06:33:12 -0000	1.49
+++ compiler/prog_io_goal.m	1 Dec 2006 12:48:06 -0000
@@ -90,8 +90,6 @@

  :- import_module assoc_list.
  :- import_module char.
-:- import_module int.
-:- import_module map.
  :- import_module maybe.
  :- import_module pair.
  :- import_module string.
Index: compiler/prog_io_pragma.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/prog_io_pragma.m,v
retrieving revision 1.116
diff -u -r1.116 prog_io_pragma.m
--- compiler/prog_io_pragma.m	1 Nov 2006 06:33:13 -0000	1.116
+++ compiler/prog_io_pragma.m	1 Dec 2006 12:48:28 -0000
@@ -47,14 +47,12 @@
  :- import_module parse_tree.prog_ctgc.
  :- import_module parse_tree.prog_data.
  :- import_module parse_tree.prog_io.
-:- import_module parse_tree.prog_io_goal.
  :- import_module parse_tree.prog_out.
  :- import_module parse_tree.prog_util.

  :- import_module assoc_list.
  :- import_module bool.
  :- import_module int.
-:- import_module map.
  :- import_module maybe.
  :- import_module pair.
  :- import_module set.
Index: compiler/prog_io_typeclass.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/prog_io_typeclass.m,v
retrieving revision 1.57
diff -u -r1.57 prog_io_typeclass.m
--- compiler/prog_io_typeclass.m	1 Nov 2006 06:33:16 -0000	1.57
+++ compiler/prog_io_typeclass.m	1 Dec 2006 12:49:02 -0000
@@ -5,13 +5,13 @@
  % This file may only be copied under the terms of the GNU General
  % Public License - see the file COPYING in the Mercury distribution.
  %-----------------------------------------------------------------------------%
-
+%
  % File: prog_io_typeclass.m.
  % Main authors: dgj.
-
+%
  % This module handles the parsing of typeclass declarations.
  % Perhaps some of this should go into prog_io_util.m?
-
+%
  %-----------------------------------------------------------------------------%

  :- module parse_tree.prog_io_typeclass.
@@ -58,16 +58,13 @@

  :- import_module libs.compiler_util.
  :- import_module parse_tree.prog_io.
-:- import_module parse_tree.prog_io_goal.
  :- import_module parse_tree.prog_util.
  :- import_module parse_tree.prog_type.

  :- import_module assoc_list.
-:- import_module int.
  :- import_module map.
  :- import_module maybe.
  :- import_module pair.
-:- import_module set.
  :- 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.55
diff -u -r1.55 prog_io_util.m
--- compiler/prog_io_util.m	1 Nov 2006 06:33:17 -0000	1.55
+++ compiler/prog_io_util.m	1 Dec 2006 12:49:44 -0000
@@ -183,24 +183,20 @@
  :- pred list_term_to_term_list(term::in, list(term)::out) is semidet.

  %-----------------------------------------------------------------------------%
+%-----------------------------------------------------------------------------%

  :- implementation.

  :- import_module libs.compiler_util.
-:- import_module libs.globals.
-:- import_module libs.options.
-:- import_module parse_tree.mercury_to_mercury.
-:- import_module parse_tree.error_util.
  :- import_module parse_tree.prog_io.
-:- import_module parse_tree.prog_io_goal.
  :- import_module parse_tree.prog_out.
  :- import_module parse_tree.prog_util.

-:- import_module bool.
  :- import_module set.
-:- import_module string.
  :- import_module term.

+%-----------------------------------------------------------------------------%
+
  get_any_errors1(ok1(_)) = [].
  get_any_errors1(error1(Errors)) = Errors.

Index: compiler/prog_mode.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/prog_mode.m,v
retrieving revision 1.19
diff -u -r1.19 prog_mode.m
--- compiler/prog_mode.m	1 Nov 2006 06:33:17 -0000	1.19
+++ compiler/prog_mode.m	1 Dec 2006 12:50:03 -0000
@@ -131,10 +131,8 @@

  :- import_module libs.compiler_util.
  :- import_module mdbcomp.prim_data.
-:- import_module parse_tree.prog_util.

  :- import_module map.
-:- import_module pair.
  :- import_module set.
  :- import_module term.
  :- import_module varset.
Index: compiler/prog_mutable.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/prog_mutable.m,v
retrieving revision 1.18
diff -u -r1.18 prog_mutable.m
--- compiler/prog_mutable.m	30 Aug 2006 04:46:01 -0000	1.18
+++ compiler/prog_mutable.m	1 Dec 2006 12:51:12 -0000
@@ -169,8 +169,6 @@
  :- import_module parse_tree.prog_data.
  :- import_module parse_tree.prog_item.

-:- import_module string.
-
  %-----------------------------------------------------------------------------%

      % Create predmode declarations for the four primitive operations.
@@ -269,10 +267,10 @@
  :- import_module parse_tree.prog_foreign.
  :- import_module parse_tree.prog_mode.
  :- import_module parse_tree.prog_type.
-:- import_module libs.compiler_util.

  :- import_module list.
  :- import_module maybe.
+:- import_module string.
  :- import_module varset.

  %-----------------------------------------------------------------------------%
Index: compiler/prog_out.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/prog_out.m,v
retrieving revision 1.78
diff -u -r1.78 prog_out.m
--- compiler/prog_out.m	2 Oct 2006 05:21:22 -0000	1.78
+++ compiler/prog_out.m	1 Dec 2006 12:51:47 -0000
@@ -5,17 +5,16 @@
  % This file may only be copied under the terms of the GNU General
  % Public License - see the file COPYING in the Mercury distribution.
  %-----------------------------------------------------------------------------%
-
+%
  % File: prog_out.m.
  % Main author: fjh.
-
+%
  % This module defines some predicates which output various parts
  % of the parse tree created by prog_io.
-
+%
  % WARNING - this module is mostly junk at the moment!
  % Only the first hundred lines or so are meaningful.
-
-%-----------------------------------------------------------------------------%
+%
  %-----------------------------------------------------------------------------%

  :- module parse_tree.prog_out.
@@ -158,7 +157,6 @@
  :- import_module parse_tree.error_util.
  :- import_module parse_tree.prog_util.

-:- import_module int.
  :- import_module pair.
  :- import_module string.
  :- import_module term.
Index: compiler/prog_rep.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/prog_rep.m,v
retrieving revision 1.50
diff -u -r1.50 prog_rep.m
--- compiler/prog_rep.m	15 Oct 2006 23:26:50 -0000	1.50
+++ compiler/prog_rep.m	1 Dec 2006 11:01:53 -0000
@@ -5,16 +5,16 @@
  % This file may only be copied under the terms of the GNU General
  % Public License - see the file COPYING in the Mercury distribution.
  %---------------------------------------------------------------------------%
-
+%
  % File: prog_rep.m.
  % Authors: zs, maclarty.
-
+%
  % This module generates a representation of HLDS goals for the declarative
  % debugger. Since this representation is to be included in debuggable
  % executables, it should be as compact as possible, and therefore contains
  % only the information required by the declarative debugger. The structure
  % of this representation is defined by mdbcomp/program_representation.m.
-
+%
  %---------------------------------------------------------------------------%

  :- module ll_backend.prog_rep.
@@ -57,14 +57,11 @@
  :- import_module check_hlds.inst_match.
  :- import_module check_hlds.mode_util.
  :- 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 mdbcomp.program_representation.
-:- import_module parse_tree.prog_out.
-:- import_module parse_tree.prog_util.

  :- import_module int.
  :- import_module maybe.
Index: compiler/prog_type.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/prog_type.m,v
retrieving revision 1.29
diff -u -r1.29 prog_type.m
--- compiler/prog_type.m	1 Nov 2006 06:33:17 -0000	1.29
+++ compiler/prog_type.m	1 Dec 2006 12:52:03 -0000
@@ -409,12 +409,10 @@

  :- import_module libs.options.
  :- import_module libs.compiler_util.
-:- import_module parse_tree.prog_io.
  :- import_module parse_tree.prog_out.
  :- import_module parse_tree.prog_util.
  :- import_module parse_tree.prog_type_subst.

-:- import_module pair.
  :- 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.4
diff -u -r1.4 prog_type_subst.m
--- compiler/prog_type_subst.m	22 Aug 2006 05:04:05 -0000	1.4
+++ compiler/prog_type_subst.m	1 Dec 2006 12:52:21 -0000
@@ -122,9 +122,6 @@
  :- implementation.

  :- import_module libs.compiler_util.
-:- import_module parse_tree.prog_io.
-:- import_module parse_tree.prog_out.
-:- import_module parse_tree.prog_util.

  :- import_module map.
  :- import_module maybe.
Index: compiler/prog_util.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/prog_util.m,v
retrieving revision 1.96
diff -u -r1.96 prog_util.m
--- compiler/prog_util.m	1 Nov 2006 06:33:18 -0000	1.96
+++ compiler/prog_util.m	1 Dec 2006 12:52:38 -0000
@@ -280,8 +280,6 @@

  :- import_module libs.compiler_util.
  :- import_module parse_tree.mercury_to_mercury.
-:- import_module parse_tree.prog_io.
-:- import_module parse_tree.prog_out.

  :- import_module bool.
  :- import_module int.
Index: compiler/qual_info.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/qual_info.m,v
retrieving revision 1.17
diff -u -r1.17 qual_info.m
--- compiler/qual_info.m	20 Sep 2006 09:42:13 -0000	1.17
+++ compiler/qual_info.m	1 Dec 2006 10:22:35 -0000
@@ -5,10 +5,10 @@
  % This file may only be copied under the terms of the GNU General
  % Public License - see the file COPYING in the Mercury distribution.
  %-----------------------------------------------------------------------------%
-
+%
  % File: qual_info.m.
  % Main author: fjh.
-
+%
  %-----------------------------------------------------------------------------%

  :- module hlds.make_hlds.qual_info.
@@ -90,11 +90,11 @@
      is det.

  %-----------------------------------------------------------------------------%
+%-----------------------------------------------------------------------------%

  :- implementation.

  :- import_module hlds.hlds_data.
-:- import_module parse_tree.prog_out.
  :- import_module parse_tree.prog_type.
  :- import_module parse_tree.prog_type_subst.
  :- import_module parse_tree.prog_util.
Index: compiler/quantification.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/quantification.m,v
retrieving revision 1.111
diff -u -r1.111 quantification.m
--- compiler/quantification.m	6 Nov 2006 07:55:13 -0000	1.111
+++ compiler/quantification.m	1 Dec 2006 10:24:59 -0000
@@ -124,7 +124,6 @@
  :- import_module libs.compiler_util.

  :- import_module bool.
-:- import_module enum.
  :- import_module map.
  :- import_module maybe.
  :- import_module pair.
Index: compiler/rat.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/rat.m,v
retrieving revision 1.6
diff -u -r1.6 rat.m
--- compiler/rat.m	31 Jul 2006 08:31:58 -0000	1.6
+++ compiler/rat.m	1 Dec 2006 10:38:16 -0000
@@ -26,9 +26,7 @@
  :- module libs.rat.
  :- interface.

-:- import_module int.
  :- import_module io.
-:- import_module string.

  %-----------------------------------------------------------------------------%

@@ -83,6 +81,11 @@

  :- import_module libs.compiler_util.

+:- import_module int.
+:- import_module string.
+
+%-----------------------------------------------------------------------------%
+
      % The normal form of a rat number has the following
      % properties:
      %   - numerator and denominator have no common factors.
Index: compiler/recompilation.usage.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/recompilation.usage.m,v
retrieving revision 1.41
diff -u -r1.41 recompilation.usage.m
--- compiler/recompilation.usage.m	1 Nov 2006 06:33:19 -0000	1.41
+++ compiler/recompilation.usage.m	1 Dec 2006 12:53:52 -0000
@@ -82,9 +82,7 @@

  :- implementation.

-:- import_module check_hlds.type_util.
  :- import_module hlds.hlds_data.
-:- import_module hlds.hlds_out.
  :- import_module hlds.hlds_pred.
  :- import_module hlds.passes_aux.
  :- import_module hlds.pred_table.
Index: compiler/recompilation.version.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/recompilation.version.m,v
retrieving revision 1.55
diff -u -r1.55 recompilation.version.m
--- compiler/recompilation.version.m	13 Oct 2006 04:52:25 -0000	1.55
+++ compiler/recompilation.version.m	1 Dec 2006 12:54:47 -0000
@@ -24,6 +24,8 @@
  :- import_module maybe.
  :- import_module term.

+%-----------------------------------------------------------------------------%
+
      % compute_version_numbers(SourceFileModTime, NewItems, MaybeOldItems,
      %   VersionNumbers).
      %
@@ -44,8 +46,6 @@

  :- implementation.

-:- import_module check_hlds.mode_util.
-:- import_module check_hlds.type_util.
  :- import_module hlds.hlds_out.
  :- import_module libs.compiler_util.
  :- import_module parse_tree.mercury_to_mercury.
@@ -60,6 +60,8 @@
  :- import_module string.
  :- import_module varset.

+%-----------------------------------------------------------------------------%
+
  compute_version_numbers(SourceFileTime, Items, MaybeOldItems,
          version_numbers(ItemVersionNumbers, InstanceVersionNumbers)) :-
      gather_items(section_implementation, Items, GatheredItems,
Index: compiler/rtti_out.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/rtti_out.m,v
retrieving revision 1.70
diff -u -r1.70 rtti_out.m
--- compiler/rtti_out.m	15 Oct 2006 23:26:51 -0000	1.70
+++ compiler/rtti_out.m	1 Dec 2006 11:02:32 -0000
@@ -99,23 +99,16 @@

  :- import_module backend_libs.c_util.
  :- import_module backend_libs.name_mangle.
-:- import_module backend_libs.proc_label.
-:- import_module backend_libs.pseudo_type_info.
  :- import_module backend_libs.type_ctor_info.
-:- import_module hlds.code_model.
  :- import_module hlds.hlds_data.
-:- 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.
  :- import_module ll_backend.layout_out.
  :- import_module ll_backend.llds.
  :- import_module mdbcomp.prim_data.
-:- import_module parse_tree.prog_data.
  :- import_module parse_tree.prog_foreign.
-:- import_module parse_tree.prog_out.

  :- import_module assoc_list.
  :- import_module counter.
Index: compiler/rtti_to_mlds.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/rtti_to_mlds.m,v
retrieving revision 1.76
diff -u -r1.76 rtti_to_mlds.m
--- compiler/rtti_to_mlds.m	2 Oct 2006 05:21:23 -0000	1.76
+++ compiler/rtti_to_mlds.m	1 Dec 2006 12:41:00 -0000
@@ -57,23 +57,16 @@
  :- implementation.

  :- import_module backend_libs.foreign.
-:- import_module backend_libs.pseudo_type_info.
  :- import_module backend_libs.type_ctor_info.
-:- import_module check_hlds.type_util.
-:- import_module hlds.code_model.
  :- import_module hlds.hlds_data.
-:- import_module hlds.hlds_pred.
  :- import_module hlds.hlds_rtti.
  :- import_module libs.compiler_util.
  :- import_module mdbcomp.prim_data.
  :- import_module ml_backend.ml_closure_gen.
  :- import_module ml_backend.ml_code_util.
-:- import_module ml_backend.ml_unify_gen.
  :- import_module ml_backend.ml_util.
  :- import_module parse_tree.prog_data.
-:- import_module parse_tree.prog_out.
  :- import_module parse_tree.prog_type.
-:- import_module parse_tree.prog_util.

  :- import_module assoc_list.
  :- import_module bool.
@@ -83,7 +76,6 @@
  :- import_module map.
  :- import_module maybe.
  :- import_module pair.
-:- import_module string.
  :- import_module term.
  :- import_module univ.

Index: compiler/saved_vars.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/saved_vars.m,v
retrieving revision 1.71
diff -u -r1.71 saved_vars.m
--- compiler/saved_vars.m	15 Oct 2006 23:26:51 -0000	1.71
+++ compiler/saved_vars.m	1 Dec 2006 11:02:48 -0000
@@ -47,7 +47,6 @@
  :- import_module check_hlds.polymorphism.
  :- import_module hlds.goal_util.
  :- import_module hlds.hlds_goal.
-:- import_module hlds.hlds_out.
  :- import_module hlds.hlds_rtti.
  :- import_module hlds.passes_aux.
  :- import_module hlds.quantification.
Index: compiler/size_prof.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/size_prof.m,v
retrieving revision 1.48
diff -u -r1.48 size_prof.m
--- compiler/size_prof.m	15 Oct 2006 23:26:51 -0000	1.48
+++ compiler/size_prof.m	1 Dec 2006 13:19:22 -0000
@@ -113,7 +113,6 @@
  :- import_module check_hlds.simplify.
  :- import_module check_hlds.type_util.
  :- import_module hlds.goal_util.
-:- import_module hlds.hlds_data.
  :- import_module hlds.hlds_goal.
  :- import_module hlds.hlds_out.
  :- import_module hlds.hlds_rtti.
@@ -125,7 +124,6 @@
  :- import_module mdbcomp.prim_data.
  :- import_module parse_tree.prog_data.
  :- import_module parse_tree.prog_type.
-:- import_module parse_tree.prog_util.
  :- import_module transform_hlds.term_norm.

  :- import_module assoc_list.
Index: compiler/source_file_map.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/source_file_map.m,v
retrieving revision 1.19
diff -u -r1.19 source_file_map.m
--- compiler/source_file_map.m	2 Oct 2006 05:21:24 -0000	1.19
+++ compiler/source_file_map.m	1 Dec 2006 12:53:02 -0000
@@ -48,10 +48,8 @@
  :- implementation.

  :- import_module libs.globals.
-:- import_module libs.options.
  :- import_module parse_tree.modules.
  :- import_module parse_tree.prog_out.
-:- import_module parse_tree.prog_util.

  :- import_module char.
  :- import_module dir.
Index: compiler/special_pred.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/special_pred.m,v
retrieving revision 1.67
diff -u -r1.67 special_pred.m
--- compiler/special_pred.m	1 Nov 2006 06:33:20 -0000	1.67
+++ compiler/special_pred.m	1 Dec 2006 10:25:28 -0000
@@ -110,15 +110,12 @@

  :- implementation.

-:- import_module check_hlds.mode_util.
  :- import_module check_hlds.type_util.
  :- import_module libs.compiler_util.
  :- import_module libs.globals.
  :- import_module libs.options.
  :- import_module parse_tree.prog_mode.
-:- import_module parse_tree.prog_out.
  :- import_module parse_tree.prog_type.
-:- import_module parse_tree.prog_util.

  :- import_module bool.
  :- import_module maybe.
Index: compiler/stack_alloc.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/stack_alloc.m,v
retrieving revision 1.20
diff -u -r1.20 stack_alloc.m
--- compiler/stack_alloc.m	15 Oct 2006 23:26:52 -0000	1.20
+++ compiler/stack_alloc.m	1 Dec 2006 11:03:45 -0000
@@ -40,10 +40,7 @@

  :- implementation.

-:- import_module check_hlds.goal_path.
-:- import_module check_hlds.type_util.
  :- import_module hlds.code_model.
-:- import_module hlds.hlds_data.
  :- import_module hlds.hlds_goal.
  :- import_module hlds.hlds_llds.
  :- import_module libs.globals.
@@ -52,12 +49,9 @@
  :- import_module libs.trace_params.
  :- import_module ll_backend.live_vars.
  :- import_module ll_backend.liveness.
-:- import_module ll_backend.llds.
-:- import_module ll_backend.stack_opt.
  :- import_module ll_backend.trace_gen.
  :- import_module parse_tree.prog_data.

-:- import_module assoc_list.
  :- import_module bool.
  :- import_module int.
  :- import_module list.
Index: compiler/stack_layout.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/stack_layout.m,v
retrieving revision 1.126
diff -u -r1.126 stack_layout.m
--- compiler/stack_layout.m	29 Nov 2006 05:18:11 -0000	1.126
+++ compiler/stack_layout.m	1 Dec 2006 11:04:19 -0000
@@ -84,7 +84,6 @@
  :- import_module check_hlds.type_util.
  :- import_module hlds.code_model.
  :- import_module hlds.goal_util.
-:- import_module hlds.hlds_data.
  :- import_module hlds.hlds_goal.
  :- import_module hlds.hlds_pred.
  :- import_module hlds.hlds_rtti.
@@ -93,20 +92,15 @@
  :- import_module libs.globals.
  :- import_module libs.options.
  :- import_module libs.trace_params.
-:- import_module ll_backend.code_util.
  :- import_module ll_backend.layout.
  :- import_module ll_backend.layout_out.
-:- import_module ll_backend.llds_out.
  :- import_module ll_backend.ll_pseudo_type_info.
  :- import_module ll_backend.prog_rep.
  :- import_module ll_backend.trace_gen.
  :- import_module mdbcomp.program_representation.
  :- import_module parse_tree.prog_event.
-:- import_module parse_tree.prog_out.
-:- import_module parse_tree.prog_util.

  :- import_module bool.
-:- import_module char.
  :- import_module counter.
  :- import_module int.
  :- import_module map.
Index: compiler/stack_opt.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/stack_opt.m,v
retrieving revision 1.30
diff -u -r1.30 stack_opt.m
--- compiler/stack_opt.m	15 Oct 2006 23:26:52 -0000	1.30
+++ compiler/stack_opt.m	1 Dec 2006 13:51:24 -0000
@@ -89,23 +89,17 @@
  :- import_module backend_libs.interval.
  :- import_module backend_libs.matching.
  :- import_module check_hlds.goal_path.
-:- import_module check_hlds.inst_match.
  :- import_module check_hlds.mode_util.
  :- import_module check_hlds.simplify.
-:- import_module check_hlds.type_util.
  :- import_module hlds.arg_info.
-:- import_module hlds.code_model.
-:- import_module hlds.goal_util.
  :- import_module hlds.hlds_data.
  :- import_module hlds.hlds_goal.
  :- import_module hlds.hlds_llds.
  :- import_module hlds.hlds_out.
-:- import_module hlds.instmap.
  :- import_module hlds.quantification.
  :- import_module libs.compiler_util.
  :- import_module libs.globals.
  :- import_module libs.options.
-:- import_module ll_backend.call_gen.
  :- import_module ll_backend.live_vars.
  :- import_module ll_backend.liveness.
  :- import_module ll_backend.store_alloc.
@@ -113,7 +107,6 @@
  :- import_module parse_tree.prog_data.
  :- import_module parse_tree.prog_type.

-:- import_module assoc_list.
  :- import_module bool.
  :- import_module counter.
  :- import_module int.
@@ -124,9 +117,7 @@
  :- import_module set.
  :- import_module svmap.
  :- import_module svset.
-:- import_module svvarset.
  :- import_module term.
-:- import_module varset.

  %-----------------------------------------------------------------------------%

Index: compiler/stdlabel.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/stdlabel.m,v
retrieving revision 1.2
diff -u -r1.2 stdlabel.m
--- compiler/stdlabel.m	15 Oct 2006 23:26:52 -0000	1.2
+++ compiler/stdlabel.m	1 Dec 2006 11:05:52 -0000
@@ -45,7 +45,6 @@
  :- import_module mdbcomp.prim_data.

  :- import_module bool.
-:- import_module int.
  :- import_module map.
  :- import_module pair.
  :- import_module svmap.
Index: compiler/store_alloc.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/store_alloc.m,v
retrieving revision 1.101
diff -u -r1.101 store_alloc.m
--- compiler/store_alloc.m	31 Jul 2006 08:32:01 -0000	1.101
+++ compiler/store_alloc.m	1 Dec 2006 11:13:27 -0000
@@ -45,14 +45,12 @@

  :- implementation.

-:- import_module check_hlds.mode_util.
  :- import_module hlds.goal_util.
  :- 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.options.
  :- import_module libs.trace_params.
  :- import_module ll_backend.code_util.
  :- import_module ll_backend.follow_vars.
Index: compiler/string_switch.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/string_switch.m,v
retrieving revision 1.60
diff -u -r1.60 string_switch.m
--- compiler/string_switch.m	15 Oct 2006 23:26:53 -0000	1.60
+++ compiler/string_switch.m	1 Dec 2006 11:13:44 -0000
@@ -43,8 +43,6 @@
  :- import_module ll_backend.code_gen.
  :- import_module ll_backend.trace_gen.

-:- import_module assoc_list.
-:- import_module bool.
  :- import_module int.
  :- import_module list.
  :- import_module map.
Index: compiler/structure_reuse.analysis.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/structure_reuse.analysis.m,v
retrieving revision 1.6
diff -u -r1.6 structure_reuse.analysis.m
--- compiler/structure_reuse.analysis.m	20 Aug 2006 08:21:30 -0000	1.6
+++ compiler/structure_reuse.analysis.m	1 Dec 2006 13:00:12 -0000
@@ -100,7 +100,6 @@
  :- import_module maybe.
  :- import_module pair.
  :- 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.7
diff -u -r1.7 structure_reuse.direct.choose_reuse.m
--- compiler/structure_reuse.direct.choose_reuse.m	22 Aug 2006 05:04:08 -0000	1.7
+++ compiler/structure_reuse.direct.choose_reuse.m	1 Dec 2006 14:04:02 -0000
@@ -109,12 +109,16 @@

  :- 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.
  :- import_module int.
  :- import_module maybe.
  :- import_module multi_map.
  :- import_module pair.
+:- 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.7
diff -u -r1.7 structure_reuse.direct.detect_garbage.m
--- compiler/structure_reuse.direct.detect_garbage.m	31 Jul 2006 08:32:02 -0000	1.7
+++ compiler/structure_reuse.direct.detect_garbage.m	1 Dec 2006 14:06:15 -0000
@@ -32,9 +32,13 @@

  :- implementation.

-:- import_module check_hlds.type_util.
+:- import_module libs.compiler_util.
+:- import_module parse_tree.prog_data.
+:- import_module transform_hlds.ctgc.datastruct.

  :- import_module pair. 
+:- import_module set.
+:- import_module string.

  %-----------------------------------------------------------------------------%

Index: compiler/structure_reuse.direct.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/structure_reuse.direct.m,v
retrieving revision 1.4
diff -u -r1.4 structure_reuse.direct.m
--- compiler/structure_reuse.direct.m	31 Jul 2006 08:32:02 -0000	1.4
+++ compiler/structure_reuse.direct.m	1 Dec 2006 14:01:21 -0000
@@ -45,26 +45,19 @@
  :- 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.error_util.
-:- import_module parse_tree.prog_data.
  :- import_module parse_tree.prog_out.
-:- import_module transform_hlds.ctgc.datastruct.
  :- import_module transform_hlds.ctgc.structure_reuse.direct.choose_reuse.
  :- import_module transform_hlds.ctgc.structure_reuse.direct.detect_garbage.
  :- import_module transform_hlds.ctgc.util.

  :- import_module bool.
-:- import_module int.
  :- import_module list.
  :- import_module map.
-:- import_module set.
-:- import_module string.
  :- import_module svmap.
  :- import_module term.
-:- import_module varset.

  :- include_module transform_hlds.ctgc.structure_reuse.direct.detect_garbage.
  :- include_module transform_hlds.ctgc.structure_reuse.direct.choose_reuse.
Index: compiler/structure_reuse.lbu.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/structure_reuse.lbu.m,v
retrieving revision 1.6
diff -u -r1.6 structure_reuse.lbu.m
--- compiler/structure_reuse.lbu.m	31 Jul 2006 08:32:02 -0000	1.6
+++ compiler/structure_reuse.lbu.m	1 Dec 2006 14:07:15 -0000
@@ -48,7 +48,6 @@
  :- import_module list.
  :- import_module pair.
  :- import_module set.
-:- import_module string.

  %-----------------------------------------------------------------------------%

Index: compiler/structure_reuse.lfu.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/structure_reuse.lfu.m,v
retrieving revision 1.5
diff -u -r1.5 structure_reuse.lfu.m
--- compiler/structure_reuse.lfu.m	31 Jul 2006 08:32:02 -0000	1.5
+++ compiler/structure_reuse.lfu.m	1 Dec 2006 14:07:37 -0000
@@ -42,7 +42,6 @@
  :- import_module map.
  :- import_module set.
  :- import_module pair.
-:- import_module string.

  %-----------------------------------------------------------------------------%

Index: compiler/structure_reuse.versions.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/structure_reuse.versions.m,v
retrieving revision 1.4
diff -u -r1.4 structure_reuse.versions.m
--- compiler/structure_reuse.versions.m	12 Oct 2006 13:37:41 -0000	1.4
+++ compiler/structure_reuse.versions.m	1 Dec 2006 14:08:34 -0000
@@ -15,7 +15,6 @@
  %------------------------------------------------------------------------------%

  :- module structure_reuse.versions.
-
  :- interface.

  :- import_module hlds.hlds_module.
@@ -24,6 +23,8 @@

  :- import_module io.

+%------------------------------------------------------------------------------%
+

      % For each of the entries in the reuse table:
      % * if the listed reuse is conditional, then duplicate the
@@ -52,6 +53,7 @@
      module_info::in, module_info::out) is det.

  %------------------------------------------------------------------------------%
+%------------------------------------------------------------------------------%

  :- implementation.

@@ -65,11 +67,11 @@

  :- import_module bool.
  :- import_module map.
-:- import_module maybe.
  :- import_module pair.
-:- import_module string.
  :- import_module list.

+%------------------------------------------------------------------------------%
+
  :- type reuse_name == sym_name.

  :- func generate_reuse_name(module_info, pred_proc_id) = reuse_name.
Index: compiler/structure_sharing.analysis.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/structure_sharing.analysis.m,v
retrieving revision 1.18
diff -u -r1.18 structure_sharing.analysis.m
--- compiler/structure_sharing.analysis.m	20 Aug 2006 08:21:30 -0000	1.18
+++ compiler/structure_sharing.analysis.m	1 Dec 2006 13:38:39 -0000
@@ -41,7 +41,6 @@

  :- implementation.

-:- import_module check_hlds.type_util.
  :- import_module hlds.hlds_goal.
  :- import_module hlds.passes_aux.
  :- import_module libs.compiler_util.
Index: compiler/structure_sharing.domain.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/structure_sharing.domain.m,v
retrieving revision 1.17
diff -u -r1.17 structure_sharing.domain.m
--- compiler/structure_sharing.domain.m	22 Aug 2006 05:04:09 -0000	1.17
+++ compiler/structure_sharing.domain.m	1 Dec 2006 14:11:55 -0000
@@ -61,7 +61,6 @@
  :- import_module list.
  :- import_module map.
  :- import_module set.
-:- import_module string.

  %-----------------------------------------------------------------------------%

@@ -289,7 +288,6 @@
  :- import_module parse_tree.prog_ctgc.
  :- import_module parse_tree.prog_out.
  :- import_module parse_tree.prog_type.
-:- import_module parse_tree.prog_type_subst.
  :- import_module transform_hlds.ctgc.datastruct.
  :- import_module transform_hlds.ctgc.selector.
  :- import_module transform_hlds.ctgc.util.
@@ -298,9 +296,8 @@
  :- import_module int.
  :- import_module maybe.
  :- import_module pair.
-:- import_module require.
-:- import_module solutions.
  :- import_module string.
+:- import_module solutions.
  :- import_module svmap.
  :- import_module svset.
  :- import_module varset.
Index: compiler/superhomogeneous.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/superhomogeneous.m,v
retrieving revision 1.23
diff -u -r1.23 superhomogeneous.m
--- compiler/superhomogeneous.m	6 Nov 2006 07:55:13 -0000	1.23
+++ compiler/superhomogeneous.m	1 Dec 2006 10:23:18 -0000
@@ -114,7 +114,6 @@
  :- implementation.

  :- import_module check_hlds.mode_util.
-:- import_module check_hlds.purity.
  :- import_module hlds.goal_util.
  :- import_module hlds.make_hlds.add_clause.
  :- import_module hlds.make_hlds.field_access.
@@ -126,7 +125,6 @@
  :- import_module parse_tree.prog_io_dcg.
  :- import_module parse_tree.prog_io_goal.
  :- import_module parse_tree.prog_io_util.
-:- import_module parse_tree.prog_out.
  :- import_module parse_tree.prog_util.

  :- import_module bool.
@@ -134,7 +132,6 @@
  :- import_module map.
  :- import_module pair.
  :- import_module set.
-:- import_module string.
  :- import_module svvarset.
  :- import_module svset.
  :- import_module term.
Index: compiler/switch_gen.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/switch_gen.m,v
retrieving revision 1.100
diff -u -r1.100 switch_gen.m
--- compiler/switch_gen.m	15 Oct 2006 23:26:53 -0000	1.100
+++ compiler/switch_gen.m	1 Dec 2006 11:14:03 -0000
@@ -82,10 +82,8 @@

  :- import_module bool.
  :- import_module int.
-:- import_module map.
  :- import_module maybe.
  :- import_module pair.
-:- import_module string.

  %-----------------------------------------------------------------------------%

Index: compiler/table_gen.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/table_gen.m,v
retrieving revision 1.124
diff -u -r1.124 table_gen.m
--- compiler/table_gen.m	15 Oct 2006 23:26:53 -0000	1.124
+++ compiler/table_gen.m	1 Dec 2006 13:20:09 -0000
@@ -52,11 +52,6 @@

  :- implementation.

-:- import_module backend_libs.
-:- import_module backend_libs.rtti.
-:- import_module check_hlds.det_analysis.
-:- import_module check_hlds.inst_match.
-:- import_module check_hlds.modes.
  :- import_module check_hlds.mode_util.
  :- import_module check_hlds.polymorphism.
  :- import_module check_hlds.purity.
@@ -67,12 +62,9 @@
  :- import_module hlds.hlds_error_util.
  :- import_module hlds.hlds_goal.
  :- import_module hlds.hlds_module.
-:- import_module hlds.hlds_out.
  :- import_module hlds.hlds_pred.
  :- import_module hlds.instmap.
-:- 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.
@@ -84,8 +76,6 @@
  :- import_module parse_tree.prog_mode.
  :- import_module parse_tree.prog_out.
  :- import_module parse_tree.prog_type.
-:- import_module parse_tree.prog_util.
-:- import_module transform_hlds.const_prop.

  :- import_module assoc_list.
  :- import_module bool.
Index: compiler/tabling_analysis.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/tabling_analysis.m,v
retrieving revision 1.6
diff -u -r1.6 tabling_analysis.m
--- compiler/tabling_analysis.m	5 Sep 2006 06:21:31 -0000	1.6
+++ compiler/tabling_analysis.m	1 Dec 2006 13:20:58 -0000
@@ -86,15 +86,9 @@

  :- implementation.

-:- import_module check_hlds.mode_util.
-:- import_module check_hlds.type_util.
-:- import_module hlds.code_model.
  :- import_module hlds.hlds_error_util.
  :- import_module hlds.hlds_goal.
  :- import_module hlds.hlds_pred.
-:- import_module hlds.make_hlds.
-:- import_module hlds.passes_aux.
-:- import_module hlds.special_pred.
  :- import_module libs.compiler_util.
  :- import_module libs.globals.
  :- import_module libs.options.
@@ -104,8 +98,6 @@
  :- import_module parse_tree.modules.
  :- import_module parse_tree.prog_data.
  :- import_module parse_tree.prog_out.
-:- import_module parse_tree.prog_util.
-:- import_module parse_tree.prog_type.
  :- import_module transform_hlds.dependency_graph.
  :- import_module transform_hlds.mmc_analysis.

Index: compiler/tag_switch.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/tag_switch.m,v
retrieving revision 1.75
diff -u -r1.75 tag_switch.m
--- compiler/tag_switch.m	15 Oct 2006 23:26:54 -0000	1.75
+++ compiler/tag_switch.m	1 Dec 2006 13:51:55 -0000
@@ -41,10 +41,8 @@

  :- import_module backend_libs.builtin_ops.
  :- import_module backend_libs.rtti.
-:- import_module check_hlds.type_util.
  :- import_module hlds.hlds_data.
  :- import_module hlds.hlds_llds.
-:- import_module hlds.hlds_module.
  :- import_module hlds.hlds_out.
  :- import_module hlds.hlds_pred.
  :- import_module libs.compiler_util.
@@ -56,7 +54,6 @@
  :- import_module parse_tree.prog_data.

  :- import_module assoc_list.
-:- import_module bool.
  :- import_module int.
  :- import_module map.
  :- import_module maybe.
Index: compiler/term_constr_build.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/term_constr_build.m,v
retrieving revision 1.13
diff -u -r1.13 term_constr_build.m
--- compiler/term_constr_build.m	1 Nov 2006 06:33:21 -0000	1.13
+++ compiler/term_constr_build.m	1 Dec 2006 13:22:03 -0000
@@ -6,8 +6,8 @@
  % Public License - see the file COPYING in the Mercury distribution.
  %------------------------------------------------------------------------------%
  % 
-% File: term_constr_build.m
-% Main author: juliensf
+% File: term_constr_build.m.
+% Main author: juliensf.
  % (partially based on code written by vjteag)
  %
  % This module is responsible for building the abstract representation (AR)
@@ -60,18 +60,12 @@

  :- import_module check_hlds.mode_util.
  :- import_module check_hlds.type_util. 
-:- import_module hlds.hlds_data.
  :- import_module hlds.hlds_goal. 
-:- import_module hlds.hlds_out.
  :- import_module hlds.quantification.
  :- import_module libs.compiler_util.
-:- import_module libs.globals.
  :- import_module libs.lp_rational. 
-:- import_module libs.options.
  :- import_module libs.polyhedron.
  :- import_module libs.rat.
-:- import_module parse_tree.mercury_to_mercury. 
-:- import_module parse_tree.modules.
  :- import_module parse_tree.prog_data.
  :- import_module parse_tree.prog_type.
  :- import_module transform_hlds.dependency_graph.
@@ -80,8 +74,6 @@
  :- import_module transform_hlds.term_constr_main.
  :- import_module transform_hlds.term_constr_util.

-:- import_module assoc_list.
-:- import_module counter.
  :- import_module int.
  :- import_module map.
  :- import_module maybe.
Index: compiler/term_constr_data.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/term_constr_data.m,v
retrieving revision 1.5
diff -u -r1.5 term_constr_data.m
--- compiler/term_constr_data.m	20 Aug 2006 08:21:31 -0000	1.5
+++ compiler/term_constr_data.m	1 Dec 2006 13:22:22 -0000
@@ -389,9 +389,7 @@
  :- import_module hlds.hlds_out.
  :- import_module libs.compiler_util.
  :- import_module parse_tree.prog_data.
-:- import_module transform_hlds.term_constr_util.

-:- import_module counter.
  :- import_module int.
  :- import_module std_util.
  :- 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.5
diff -u -r1.5 term_constr_fixpoint.m
--- compiler/term_constr_fixpoint.m	20 Aug 2006 08:21:32 -0000	1.5
+++ compiler/term_constr_fixpoint.m	1 Dec 2006 13:23:09 -0000
@@ -55,24 +55,17 @@

  :- implementation.

-:- import_module check_hlds.type_util. 
-:- import_module hlds.hlds_data. 
-:- import_module hlds.hlds_goal.
  :- import_module hlds.hlds_out.
  :- import_module libs.compiler_util.
-:- import_module libs.globals.
  :- import_module libs.lp_rational. 
-:- import_module libs.options.
  :- import_module libs.polyhedron.
  :- import_module parse_tree.prog_data.
  :- import_module transform_hlds.term_constr_data.
  :- import_module transform_hlds.term_constr_main.
  :- import_module transform_hlds.term_constr_util.

-:- import_module assoc_list.
  :- import_module bool.
  :- import_module int.
-:- import_module map.
  :- import_module maybe.
  :- import_module set.
  :- import_module string.
Index: compiler/term_constr_initial.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/term_constr_initial.m,v
retrieving revision 1.15
diff -u -r1.15 term_constr_initial.m
--- compiler/term_constr_initial.m	22 Aug 2006 05:04:10 -0000	1.15
+++ compiler/term_constr_initial.m	1 Dec 2006 14:16:26 -0000
@@ -55,15 +55,8 @@

  :- implementation.

-:- import_module check_hlds.inst_match.
-:- import_module check_hlds.mode_util.
-:- import_module check_hlds.type_util.
-:- import_module hlds.hlds_data.
-:- import_module hlds.hlds_goal.
-:- import_module hlds.hlds_out.
  :- import_module hlds.hlds_pred.
  :- import_module hlds.passes_aux.
-:- import_module hlds.special_pred.
  :- import_module libs.compiler_util.
  :- import_module libs.globals.
  :- import_module libs.lp_rational.
@@ -72,35 +65,24 @@
  :- import_module libs.rat.
  :- import_module mdbcomp.prim_data.
  :- import_module mdbcomp.program_representation.
-:- import_module parse_tree.mercury_to_mercury.
-:- import_module parse_tree.modules.
  :- import_module parse_tree.prog_data.
-:- import_module parse_tree.prog_out.
-:- import_module parse_tree.prog_util.
-:- import_module transform_hlds.dependency_graph.
  :- import_module transform_hlds.term_constr_data.
  :- import_module transform_hlds.term_constr_errors.
  :- import_module transform_hlds.term_constr_main.
  :- import_module transform_hlds.term_constr_util.
-:- import_module transform_hlds.term_norm.
  :- import_module transform_hlds.term_util.

  :- import_module bool.
-:- import_module bag.
-:- import_module char.
  :- import_module int.
  :- import_module list.
  :- import_module map.
  :- import_module maybe.
  :- import_module pair.
-:- import_module relation.
  :- import_module set.
  :- import_module std_util.
  :- import_module string.
  :- import_module svmap.
-:- import_module svvarset.
  :- import_module term.
-:- import_module varset.

  %----------------------------------------------------------------------------%
  %
Index: compiler/term_constr_main.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/term_constr_main.m,v
retrieving revision 1.11
diff -u -r1.11 term_constr_main.m
--- compiler/term_constr_main.m	20 Aug 2006 08:21:32 -0000	1.11
+++ compiler/term_constr_main.m	1 Dec 2006 13:25:41 -0000
@@ -198,20 +198,10 @@

  :- implementation.

-:- import_module check_hlds.inst_match.
-:- import_module check_hlds.mode_util.
-:- import_module check_hlds.type_util.
-:- import_module hlds.hlds_data.
-:- import_module hlds.hlds_goal.
  :- import_module hlds.hlds_pred.
-:- import_module hlds.hlds_out.
-:- import_module hlds.passes_aux.
-:- import_module hlds.special_pred.
  :- import_module libs.globals.
  :- import_module libs.lp_rational.
  :- import_module libs.options.
-:- import_module libs.rat.
-:- import_module parse_tree.error_util.
  :- import_module parse_tree.mercury_to_mercury.
  :- import_module parse_tree.modules.
  :- import_module parse_tree.prog_data.
@@ -228,7 +218,6 @@
  :- import_module transform_hlds.term_norm.

  :- import_module bool.
-:- import_module char.
  :- import_module int.
  :- import_module map.
  :- import_module set.
Index: compiler/term_constr_pass2.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/term_constr_pass2.m,v
retrieving revision 1.8
diff -u -r1.8 term_constr_pass2.m
--- compiler/term_constr_pass2.m	15 Oct 2006 23:26:54 -0000	1.8
+++ compiler/term_constr_pass2.m	1 Dec 2006 13:26:20 -0000
@@ -49,17 +49,13 @@

  :- implementation.

-:- import_module check_hlds.mode_util.
  :- import_module hlds.hlds_module.
  :- import_module hlds.hlds_out.
  :- import_module hlds.hlds_pred.
  :- import_module libs.compiler_util.
-:- import_module libs.globals.
  :- import_module libs.lp_rational.
-:- import_module libs.options.
  :- import_module libs.polyhedron.
  :- import_module libs.rat.
-:- import_module parse_tree.mercury_to_mercury.
  :- import_module parse_tree.prog_data.
  :- import_module transform_hlds.term_constr_data.
  :- import_module transform_hlds.term_constr_errors.
@@ -73,7 +69,6 @@
  :- import_module maybe.
  :- import_module pair.
  :- import_module set.
-:- import_module string.
  :- 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.10
diff -u -r1.10 term_constr_util.m
--- compiler/term_constr_util.m	16 Aug 2006 01:25:47 -0000	1.10
+++ compiler/term_constr_util.m	1 Dec 2006 13:28:16 -0000
@@ -6,8 +6,8 @@
  % Public License - see the file COPYING in the Mercury distribution.
  %------------------------------------------------------------------------------%
  %
-% File: term_constr_util.m
-% Main author: juliensf
+% File: term_constr_util.m.
+% Main author: juliensf.
  %
  % This module defines some utility predicates used by the termination analyser.
  %
@@ -196,23 +196,17 @@

  :- implementation.

-:- import_module check_hlds.mode_util.
  :- import_module check_hlds.type_util.
-:- import_module hlds.hlds_goal.
  :- import_module hlds.hlds_module.
  :- import_module hlds.hlds_out.
  :- import_module hlds.hlds_pred.
-:- import_module hlds.quantification.
  :- import_module libs.compiler_util.
  :- import_module libs.globals.
  :- import_module libs.options.
  :- import_module libs.rat.
-:- import_module parse_tree.mercury_to_mercury.
-:- import_module parse_tree.prog_type.
  :- import_module transform_hlds.term_constr_errors.
  :- import_module transform_hlds.term_norm.

-:- import_module int.
  :- import_module pair.
  :- import_module set.
  :- import_module std_util.
Index: compiler/term_errors.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/term_errors.m,v
retrieving revision 1.40
diff -u -r1.40 term_errors.m
--- compiler/term_errors.m	31 Jul 2006 08:32:05 -0000	1.40
+++ compiler/term_errors.m	1 Dec 2006 13:28:45 -0000
@@ -160,20 +160,13 @@
  :- implementation.

  :- import_module hlds.hlds_error_util.
-:- import_module hlds.hlds_out.
-:- import_module hlds.passes_aux.
  :- import_module libs.compiler_util.
-:- import_module libs.globals.
-:- import_module libs.options.
  :- import_module parse_tree.error_util.
-:- import_module parse_tree.mercury_to_mercury.
-:- import_module parse_tree.prog_out.
  :- import_module transform_hlds.term_util.

  :- import_module bag.
  :- import_module bool.
  :- import_module int.
-:- import_module map.
  :- import_module maybe.
  :- import_module string.
  :- import_module term.
Index: compiler/term_norm.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/term_norm.m,v
retrieving revision 1.23
diff -u -r1.23 term_norm.m
--- compiler/term_norm.m	1 Nov 2006 06:33:22 -0000	1.23
+++ compiler/term_norm.m	1 Dec 2006 13:29:31 -0000
@@ -21,7 +21,6 @@
  :- import_module libs.globals.
  :- import_module parse_tree.prog_data.

-:- import_module int.
  :- import_module list.

  %-----------------------------------------------------------------------------%
@@ -71,20 +70,15 @@

  :- implementation.

-:- import_module check_hlds.inst_match.
-:- import_module check_hlds.mode_util.
  :- import_module check_hlds.type_util.
  :- import_module hlds.hlds_data.
  :- import_module libs.compiler_util.
-:- import_module libs.options.
-:- import_module parse_tree.prog_out.
  :- import_module parse_tree.prog_type.

-:- import_module assoc_list.
  :- import_module bool.
+:- import_module int.
  :- import_module map.
  :- import_module pair.
-:- import_module string.
  :- import_module svmap.

  %-----------------------------------------------------------------------------%
Index: compiler/term_pass1.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/term_pass1.m,v
retrieving revision 1.31
diff -u -r1.31 term_pass1.m
--- compiler/term_pass1.m	31 Jul 2006 08:32:05 -0000	1.31
+++ compiler/term_pass1.m	1 Dec 2006 13:30:04 -0000
@@ -55,9 +55,6 @@

  :- implementation.

-:- import_module check_hlds.mode_util.
-:- import_module check_hlds.type_util.
-:- import_module hlds.hlds_data.
  :- import_module hlds.hlds_goal.
  :- import_module libs.compiler_util.
  :- import_module libs.lp.
@@ -66,13 +63,10 @@

  :- import_module bag.
  :- import_module bool.
-:- import_module char.
  :- import_module float.
-:- import_module int.
  :- import_module map.
  :- import_module maybe.
  :- import_module set.
-:- import_module string.
  :- import_module svmap.
  :- import_module svset.
  :- import_module svvarset.
Index: compiler/term_pass2.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/term_pass2.m,v
retrieving revision 1.27
diff -u -r1.27 term_pass2.m
--- compiler/term_pass2.m	31 Jul 2006 08:32:05 -0000	1.27
+++ compiler/term_pass2.m	1 Dec 2006 13:30:31 -0000
@@ -41,8 +41,6 @@
  :- implementation.

  :- import_module check_hlds.mode_util.
-:- import_module check_hlds.type_util.
-:- import_module hlds.hlds_goal.
  :- import_module libs.compiler_util.
  :- import_module parse_tree.prog_data.
  :- import_module transform_hlds.term_errors.
@@ -56,7 +54,6 @@
  :- import_module maybe.
  :- import_module pair.
  :- import_module set.
-:- import_module string.
  :- 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.52
diff -u -r1.52 term_traversal.m
--- compiler/term_traversal.m	20 Sep 2006 09:42:14 -0000	1.52
+++ compiler/term_traversal.m	1 Dec 2006 13:30:55 -0000
@@ -112,8 +112,6 @@

  :- implementation.

-:- import_module check_hlds.type_util.
-:- import_module hlds.hlds_data.
  :- import_module libs.compiler_util.
  :- import_module parse_tree.prog_type.

@@ -121,7 +119,6 @@
  :- import_module bool.
  :- import_module int.
  :- import_module map.
-:- import_module string.
  :- import_module svset.

  %-----------------------------------------------------------------------------%
Index: compiler/term_util.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/term_util.m,v
retrieving revision 1.53
diff -u -r1.53 term_util.m
--- compiler/term_util.m	20 Sep 2006 09:42:15 -0000	1.53
+++ compiler/term_util.m	1 Dec 2006 14:22:02 -0000
@@ -28,7 +28,6 @@

  :- import_module bag.
  :- import_module bool.
-:- import_module int.
  :- import_module list.
  :- import_module map.
  :- import_module maybe.
@@ -174,16 +173,10 @@

  :- import_module check_hlds.inst_match.
  :- import_module check_hlds.mode_util.
-:- import_module check_hlds.type_util.
  :- import_module libs.compiler_util.
-:- import_module libs.globals.
-:- import_module libs.options.
-:- import_module parse_tree.prog_out.
  :- import_module parse_tree.prog_type.

-:- import_module assoc_list.
  :- import_module pair.
-:- import_module string.

  %-----------------------------------------------------------------------------%
  %-----------------------------------------------------------------------------%
Index: compiler/termination.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/termination.m,v
retrieving revision 1.70
diff -u -r1.70 termination.m
--- compiler/termination.m	3 Nov 2006 08:31:12 -0000	1.70
+++ compiler/termination.m	1 Dec 2006 14:24:14 -0000
@@ -56,15 +56,9 @@

  :- implementation.

-:- import_module check_hlds.inst_match.
-:- import_module check_hlds.mode_util.
-:- import_module check_hlds.type_util.
-:- import_module hlds.hlds_data.
  :- import_module hlds.hlds_error_util.
  :- import_module hlds.hlds_goal.
-:- import_module hlds.hlds_out.
  :- import_module hlds.passes_aux.
-:- import_module hlds.special_pred.
  :- import_module libs.compiler_util.
  :- import_module libs.globals.
  :- import_module libs.options.
@@ -74,7 +68,6 @@
  :- import_module parse_tree.modules.
  :- import_module parse_tree.prog_data.
  :- import_module parse_tree.prog_out.
-:- import_module parse_tree.prog_util.
  :- import_module transform_hlds.dependency_graph.
  :- import_module transform_hlds.post_term_analysis.
  :- import_module transform_hlds.term_errors.
@@ -83,21 +76,16 @@
  :- import_module transform_hlds.term_pass2.
  :- import_module transform_hlds.term_util.

-:- import_module bag.
  :- import_module bool.
-:- import_module char.
-:- import_module int.
  :- import_module list.
  :- import_module map.
  :- import_module maybe.
  :- import_module pair.
-:- import_module relation.
  :- import_module set.
  :- import_module string.
  :- import_module svmap.
  :- import_module term.
  :- import_module unit.
-:- import_module varset.

  %-----------------------------------------------------------------------------%

Index: compiler/trace_params.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/trace_params.m,v
retrieving revision 1.37
diff -u -r1.37 trace_params.m
--- compiler/trace_params.m	24 Nov 2006 03:48:10 -0000	1.37
+++ compiler/trace_params.m	1 Dec 2006 10:38:38 -0000
@@ -118,7 +118,6 @@

  :- implementation.

-:- import_module hlds.special_pred.
  :- import_module mdbcomp.
  :- import_module mdbcomp.prim_data.

Index: compiler/trailing_analysis.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/trailing_analysis.m,v
retrieving revision 1.22
diff -u -r1.22 trailing_analysis.m
--- compiler/trailing_analysis.m	6 Sep 2006 04:02:56 -0000	1.22
+++ compiler/trailing_analysis.m	1 Dec 2006 13:34:18 -0000
@@ -84,15 +84,11 @@

  :- implementation.

-:- import_module check_hlds.mode_util.
  :- import_module check_hlds.type_util.
  :- import_module hlds.code_model.
  :- import_module hlds.hlds_error_util.
  :- import_module hlds.hlds_goal.
  :- import_module hlds.hlds_pred.
-:- import_module hlds.make_hlds.
-:- import_module hlds.passes_aux.
-:- import_module hlds.special_pred.
  :- import_module libs.compiler_util.
  :- import_module libs.globals.
  :- import_module libs.options.
@@ -102,7 +98,6 @@
  :- import_module parse_tree.modules.
  :- import_module parse_tree.prog_data.
  :- import_module parse_tree.prog_out.
-:- import_module parse_tree.prog_util.
  :- import_module parse_tree.prog_type.
  :- import_module transform_hlds.dependency_graph.
  :- import_module transform_hlds.mmc_analysis.
Index: compiler/trans_opt.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/trans_opt.m,v
retrieving revision 1.43
diff -u -r1.43 trans_opt.m
--- compiler/trans_opt.m	2 Oct 2006 05:21:28 -0000	1.43
+++ compiler/trans_opt.m	1 Dec 2006 13:34:46 -0000
@@ -83,7 +83,6 @@
  :- implementation.

  :- import_module hlds.hlds_pred.
-:- import_module hlds.passes_aux.
  :- import_module libs.globals.
  :- import_module libs.options.
  :- import_module mdbcomp.prim_data.
@@ -107,10 +106,7 @@
  :- import_module list.
  :- import_module map.
  :- import_module pair.
-:- import_module set.
-:- import_module string.
  :- import_module term.
-:- import_module varset.

  %-----------------------------------------------------------------------------%

Index: compiler/transform.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/transform.m,v
retrieving revision 1.27
diff -u -r1.27 transform.m
--- compiler/transform.m	31 Jul 2006 08:32:07 -0000	1.27
+++ compiler/transform.m	1 Dec 2006 13:35:17 -0000
@@ -50,15 +50,9 @@
  :- implementation.

  :- import_module check_hlds.delay_info.
-:- import_module check_hlds.mode_util.
  :- import_module hlds.instmap.
-:- import_module parse_tree.prog_data.

-:- import_module map.
  :- import_module pair.
-:- import_module set.
-:- import_module term.
-:- import_module varset.

  %-----------------------------------------------------------------------------%

Index: compiler/transform_llds.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/transform_llds.m,v
retrieving revision 1.29
diff -u -r1.29 transform_llds.m
--- compiler/transform_llds.m	15 Oct 2006 23:26:54 -0000	1.29
+++ compiler/transform_llds.m	1 Dec 2006 11:15:03 -0000
@@ -37,20 +37,15 @@

  :- import_module hlds.hlds_pred.
  :- import_module backend_libs.builtin_ops.
-:- import_module backend_libs.proc_label.
  :- import_module hlds.code_model.
  :- import_module libs.compiler_util.
  :- import_module libs.globals.
  :- import_module libs.options.
-:- import_module ll_backend.opt_util.
  :- import_module mdbcomp.prim_data.
-:- import_module parse_tree.prog_data.

-:- import_module bool.
  :- import_module counter.
  :- import_module int.
  :- import_module list.
-:- import_module maybe.
  :- import_module pair.
  :- import_module set.
  :- import_module string.
Index: compiler/tupling.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/tupling.m,v
retrieving revision 1.33
diff -u -r1.33 tupling.m
--- compiler/tupling.m	15 Oct 2006 23:26:54 -0000	1.33
+++ compiler/tupling.m	1 Dec 2006 13:35:49 -0000
@@ -100,16 +100,13 @@
  :- import_module backend_libs.interval.
  :- import_module check_hlds.goal_path.
  :- import_module check_hlds.mode_util.
-:- import_module check_hlds.type_util.
  :- import_module hlds.arg_info.
-:- import_module hlds.code_model.
  :- import_module hlds.goal_util.
  :- import_module hlds.hlds_goal.
  :- import_module hlds.hlds_llds.
  :- import_module hlds.hlds_out.
  :- import_module hlds.hlds_pred.
  :- import_module hlds.hlds_rtti.
-:- import_module hlds.instmap.
  :- import_module hlds.quantification.
  :- import_module libs.compiler_util.
  :- import_module libs.globals.
@@ -141,7 +138,6 @@
  :- import_module set.
  :- import_module string.
  :- import_module svmap.
-:- import_module svset.
  :- import_module svvarset.
  :- import_module term.
  :- import_module unit.
Index: compiler/type_util.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/type_util.m,v
retrieving revision 1.174
diff -u -r1.174 type_util.m
--- compiler/type_util.m	1 Nov 2006 06:33:22 -0000	1.174
+++ compiler/type_util.m	1 Dec 2006 08:08:20 -0000
@@ -309,12 +309,10 @@
  :- import_module parse_tree.prog_type.
  :- import_module parse_tree.prog_type_subst.

-:- import_module assoc_list.
  :- import_module bool.
  :- import_module char.
  :- import_module int.
  :- import_module map.
-:- import_module pair.
  :- import_module term.

  %-----------------------------------------------------------------------------%
Index: compiler/typecheck.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/typecheck.m,v
retrieving revision 1.412
diff -u -r1.412 typecheck.m
--- compiler/typecheck.m	28 Nov 2006 06:17:12 -0000	1.412
+++ compiler/typecheck.m	1 Dec 2006 08:08:31 -0000
@@ -132,7 +132,6 @@
  :- import_module parse_tree.prog_type_subst.
  :- import_module parse_tree.prog_util.

-:- import_module assoc_list.
  :- import_module int.
  :- import_module map.
  :- import_module maybe.
Index: compiler/typeclasses.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/typeclasses.m,v
retrieving revision 1.18
diff -u -r1.18 typeclasses.m
--- compiler/typeclasses.m	21 Nov 2006 11:47:45 -0000	1.18
+++ compiler/typeclasses.m	1 Dec 2006 08:09:08 -0000
@@ -24,6 +24,8 @@
  :- import_module parse_tree.
  :- import_module parse_tree.prog_data.

+%-----------------------------------------------------------------------------%
+
      % perform_context_reduction(OrigTypeAssignSet, !Info) is true
      % iff either
      % (a) !:Info is the typecheck_info that results from performing
@@ -98,7 +100,6 @@
  :- import_module list.
  :- import_module map.
  :- import_module multi_map.
-:- import_module pair.
  :- import_module set.
  :- import_module svmap.
  :- import_module term.
Index: compiler/unify_gen.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/unify_gen.m,v
retrieving revision 1.173
diff -u -r1.173 unify_gen.m
--- compiler/unify_gen.m	15 Oct 2006 23:26:55 -0000	1.173
+++ compiler/unify_gen.m	1 Dec 2006 11:15:34 -0000
@@ -50,7 +50,6 @@
  :- import_module backend_libs.type_class_info.
  :- import_module check_hlds.mode_util.
  :- import_module check_hlds.type_util.
-:- import_module hlds.arg_info.
  :- import_module hlds.hlds_data.
  :- import_module hlds.hlds_module.
  :- import_module hlds.hlds_out.
@@ -63,11 +62,9 @@
  :- import_module ll_backend.code_util.
  :- import_module ll_backend.continuation_info.
  :- import_module ll_backend.layout.
-:- import_module ll_backend.llds_out.
  :- import_module ll_backend.stack_layout.
  :- import_module mdbcomp.prim_data.
  :- import_module parse_tree.prog_data.
-:- import_module parse_tree.prog_out.
  :- import_module parse_tree.prog_type.

  :- import_module assoc_list.
Index: compiler/unify_proc.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/unify_proc.m,v
retrieving revision 1.178
diff -u -r1.178 unify_proc.m
--- compiler/unify_proc.m	1 Nov 2006 06:33:28 -0000	1.178
+++ compiler/unify_proc.m	1 Dec 2006 08:09:30 -0000
@@ -165,7 +165,6 @@
  :- import_module parse_tree.prog_util.
  :- import_module recompilation.

-:- import_module assoc_list.
  :- import_module int.
  :- import_module map.
  :- import_module queue.
Index: compiler/unneeded_code.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/unneeded_code.m,v
retrieving revision 1.38
diff -u -r1.38 unneeded_code.m
--- compiler/unneeded_code.m	15 Oct 2006 23:26:56 -0000	1.38
+++ compiler/unneeded_code.m	1 Dec 2006 13:36:08 -0000
@@ -82,7 +82,6 @@
  :- import_module hlds.hlds_goal.
  :- import_module hlds.hlds_out.
  :- import_module hlds.instmap.
-:- import_module hlds.passes_aux.
  :- import_module hlds.quantification.
  :- import_module libs.compiler_util.
  :- import_module libs.globals.
Index: compiler/untupling.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/untupling.m,v
retrieving revision 1.23
diff -u -r1.23 untupling.m
--- compiler/untupling.m	1 Nov 2006 06:33:29 -0000	1.23
+++ compiler/untupling.m	1 Dec 2006 13:36:31 -0000
@@ -102,7 +102,6 @@

  :- implementation.

-:- import_module check_hlds.det_analysis.
  :- import_module check_hlds.mode_util.
  :- import_module hlds.hlds_data.
  :- import_module hlds.hlds_goal.
Index: compiler/unused_args.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/unused_args.m,v
retrieving revision 1.138
diff -u -r1.138 unused_args.m
--- compiler/unused_args.m	13 Oct 2006 04:52:27 -0000	1.138
+++ compiler/unused_args.m	1 Dec 2006 13:37:10 -0000
@@ -79,20 +79,15 @@

  :- import_module check_hlds.inst_match.
  :- import_module check_hlds.mode_util.
-:- import_module check_hlds.polymorphism.
  :- import_module check_hlds.type_util.
  :- import_module hlds.goal_util.
  :- import_module hlds.hlds_data.
  :- import_module hlds.hlds_goal.
-:- import_module hlds.hlds_out.
  :- import_module hlds.hlds_pred.
  :- import_module hlds.hlds_rtti.
  :- import_module hlds.instmap.
-:- import_module hlds.make_hlds.
-:- import_module hlds.passes_aux.
  :- import_module hlds.pred_table.
  :- import_module hlds.quantification.
-:- import_module hlds.special_pred.
  :- import_module libs.compiler_util.
  :- import_module libs.globals.
  :- import_module libs.options.
@@ -106,9 +101,7 @@
  :- import_module parse_tree.prog_util.
  :- import_module transform_hlds.mmc_analysis.

-:- import_module assoc_list.
  :- import_module bool.
-:- import_module char.
  :- import_module int.
  :- import_module list.
  :- import_module map.
Index: compiler/unused_imports.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/unused_imports.m,v
retrieving revision 1.5
diff -u -r1.5 unused_imports.m
--- compiler/unused_imports.m	1 Nov 2006 06:33:29 -0000	1.5
+++ compiler/unused_imports.m	1 Dec 2006 08:09:59 -0000
@@ -45,16 +45,11 @@
  :- import_module hlds.hlds_data.
  :- import_module hlds.hlds_goal.
  :- import_module hlds.hlds_pred.
-
  :- import_module mdbcomp.
  :- import_module mdbcomp.prim_data.
-
  :- import_module parse_tree.modules.
  :- import_module parse_tree.prog_data.

-:- import_module libs.
-:- import_module libs.compiler_util.
-
  :- import_module bool.
  :- import_module map.
  :- import_module maybe.
Index: compiler/var_locn.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/var_locn.m,v
retrieving revision 1.46
diff -u -r1.46 var_locn.m
--- compiler/var_locn.m	15 Oct 2006 23:26:56 -0000	1.46
+++ compiler/var_locn.m	1 Dec 2006 11:15:59 -0000
@@ -362,13 +362,11 @@

  :- import_module check_hlds.type_util.
  :- import_module libs.compiler_util.
-:- import_module libs.globals.
  :- import_module libs.options.
  :- import_module libs.tree.
  :- import_module ll_backend.code_util.
  :- import_module ll_backend.exprn_aux.

-:- import_module bag.
  :- import_module getopt_io.
  :- import_module int.
  :- import_module pair.
Index: compiler/xml_documentation.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/xml_documentation.m,v
retrieving revision 1.9
diff -u -r1.9 xml_documentation.m
--- compiler/xml_documentation.m	23 Nov 2006 06:10:50 -0000	1.9
+++ compiler/xml_documentation.m	1 Dec 2006 08:10:47 -0000
@@ -6,7 +6,7 @@
  % Public License - see the file COPYING in the Mercury distribution.
  %-----------------------------------------------------------------------------%
  %
-% Module: xml_documentation.m
+% Module: xml_documentation.m.
  % Main authors: petdr.
  %
  % This module outputs an XML representation of a module,
@@ -16,7 +16,6 @@
  %-----------------------------------------------------------------------------%

  :- module check_hlds.xml_documentation.
-
  :- interface.

  :- import_module hlds.
@@ -46,7 +45,6 @@
  :- import_module parse_tree.error_util.
  :- import_module parse_tree.modules.
  :- import_module parse_tree.prog_data.
-:- import_module parse_tree.prog_item.
  :- import_module parse_tree.source_file_map.

  :- import_module bool.
@@ -55,7 +53,6 @@
  :- import_module list.
  :- import_module map.
  :- import_module maybe.
-:- import_module pair.
  :- import_module set.
  :- import_module string.
  :- import_module svmap.
Index: deep_profiler/Mercury.options
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/deep_profiler/Mercury.options,v
retrieving revision 1.8
diff -u -r1.8 Mercury.options
--- deep_profiler/Mercury.options	8 Nov 2005 08:12:38 -0000	1.8
+++ deep_profiler/Mercury.options	1 Dec 2006 08:05:35 -0000
@@ -35,3 +35,8 @@
  MCFLAGS-read_profile = 	--no-optimize-duplicate-calls
  MCFLAGS-startup = 	--no-optimize-duplicate-calls
  MCFLAGS-top_procs = 	--no-optimize-duplicate-calls
+
+MCFLAGS-canonical = --no-warn-unused-imports
+MCFLAGS-mdprof_test = --no-warn-unused-imports
+MCFLAGS-mdprof_dump = --no-warn-unused-imports
+MCFLAGS-mdprof_feedback = --no-warn-unused-imports
Index: deep_profiler/array_util.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/deep_profiler/array_util.m,v
retrieving revision 1.9
diff -u -r1.9 array_util.m
--- deep_profiler/array_util.m	9 Mar 2006 04:56:39 -0000	1.9
+++ deep_profiler/array_util.m	1 Dec 2006 07:58:12 -0000
@@ -121,7 +121,6 @@
  :- implementation.

  :- import_module int.
-:- import_module string.

  %-----------------------------------------------------------------------------%

Index: deep_profiler/canonical.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/deep_profiler/canonical.m,v
retrieving revision 1.13
diff -u -r1.13 canonical.m
--- deep_profiler/canonical.m	12 Oct 2006 06:30:21 -0000	1.13
+++ deep_profiler/canonical.m	1 Dec 2006 07:59:41 -0000
@@ -6,13 +6,15 @@
  % Public License - see the file COPYING in the Mercury distribution.
  %-----------------------------------------------------------------------------%
  %
+% File: canonical.m.
  % Authors: conway, zs.
  %
  % This module contains code for recursively merging sets of ProcDynamic and
  % CallSiteDynamic nodes.
+%
+%-----------------------------------------------------------------------------%

  :- module canonical.
-
  :- interface.

  :- import_module profile.
Index: deep_profiler/dense_bitset.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/deep_profiler/dense_bitset.m,v
retrieving revision 1.4
diff -u -r1.4 dense_bitset.m
--- deep_profiler/dense_bitset.m	8 Nov 2005 08:12:38 -0000	1.4
+++ deep_profiler/dense_bitset.m	1 Dec 2006 07:58:37 -0000
@@ -17,11 +17,9 @@
  %-----------------------------------------------------------------------------%

  :- module dense_bitset.
-
  :- interface.

  :- import_module array.
-:- import_module int.

  %-----------------------------------------------------------------------------%

@@ -62,6 +60,7 @@

  :- implementation.

+:- import_module int.
  :- import_module list.
  :- import_module require.

Index: deep_profiler/dump.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/deep_profiler/dump.m,v
retrieving revision 1.8
diff -u -r1.8 dump.m
--- deep_profiler/dump.m	12 Oct 2006 06:30:21 -0000	1.8
+++ deep_profiler/dump.m	1 Dec 2006 07:59:04 -0000
@@ -6,13 +6,15 @@
  % Public License - see the file COPYING in the Mercury distribution.
  %-----------------------------------------------------------------------------%
  %
+% File: dump.m.
  % Authors: juliensf, zs.
  %
  % This module contains code for dumping out the deep profiler's data structures
  % for use in debugging the deep profiler.
+%
+%-----------------------------------------------------------------------------%

  :- module dump.
-
  :- interface.

  :- import_module profile.
@@ -60,7 +62,6 @@
  :- import_module pair.
  :- import_module require.
  :- import_module set.
-:- import_module std_util.
  :- import_module string.
  :- import_module svset.

Index: deep_profiler/exclude.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/deep_profiler/exclude.m,v
retrieving revision 1.10
diff -u -r1.10 exclude.m
--- deep_profiler/exclude.m	12 Oct 2006 06:30:22 -0000	1.10
+++ deep_profiler/exclude.m	1 Dec 2006 08:00:22 -0000
@@ -6,6 +6,7 @@
  % Public License - see the file COPYING in the Mercury distribution.
  %-----------------------------------------------------------------------------%
  %
+% File: exclude.m.
  % Author: zs.
  %
  % This module handles contour exclusion.
@@ -40,7 +41,6 @@
  %-----------------------------------------------------------------------------%

  :- module exclude.
-
  :- interface.

  :- import_module profile.
@@ -67,7 +67,6 @@
  :- import_module char.
  :- import_module list.
  :- import_module map.
-:- import_module require.
  :- import_module set.
  :- import_module string.

Index: deep_profiler/html_format.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/deep_profiler/html_format.m,v
retrieving revision 1.15
diff -u -r1.15 html_format.m
--- deep_profiler/html_format.m	12 Oct 2006 06:30:22 -0000	1.15
+++ deep_profiler/html_format.m	1 Dec 2006 08:00:50 -0000
@@ -6,6 +6,7 @@
  % Public License - see the file COPYING in the Mercury distribution.
  %-----------------------------------------------------------------------------%
  %
+% File: html_format.m.
  % Author: zs.
  %
  % This module contains code that sets the format of the HTML tables
@@ -14,7 +15,6 @@
  %-----------------------------------------------------------------------------%

  :- module html_format.
-
  :- interface.

  :- import_module interface.
@@ -145,7 +145,6 @@
  :- import_module char.
  :- import_module float.
  :- import_module int.
-:- import_module map.
  :- import_module maybe.
  :- import_module require.
  :- import_module string.
Index: deep_profiler/interface.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/deep_profiler/interface.m,v
retrieving revision 1.15
diff -u -r1.15 interface.m
--- deep_profiler/interface.m	12 Oct 2006 06:30:22 -0000	1.15
+++ deep_profiler/interface.m	1 Dec 2006 08:01:10 -0000
@@ -46,7 +46,6 @@
  %-----------------------------------------------------------------------------%

  :- module interface.
-
  :- interface.

  :- import_module profile.
@@ -334,7 +333,6 @@
  :- import_module int.
  :- import_module list.
  :- import_module require.
-:- import_module set.
  :- import_module string.

  %-----------------------------------------------------------------------------%
Index: deep_profiler/mdprof_cgi.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/deep_profiler/mdprof_cgi.m,v
retrieving revision 1.16
diff -u -r1.16 mdprof_cgi.m
--- deep_profiler/mdprof_cgi.m	12 Oct 2006 06:30:22 -0000	1.16
+++ deep_profiler/mdprof_cgi.m	1 Dec 2006 08:01:38 -0000
@@ -5,7 +5,8 @@
  % This file may only be copied under the terms of the GNU General
  % Public License - see the file COPYING in the Mercury distribution.
  %-----------------------------------------------------------------------------%
-%
+% 
+% File: mdprof_cgi.m.
  % Author of initial version: conway.
  % Author of this version: zs.
  %
@@ -15,7 +16,6 @@
  %-----------------------------------------------------------------------------%

  :- module mdprof_cgi.
-
  :- interface.

  :- import_module io.
@@ -37,10 +37,8 @@
  :- import_module timeout.
  :- import_module util.

-:- import_module array.
  :- import_module bool.
  :- import_module char.
-:- import_module exception.
  :- import_module getopt.
  :- import_module int.
  :- import_module library.
@@ -48,7 +46,6 @@
  :- import_module map.
  :- import_module maybe.
  :- import_module require.
-:- import_module set.
  :- import_module string.

  %-----------------------------------------------------------------------------%
Index: deep_profiler/mdprof_test.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/deep_profiler/mdprof_test.m,v
retrieving revision 1.13
diff -u -r1.13 mdprof_test.m
--- deep_profiler/mdprof_test.m	12 Oct 2006 06:30:22 -0000	1.13
+++ deep_profiler/mdprof_test.m	1 Dec 2006 08:04:23 -0000
@@ -5,14 +5,14 @@
  % This file may only be copied under the terms of the GNU General
  % Public License - see the file COPYING in the Mercury distribution.
  %-----------------------------------------------------------------------------%
-%
+% 
+% File: mdprof_test.m.
  % Author: zs.
  %
  % This file contains a tool for testing the behavior of the deep profiler.
  %-----------------------------------------------------------------------------%

  :- module mdprof_test.
-
  :- interface.

  :- import_module io.
Index: deep_profiler/query.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/deep_profiler/query.m,v
retrieving revision 1.14
diff -u -r1.14 query.m
--- deep_profiler/query.m	12 Oct 2006 06:30:23 -0000	1.14
+++ deep_profiler/query.m	1 Dec 2006 08:02:12 -0000
@@ -6,6 +6,7 @@
  % Public License - see the file COPYING in the Mercury distribution.
  %-----------------------------------------------------------------------------%
  %
+% File: query.m.
  % Authors: conway, zs.
  %
  % This module contains the top level predicates for servicing individual
@@ -13,7 +14,6 @@
  %-----------------------------------------------------------------------------%

  :- module query.
-
  :- interface.

  :- import_module profile.
@@ -39,16 +39,13 @@
  :- import_module array.
  :- import_module assoc_list.
  :- import_module bool.
-:- import_module char.
  :- import_module exception.
-:- import_module float.
  :- 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 univ.
  :- import_module unit.
Index: deep_profiler/startup.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/deep_profiler/startup.m,v
retrieving revision 1.14
diff -u -r1.14 startup.m
--- deep_profiler/startup.m	12 Oct 2006 06:30:23 -0000	1.14
+++ deep_profiler/startup.m	1 Dec 2006 08:02:43 -0000
@@ -5,7 +5,8 @@
  % This file may only be copied under the terms of the GNU General
  % Public License - see the file COPYING in the Mercury distribution.
  %-----------------------------------------------------------------------------%
-%
+% 
+% File: startup.m.
  % Authors: conway, zs.
  %
  % This module contains the code for turning the raw list of nodes read in by
@@ -16,7 +17,6 @@
  %-----------------------------------------------------------------------------%

  :- module startup.
-
  :- interface.

  :- import_module profile.
@@ -46,11 +46,9 @@
  :- import_module read_profile.

  :- import_module array.
-:- import_module assoc_list.
  :- import_module int.
  :- import_module map.
  :- import_module require.
-:- import_module set.
  :- import_module string.
  :- import_module svarray.
  :- import_module svmap.
Index: deep_profiler/timeout.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/deep_profiler/timeout.m,v
retrieving revision 1.17
diff -u -r1.17 timeout.m
--- deep_profiler/timeout.m	12 Oct 2006 06:36:38 -0000	1.17
+++ deep_profiler/timeout.m	1 Dec 2006 08:03:09 -0000
@@ -5,7 +5,8 @@
  % This file may only be copied under the terms of the GNU General
  % Public License - see the file COPYING in the Mercury distribution.
  %-----------------------------------------------------------------------------%
-%
+% 
+% File: timeout.m.
  % Author: zs.
  %
  % This module implements timeouts and cleanup for the deep profiler.
@@ -25,7 +26,6 @@
  %-----------------------------------------------------------------------------%

  :- module timeout.
-
  :- interface.

  :- import_module bool.
@@ -87,9 +87,6 @@

  :- implementation.

-:- import_module int.
-:- import_module string.
-
  %-----------------------------------------------------------------------------%

  :- pragma foreign_decl("C",
Index: deep_profiler/top_procs.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/deep_profiler/top_procs.m,v
retrieving revision 1.9
diff -u -r1.9 top_procs.m
--- deep_profiler/top_procs.m	12 Oct 2006 06:30:23 -0000	1.9
+++ deep_profiler/top_procs.m	1 Dec 2006 08:03:28 -0000
@@ -5,7 +5,8 @@
  % This file may only be copied under the terms of the GNU General
  % Public License - see the file COPYING in the Mercury distribution.
  %-----------------------------------------------------------------------------%
-%
+% 
+% File: top_procs.m.
  % Author: zs.
  %
  % This module contains code to find the top procedures by several criteria.
@@ -15,7 +16,6 @@
  %-----------------------------------------------------------------------------%

  :- module top_procs.
-
  :- interface.

  :- import_module interface.
@@ -62,7 +62,6 @@
  :- import_module bool.
  :- import_module float.
  :- import_module int.
-:- import_module require.

  %-----------------------------------------------------------------------------%

Index: deep_profiler/util.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/deep_profiler/util.m,v
retrieving revision 1.6
diff -u -r1.6 util.m
--- deep_profiler/util.m	9 Mar 2006 04:56:41 -0000	1.6
+++ deep_profiler/util.m	1 Dec 2006 08:03:46 -0000
@@ -5,14 +5,14 @@
  % This file may only be copied under the terms of the GNU General
  % Public License - see the file COPYING in the Mercury distribution.
  %-----------------------------------------------------------------------------%
-%
+% 
+% File: util.m.
  % Authors: conway, zs.
  %
  % This module defines utility predicates for the CGI program.
  %-----------------------------------------------------------------------------%

  :- module util.
-
  :- interface.

  :- import_module char.
@@ -32,7 +32,6 @@

  :- implementation.

-:- import_module require.
  :- import_module string.

  %-----------------------------------------------------------------------------%
Index: library/Mercury.options
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/library/Mercury.options,v
retrieving revision 1.16
diff -u -r1.16 Mercury.options
--- library/Mercury.options	9 Nov 2006 00:47:25 -0000	1.16
+++ library/Mercury.options	1 Dec 2006 07:23:17 -0000
@@ -46,3 +46,11 @@
  #
  MCFLAGS-array += --no-warn-insts-without-matching-type
  MCFLAGS-io += --no-warn-insts-without-matching-type
+
+# Avoid warnings about unused imports.
+#
+MCFLAGS-builtin += --no-warn-unused-imports
+MCFLAGS-construct += --no-warn-unused-imports
+MCFLAGS-deconstruct += --no-warn-unused-imports
+MCFLAGS-library += --no-warn-unused-imports
+MCFLAGS-mer_std += --no-warn-unused-imports
Index: library/assoc_list.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/library/assoc_list.m,v
retrieving revision 1.24
diff -u -r1.24 assoc_list.m
--- library/assoc_list.m	23 Oct 2006 00:32:55 -0000	1.24
+++ library/assoc_list.m	1 Dec 2006 07:13:00 -0000
@@ -91,10 +91,11 @@

  :- implementation.

-:- import_module type_desc.
  :- import_module require.
-:- import_module set.
  :- import_module string.
+:- import_module type_desc.
+
+%-----------------------------------------------------------------------------%

  assoc_list.reverse_members([], []).
  assoc_list.reverse_members([K - V | KVs], [V - K | VKs]) :-
Index: library/lexer.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/library/lexer.m,v
retrieving revision 1.50
diff -u -r1.50 lexer.m
--- library/lexer.m	23 Oct 2006 00:32:58 -0000	1.50
+++ library/lexer.m	1 Dec 2006 07:14:37 -0000
@@ -120,7 +120,6 @@
  :- import_module list.
  :- import_module require.
  :- import_module string.
-:- import_module term.

  % Note that there are two implementations of most predicates here:
  % one which deals with strings, the other that deals with io.states.
Index: library/relation.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/library/relation.m,v
retrieving revision 1.43
diff -u -r1.43 relation.m
--- library/relation.m	24 Oct 2006 02:59:46 -0000	1.43
+++ library/relation.m	1 Dec 2006 07:20:47 -0000
@@ -312,7 +312,6 @@
  :- import_module pair.
  :- import_module queue.
  :- import_module require.
-:- import_module stack.

  %------------------------------------------------------------------------------%

Index: library/set.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/library/set.m,v
retrieving revision 1.79
diff -u -r1.79 set.m
--- library/set.m	23 Oct 2006 00:32:59 -0000	1.79
+++ library/set.m	1 Dec 2006 07:15:05 -0000
@@ -341,7 +341,6 @@
  :- implementation.

  :- import_module set_ordlist.
-:- import_module set_unordlist.

  :- type set(T) ==   set_ordlist(T).

Index: mdbcomp/Mercury.options
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/mdbcomp/Mercury.options,v
retrieving revision 1.1
diff -u -r1.1 Mercury.options
--- mdbcomp/Mercury.options	28 Jan 2005 08:04:39 -0000	1.1
+++ mdbcomp/Mercury.options	1 Dec 2006 07:26:46 -0000
@@ -6,4 +6,4 @@
  # Mercury.options - module-specific flags for Mmake and `mmc --make'.
  #-----------------------------------------------------------------------------#

-MCFLAGS-mer_mdbcomp = --no-warn-nothing-exported
+MCFLAGS-mer_mdbcomp = --no-warn-nothing-exported --no-warn-unused-imports
Index: mdbcomp/rtti_access.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/mdbcomp/rtti_access.m,v
retrieving revision 1.8
diff -u -r1.8 rtti_access.m
--- mdbcomp/rtti_access.m	29 Nov 2006 05:18:19 -0000	1.8
+++ mdbcomp/rtti_access.m	1 Dec 2006 07:25:03 -0000
@@ -11,6 +11,8 @@
  %
  % This module contains an interface to the label_layout and proc_layout
  % types which are used in the C backend of the debugger.
+%
+%-----------------------------------------------------------------------------%

  :- module mdbcomp.rtti_access.
  :- interface.
@@ -64,11 +66,11 @@
  :- func get_all_modes_for_layout(proc_layout) = list(proc_layout).

  %-----------------------------------------------------------------------------%
+%-----------------------------------------------------------------------------%

  :- implementation.

  :- import_module require.
-:- import_module string.

  :- pragma foreign_type("C", label_layout, "const MR_LabelLayout *",
      [can_pass_as_mercury_type, stable]).
Index: mdbcomp/slice_and_dice.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/mdbcomp/slice_and_dice.m,v
retrieving revision 1.10
diff -u -r1.10 slice_and_dice.m
--- mdbcomp/slice_and_dice.m	2 Oct 2006 05:21:38 -0000	1.10
+++ mdbcomp/slice_and_dice.m	1 Dec 2006 07:25:53 -0000
@@ -12,9 +12,10 @@
  % This module contains code for generating and manipulating slices and dices.
  % A dice is the difference between one or more passing test runs
  % and one (or more, but that is not yet implemented) failing test runs.
+%
+%-----------------------------------------------------------------------------%

  :- module mdbcomp.slice_and_dice.
-
  :- interface.

  :- import_module mdbcomp.prim_data.
@@ -174,9 +175,6 @@
  :- import_module mdbcomp.program_representation.
  :- import_module mdbcomp.rtti_access.

-:- import_module assoc_list.
-:- import_module bool.
-:- import_module char.
  :- import_module float.
  :- import_module int.
  :- import_module list.
Index: mdbcomp/trace_counts.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/mdbcomp/trace_counts.m,v
retrieving revision 1.16
diff -u -r1.16 trace_counts.m
--- mdbcomp/trace_counts.m	24 Nov 2006 03:48:17 -0000	1.16
+++ mdbcomp/trace_counts.m	1 Dec 2006 07:26:15 -0000
@@ -5,14 +5,14 @@
  % This file may only be copied under the terms of the GNU General
  % Public License - see the file COPYING in the Mercury distribution.
  %-----------------------------------------------------------------------------%
-
+%
  % File: trace_counts.m.
  % Main author: wangp.
  % Modifications by zs and maclarty.
-
+%
  % This module defines predicates to read in the execution trace summaries
  % generated by programs compiled using the compiler's tracing options.
-
+%
  %-----------------------------------------------------------------------------%

  :- module mdbcomp.trace_counts.
@@ -185,7 +185,6 @@

  :- implementation.

-:- import_module char.
  :- import_module exception.
  :- import_module int.
  :- import_module io.
Index: profiler/call_graph.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/profiler/call_graph.m,v
retrieving revision 1.13
diff -u -r1.13 call_graph.m
--- profiler/call_graph.m	10 Nov 2006 03:26:26 -0000	1.13
+++ profiler/call_graph.m	1 Dec 2006 07:51:22 -0000
@@ -21,7 +21,6 @@
  :- import_module io.
  :- import_module list.
  :- import_module relation.
-:- import_module string.

  %-----------------------------------------------------------------------------%

@@ -40,7 +39,6 @@

  :- import_module bool.
  :- import_module maybe.
-:- import_module require.
  :- import_module svrelation.

  %-----------------------------------------------------------------------------%
Index: profiler/demangle.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/profiler/demangle.m,v
retrieving revision 1.24
diff -u -r1.24 demangle.m
--- profiler/demangle.m	10 Nov 2006 03:26:26 -0000	1.24
+++ profiler/demangle.m	1 Dec 2006 07:50:36 -0000
@@ -6,8 +6,8 @@
  % Public License - see the file COPYING in the Mercury distribution.
  %-----------------------------------------------------------------------------%
  %
-% File: demangle.m
-% Author: fjh
+% File: demangle.m.
+% Author: fjh.
  %
  % A Mercury symbol demangler. This is used to convert symbol names back
  % into a form that users can understand.
@@ -20,8 +20,6 @@
  :- module demangle.
  :- interface.

-:- import_module string.
-
  %-----------------------------------------------------------------------------%

  :- pred demangle(string::in, string::out) is det.
@@ -36,8 +34,8 @@
  :- import_module int.
  :- import_module list.
  :- import_module maybe.
+:- import_module string.
  :- import_module pair.
-:- import_module require.

  %-----------------------------------------------------------------------------%

Index: profiler/generate_output.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/profiler/generate_output.m,v
retrieving revision 1.24
diff -u -r1.24 generate_output.m
--- profiler/generate_output.m	10 Nov 2006 03:26:27 -0000	1.24
+++ profiler/generate_output.m	1 Dec 2006 07:52:29 -0000
@@ -15,17 +15,13 @@
  %-----------------------------------------------------------------------------%

  :- module generate_output.
-
  :- interface.

  :- import_module output_prof_info.
  :- import_module prof_info.

-:- import_module float.
-:- import_module int.
  :- import_module io.
  :- import_module map.
-:- import_module string.

  %-----------------------------------------------------------------------------%

@@ -43,9 +39,11 @@
  :- import_module options.

  :- import_module bool.
+:- import_module float.
+:- import_module int.
  :- import_module list.
  :- import_module rbtree.
-:- import_module relation.
+:- import_module string.
  :- import_module svmap.

  %-----------------------------------------------------------------------------%
Index: profiler/mercury_profile.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/profiler/mercury_profile.m,v
retrieving revision 1.34
diff -u -r1.34 mercury_profile.m
--- profiler/mercury_profile.m	10 Nov 2006 03:26:27 -0000	1.34
+++ profiler/mercury_profile.m	1 Dec 2006 07:56:35 -0000
@@ -20,7 +20,6 @@
  %-----------------------------------------------------------------------------%

  :- module mercury_profile.
-
  :- interface.

  :- import_module io.
@@ -38,8 +37,6 @@
  :- import_module options.
  :- import_module output.
  :- import_module process_file.
-:- import_module prof_debug.
-:- import_module prof_info.
  :- import_module propagate.

  :- import_module bool.
@@ -47,8 +44,6 @@
  :- import_module library.
  :- import_module list.
  :- import_module maybe.
-:- import_module relation.
-:- import_module string.

  %-----------------------------------------------------------------------------%

Index: profiler/options.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/profiler/options.m,v
retrieving revision 1.21
diff -u -r1.21 options.m
--- profiler/options.m	10 Nov 2006 03:26:27 -0000	1.21
+++ profiler/options.m	1 Dec 2006 07:50:47 -0000
@@ -21,7 +21,6 @@
  :- import_module bool.
  :- import_module getopt.
  :- import_module io.
-:- import_module string.

  %-----------------------------------------------------------------------------%

Index: profiler/output.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/profiler/output.m,v
retrieving revision 1.25
diff -u -r1.25 output.m
--- profiler/output.m	10 Nov 2006 03:26:27 -0000	1.25
+++ profiler/output.m	1 Dec 2006 07:57:06 -0000
@@ -19,10 +19,8 @@

  :- import_module output_prof_info.

-:- import_module int.
  :- import_module io.
  :- import_module map.
-:- import_module string.

  %-----------------------------------------------------------------------------%

@@ -41,9 +39,11 @@
  :- import_module assoc_list.
  :- import_module bool.
  :- import_module float.
+:- import_module int.
  :- import_module list.
  :- import_module pair.
  :- import_module require.
+:- import_module string.

  %-----------------------------------------------------------------------------%

Index: profiler/output_prof_info.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/profiler/output_prof_info.m,v
retrieving revision 1.9
diff -u -r1.9 output_prof_info.m
--- profiler/output_prof_info.m	10 Nov 2006 03:26:27 -0000	1.9
+++ profiler/output_prof_info.m	1 Dec 2006 07:51:03 -0000
@@ -21,11 +21,8 @@

  :- interface.

-:- import_module float.
-:- import_module int.
  :- import_module list.
  :- import_module map.
-:- import_module string.

  %-----------------------------------------------------------------------------%

Index: profiler/prof_debug.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/profiler/prof_debug.m,v
retrieving revision 1.11
diff -u -r1.11 prof_debug.m
--- profiler/prof_debug.m	10 Nov 2006 03:26:27 -0000	1.11
+++ profiler/prof_debug.m	1 Dec 2006 07:53:33 -0000
@@ -21,7 +21,8 @@
  :- import_module io.
  :- import_module list.
  :- import_module set.
-:- import_module string.
+
+%-----------------------------------------------------------------------------%

      % output_cliques:
      %
Index: profiler/prof_info.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/profiler/prof_info.m,v
retrieving revision 1.15
diff -u -r1.15 prof_info.m
--- profiler/prof_info.m	10 Nov 2006 03:26:28 -0000	1.15
+++ profiler/prof_info.m	1 Dec 2006 07:53:18 -0000
@@ -18,7 +18,6 @@
  %-----------------------------------------------------------------------------%

  :- module prof_info.
-
  :- interface.

  :- import_module list.
@@ -166,7 +165,8 @@
  %-----------------------------------------------------------------------------%

  :- implementation.
-:- import_module require, std_util.
+
+:- import_module require.

  :- type prof
      --->    prof(
Index: profiler/read.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/profiler/read.m,v
retrieving revision 1.15
diff -u -r1.15 read.m
--- profiler/read.m	10 Nov 2006 03:26:28 -0000	1.15
+++ profiler/read.m	1 Dec 2006 07:57:19 -0000
@@ -19,10 +19,8 @@

  :- import_module globals.

-:- import_module int.
  :- import_module io.
  :- import_module maybe.
-:- import_module string.

  %-----------------------------------------------------------------------------%

@@ -51,9 +49,8 @@
  :- import_module options.

  :- import_module bool.
-:- import_module char.
-:- import_module list.
  :- import_module require.
+:- import_module string.

  %-----------------------------------------------------------------------------%

Index: slice/mtc_diff.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/slice/mtc_diff.m,v
retrieving revision 1.2
diff -u -r1.2 mtc_diff.m
--- slice/mtc_diff.m	2 Oct 2006 05:21:42 -0000	1.2
+++ slice/mtc_diff.m	1 Dec 2006 07:47:51 -0000
@@ -6,14 +6,14 @@
  % Public License - see the file COPYING in the Mercury distribution.
  %-----------------------------------------------------------------------------%
  %
-% Tool to take the difference of two trace counts.
-%
+% File: mtc_diff.m.
  % Author: Zoltan Somogyi.
  %
+% A tool to take the difference of two trace counts.
+%
  %-----------------------------------------------------------------------------%

  :- module mtc_diff.
-
  :- interface.

  :- import_module io.
@@ -28,15 +28,12 @@
  :- import_module mdbcomp.
  :- import_module mdbcomp.trace_counts.

-:- import_module assoc_list.
-:- import_module bool.
  :- import_module getopt.
-:- import_module int.
  :- import_module list.
  :- import_module map.
-:- import_module require.
  :- import_module string.
-:- import_module std_util.
+
+%-----------------------------------------------------------------------------%

  main(!IO) :-
      io.command_line_arguments(Args0, !IO),
Index: slice/mtc_union.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/slice/mtc_union.m,v
retrieving revision 1.4
diff -u -r1.4 mtc_union.m
--- slice/mtc_union.m	2 Oct 2006 05:21:42 -0000	1.4
+++ slice/mtc_union.m	1 Dec 2006 07:47:06 -0000
@@ -6,14 +6,14 @@
  % Public License - see the file COPYING in the Mercury distribution.
  %-----------------------------------------------------------------------------%
  %
-% Tool to combine several trace counts into one.
-%
+% File: mtc_union.m.
  % Main Author: Ian MacLarty.
  %
+% A tool to combine several trace counts into one.
+%
  %-----------------------------------------------------------------------------%

  :- module mtc_union.
-
  :- interface.

  :- import_module io.
@@ -28,17 +28,16 @@
  :- import_module mdbcomp.
  :- import_module mdbcomp.trace_counts.

-:- import_module assoc_list.
  :- import_module bool.
  :- import_module getopt.
-:- import_module int.
  :- import_module list.
  :- import_module map.
  :- import_module maybe.
-:- import_module require.
  :- import_module set.
  :- import_module string.

+%-----------------------------------------------------------------------------%
+
  main(!IO) :-
      io.command_line_arguments(Args0, !IO),
      OptionOps = option_ops_multi(short_option, long_option, option_default),

--------------------------------------------------------------------------
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