[m-rev.] for review: make compiler use sub-modules

Fergus Henderson fjh at cs.mu.OZ.AU
Wed Mar 6 17:35:52 AEDT 2002


On 06-Mar-2002, Simon Taylor <stayl at cs.mu.OZ.AU> wrote:
> On 06-Mar-2002, Fergus Henderson <fjh at cs.mu.OZ.AU> wrote:
> > Use sub-modules to structure the modules in the Mercury compiler directory.
> > 
> > The main aim of this change is to make the overall, high-level structure
> > of the compiler clearer, and to encourage better encapsulation of the
> > major components.
> 
> Just a few minor issues:
> 
> Some lines are too long (I don't particularly care, but you raised this
> issue in my MR_ prefix changes so I felt I should say something).

Yes, thanks for pointing this out.  I had used a little script to
fix things, but it only wrapped each line once, and I didn't notice that
there were lines which needed wrapping twice.  All I needed to do to fix
the remaining ones was to invoke it a second time.  (Though I did invoke
it a third time, just to provide that it had reached a fixpoint! ;-)

> Simplification is HLDS transformation that emits warnings, not a warning
> pass that transforms the HLDS (you've classified unused_args under
> transform_hlds). common should probably be a sub-module of simplify.
> 
> I don't think smart recompilation belongs under hlds. Leaving it
> as a separate component with recompilation.check, recompilation.usage
> and recompilation.version as sub-modules of recompilation is probably
> the best approach.

This is exactly the kind of feedback I was looking for -- detailed
suggestions about how the module hierarchy should be structured.

With regard to simplification, it is in fact both a semantic checking
phase and a transformation.  In mercury_compile.m, it is run as part
of the frontend_pass (semantic checking), and then a second time as
part of the backend_pass (target-dependent HLDS transformations).
It is documented in mercury_compile.m as being part of semantic analysis.
I don't think it is reasonable to say that the use as an HLDS
transformation is overridingly more important than the use for
semantic checking.

Given that it could go in either, I put it in the check_hlds module
rather than the transform_hlds module because of our general design
principle that later stages of compilation can depend on earlier ones
but not preferably not vice versa.  This principle implies that
things which are needed in two or more different stages should
be put in with the first such stage.

I'll do what you suggest with common and recompilation*.

> It would be nice to use a deeper hierarchy in places, for example
> modecheck_call and modecheck_unify should be sub-modules of modes.
> That can be a separate change.

Yes, that was my intent (to do this later, as a separate change).
Another change along these lines that would make sense is to split
up the different MLDS back-ends.  But that can wait for another day...


Mind-numbingly boring relative diff for the line wrapping changes follows.

diff -u old2/call_gen.m ./call_gen.m
--- old2/call_gen.m	Wed Mar  6 17:06:38 2002
+++ ./call_gen.m	Wed Mar  6 17:06:45 2002
@@ -19,7 +19,8 @@
 :- interface.
 
 :- import_module parse_tree__prog_data, hlds__hlds_pred, hlds__hlds_goal.
-:- import_module backend_libs__code_model, ll_backend__llds, ll_backend__code_info.
+:- import_module backend_libs__code_model, ll_backend__llds.
+:- import_module ll_backend__code_info.
 :- import_module list, assoc_list.
 
 :- pred call_gen__generate_call(code_model::in, pred_id::in, proc_id::in,
diff -u old2/code_gen.m ./code_gen.m
--- old2/code_gen.m	Wed Mar  6 17:06:38 2002
+++ ./code_gen.m	Wed Mar  6 17:06:46 2002
@@ -72,7 +72,8 @@
 
 % LLDS code generator modules.
 :- import_module ll_backend__call_gen, ll_backend__unify_gen.
-:- import_module ll_backend__ite_gen, ll_backend__switch_gen, ll_backend__disj_gen.
+:- import_module ll_backend__ite_gen, ll_backend__switch_gen.
+:- import_module ll_backend__disj_gen.
 :- import_module ll_backend__par_conj_gen, ll_backend__pragma_c_gen.
 :- import_module ll_backend__commit_gen.
 :- import_module ll_backend__continuation_info, ll_backend__trace.
diff -u old2/code_info.m ./code_info.m
--- old2/code_info.m	Wed Mar  6 17:06:38 2002
+++ ./code_info.m	Wed Mar  6 17:06:46 2002
@@ -44,7 +44,8 @@
 :- import_module parse_tree__prog_out.
 :- import_module check_hlds__type_util, check_hlds__mode_util.
 :- import_module ll_backend__arg_info, ll_backend__code_util.
-:- import_module ll_backend__code_exprn, ll_backend__exprn_aux, ll_backend__var_locn.
+:- import_module ll_backend__code_exprn, ll_backend__exprn_aux.
+:- import_module ll_backend__var_locn.
 :- import_module libs__trace_params, ll_backend__llds_out.
 :- import_module libs__options, libs__tree.
 
diff -u old2/code_util.m ./code_util.m
--- old2/code_util.m	Wed Mar  6 17:06:38 2002
+++ ./code_util.m	Wed Mar  6 17:06:46 2002
@@ -190,7 +190,8 @@
 :- implementation.
 
 :- import_module parse_tree__prog_util, check_hlds__type_util.
-:- import_module hlds__special_pred, backend_libs__builtin_ops, backend_libs__code_model.
+:- import_module hlds__special_pred, backend_libs__builtin_ops.
+:- import_module backend_libs__code_model.
 
 :- import_module char, int, string, set, map, term, varset.
 :- import_module require, std_util, assoc_list.
diff -u old2/const_prop.m ./const_prop.m
--- old2/const_prop.m	Wed Mar  6 17:06:38 2002
+++ ./const_prop.m	Wed Mar  6 17:06:46 2002
@@ -37,7 +37,8 @@
 :- import_module hlds__hlds_goal, hlds__hlds_data, hlds__instmap.
 :- import_module check_hlds__inst_match.
 :- import_module libs__globals, libs__options, hlds__passes_aux.
-:- import_module parse_tree__prog_data, check_hlds__mode_util, check_hlds__type_util.
+:- import_module parse_tree__prog_data, check_hlds__mode_util.
+:- import_module check_hlds__type_util.
 :- import_module ll_backend__code_util, hlds__quantification.
 :- import_module check_hlds__modes.
 :- import_module bool, list, int, float, map, require.
diff -u old2/constraint.m ./constraint.m
--- old2/constraint.m	Wed Mar  6 17:06:38 2002
+++ ./constraint.m	Wed Mar  6 17:06:46 2002
@@ -48,7 +48,8 @@
 :- import_module hlds__goal_util, hlds__hlds_pred, hlds__hlds_module.
 :- import_module hlds__hlds_data.
 :- import_module check_hlds__mode_util, hlds__passes_aux.
-:- import_module ll_backend__code_aux, check_hlds__inst_match, check_hlds__purity.
+:- import_module ll_backend__code_aux, check_hlds__inst_match.
+:- import_module check_hlds__purity.
 :- import_module libs__options, libs__globals.
 
 :- import_module assoc_list, list, require, set, std_util.
diff -u old2/deep_profiling.m ./deep_profiling.m
--- old2/deep_profiling.m	Wed Mar  6 17:06:38 2002
+++ ./deep_profiling.m	Wed Mar  6 17:06:46 2002
@@ -29,7 +29,8 @@
 :- import_module (parse_tree__inst), hlds__instmap, hlds__hlds_data.
 :- import_module hlds__hlds_pred, hlds__hlds_goal, parse_tree__prog_data.
 :- import_module backend_libs__code_model, ll_backend__code_util.
-:- import_module parse_tree__prog_util, check_hlds__type_util, check_hlds__mode_util.
+:- import_module parse_tree__prog_util, check_hlds__type_util.
+:- import_module check_hlds__mode_util.
 :- import_module hlds__quantification, transform_hlds__dependency_graph.
 :- import_module backend_libs__rtti, ll_backend__trace.
 :- import_module libs__options, libs__globals.
diff -u old2/deforest.m ./deforest.m
--- old2/deforest.m	Wed Mar  6 17:06:38 2002
+++ ./deforest.m	Wed Mar  6 17:06:46 2002
@@ -44,7 +44,8 @@
 :- implementation.
 
 :- import_module transform_hlds__pd_cost, transform_hlds__pd_debug.
-:- import_module transform_hlds__pd_info, transform_hlds__pd_term, transform_hlds__pd_util.
+:- import_module transform_hlds__pd_info, transform_hlds__pd_term.
+:- import_module transform_hlds__pd_util.
 :- import_module hlds__hlds_pred, hlds__hlds_goal, transform_hlds__inlining.
 :- import_module hlds__passes_aux.
 :- import_module (parse_tree__inst), hlds__instmap, check_hlds__inst_match.
@@ -52,7 +53,8 @@
 :- import_module transform_hlds__dependency_graph, hlds__hlds_data.
 :- import_module check_hlds__det_analysis, libs__globals.
 :- import_module check_hlds__mode_util, hlds__goal_util.
-:- import_module parse_tree__prog_data, parse_tree__prog_util, check_hlds__purity.
+:- import_module parse_tree__prog_data, parse_tree__prog_util.
+:- import_module check_hlds__purity.
 :- import_module check_hlds__modes, check_hlds__mode_info.
 :- import_module check_hlds__unique_modes, libs__options, hlds__hlds_out.
 :- import_module parse_tree__prog_out, hlds__quantification.
diff -u old2/fact_table.m ./fact_table.m
--- old2/fact_table.m	Wed Mar  6 17:06:38 2002
+++ ./fact_table.m	Wed Mar  6 17:06:46 2002
@@ -99,7 +99,8 @@
 :- import_module check_hlds__inst_match.
 % LLDS back-end modules
 :- import_module ll_backend__arg_info, ll_backend__llds, ll_backend__llds_out.
-:- import_module ll_backend__code_util, backend_libs__export, backend_libs__foreign.
+:- import_module ll_backend__code_util, backend_libs__export.
+:- import_module backend_libs__foreign.
 % Modules shared between different back-ends.
 :- import_module hlds__passes_aux, backend_libs__code_model.
 % Misc
diff -u old2/frameopt.m ./frameopt.m
--- old2/frameopt.m	Wed Mar  6 17:06:38 2002
+++ ./frameopt.m	Wed Mar  6 17:06:46 2002
@@ -105,7 +105,8 @@
 :- implementation.
 
 :- import_module ll_backend__livemap, parse_tree__prog_data.
-:- import_module ll_backend__opt_util, ll_backend__code_util, ll_backend__opt_debug.
+:- import_module ll_backend__opt_util, ll_backend__code_util.
+:- import_module ll_backend__opt_debug.
 :- import_module int, string, require, std_util, assoc_list, set, map, queue.
 
 frameopt_main(Instrs0, ProcLabel, C0, C, Instrs, Mod, Jumps) :-
diff -u old2/goal_util.m ./goal_util.m
--- old2/goal_util.m	Wed Mar  6 17:06:38 2002
+++ ./goal_util.m	Wed Mar  6 17:06:46 2002
@@ -232,7 +232,8 @@
 :- import_module hlds__hlds_data, check_hlds__mode_util, ll_backend__code_aux.
 :- import_module parse_tree__prog_data, check_hlds__purity.
 :- import_module ll_backend__code_aux, check_hlds__det_analysis.
-:- import_module check_hlds__inst_match, check_hlds__type_util, (parse_tree__inst).
+:- import_module check_hlds__inst_match, check_hlds__type_util.
+:- import_module (parse_tree__inst).
 
 :- import_module int, string, require, varset.
 
diff -u old2/inlining.m ./inlining.m
--- old2/inlining.m	Wed Mar  6 17:06:38 2002
+++ ./inlining.m	Wed Mar  6 17:06:46 2002
@@ -152,9 +152,11 @@
 
 % HLDS modules
 :- import_module hlds__hlds_data, check_hlds__type_util.
-:- import_module check_hlds__mode_util, hlds__goal_util, check_hlds__det_analysis.
+:- import_module check_hlds__mode_util, hlds__goal_util.
+:- import_module check_hlds__det_analysis.
 :- import_module hlds__quantification, ll_backend__code_aux.
-:- import_module transform_hlds__dead_proc_elim, transform_hlds__dependency_graph.
+:- import_module transform_hlds__dead_proc_elim.
+:- import_module transform_hlds__dependency_graph.
 :- import_module hlds__passes_aux, check_hlds__purity.
 
 % Misc
diff -u old2/inst_match.m ./inst_match.m
--- old2/inst_match.m	Wed Mar  6 17:06:38 2002
+++ ./inst_match.m	Wed Mar  6 17:06:46 2002
@@ -266,7 +266,8 @@
 
 :- implementation.
 :- import_module hlds__hlds_data, check_hlds__mode_util.
-:- import_module parse_tree__prog_data, check_hlds__inst_util, check_hlds__type_util.
+:- import_module parse_tree__prog_data, check_hlds__inst_util.
+:- import_module check_hlds__type_util.
 :- import_module list, set, map, term, std_util, require, bool.
 
 inst_matches_initial(InstA, InstB, Type, ModuleInfo) :-
diff -u old2/inst_util.m ./inst_util.m
--- old2/inst_util.m	Wed Mar  6 17:06:38 2002
+++ ./inst_util.m	Wed Mar  6 17:06:46 2002
@@ -131,7 +131,8 @@
 
 :- implementation.
 :- import_module hlds__hlds_data, check_hlds__inst_match.
-:- import_module check_hlds__mode_util, check_hlds__det_analysis, check_hlds__type_util.
+:- import_module check_hlds__mode_util, check_hlds__det_analysis.
+:- import_module check_hlds__type_util.
 :- import_module bool, std_util, require, map, list, set, int.
 
 	% Abstractly unify two insts.
diff -u old2/instmap.m ./instmap.m
--- old2/instmap.m	Wed Mar  6 17:06:38 2002
+++ ./instmap.m	Wed Mar  6 17:06:46 2002
@@ -20,7 +20,8 @@
 :- interface.
 
 :- import_module hlds__hlds_module, parse_tree__prog_data.
-:- import_module check_hlds__mode_info, (parse_tree__inst), check_hlds__mode_errors.
+:- import_module check_hlds__mode_info, (parse_tree__inst).
+:- import_module check_hlds__mode_errors.
 :- import_module hlds__hlds_data, hlds__hlds_pred.
 
 :- import_module map, bool, set, list, assoc_list, std_util.
diff -u old2/intermod.m ./intermod.m
--- old2/intermod.m	Wed Mar  6 17:06:38 2002
+++ ./intermod.m	Wed Mar  6 17:06:46 2002
@@ -94,9 +94,11 @@
 :- import_module parse_tree__mercury_to_mercury, check_hlds__mode_util.
 :- import_module parse_tree__modules.
 :- import_module libs__options, hlds__passes_aux, parse_tree__prog_data.
-:- import_module parse_tree__prog_io, parse_tree__prog_out, parse_tree__prog_util.
+:- import_module parse_tree__prog_io, parse_tree__prog_out.
+:- import_module parse_tree__prog_util.
 :- import_module hlds__special_pred, check_hlds__typecheck.
-:- import_module check_hlds__type_util, hlds__instmap, (parse_tree__inst), backend_libs__foreign.
+:- import_module check_hlds__type_util, hlds__instmap, (parse_tree__inst).
+:- import_module backend_libs__foreign.
 
 %-----------------------------------------------------------------------------%
 
diff -u old2/ite_gen.m ./ite_gen.m
--- old2/ite_gen.m	Wed Mar  6 17:06:38 2002
+++ ./ite_gen.m	Wed Mar  6 17:06:47 2002
@@ -34,7 +34,8 @@
 
 :- import_module parse_tree__prog_data, libs__tree, backend_libs__builtin_ops.
 :- import_module ll_backend__code_gen, ll_backend__code_util.
-:- import_module ll_backend__trace, libs__options, libs__globals, hlds__instmap.
+:- import_module ll_backend__trace, libs__options, libs__globals.
+:- import_module hlds__instmap.
 
 :- import_module bool, set, term, list, map, std_util, require.
 
diff -u old2/llds.m ./llds.m
--- old2/llds.m	Wed Mar  6 17:06:38 2002
+++ ./llds.m	Wed Mar  6 17:06:47 2002
@@ -19,7 +19,8 @@
 :- import_module parse_tree__prog_data, (parse_tree__inst).
 :- import_module hlds__hlds_pred, hlds__hlds_goal, hlds__hlds_data.
 :- import_module backend_libs__foreign, backend_libs__code_model.
-:- import_module backend_libs__rtti, ll_backend__layout, backend_libs__builtin_ops.
+:- import_module backend_libs__rtti, ll_backend__layout.
+:- import_module backend_libs__builtin_ops.
 :- import_module libs__tree.
 
 :- import_module bool, assoc_list, list, map, set, std_util, counter, term.
diff -u old2/llds_out.m ./llds_out.m
--- old2/llds_out.m	Wed Mar  6 17:06:38 2002
+++ ./llds_out.m	Wed Mar  6 17:06:47 2002
@@ -18,7 +18,8 @@
 :- interface.
 
 :- import_module ll_backend__llds, backend_libs__builtin_ops.
-:- import_module parse_tree__prog_data, hlds__hlds_data, aditi_backend__rl_file.
+:- import_module parse_tree__prog_data, hlds__hlds_data.
+:- import_module aditi_backend__rl_file.
 :- import_module libs__globals.
 :- import_module bool, std_util, list, map, io.
 
diff -u old2/magic_util.m ./magic_util.m
--- old2/magic_util.m	Wed Mar  6 17:06:38 2002
+++ ./magic_util.m	Wed Mar  6 17:06:47 2002
@@ -119,7 +119,8 @@
 :- implementation.
 
 :- import_module hlds__hlds_data, ll_backend__code_util.
-:- import_module check_hlds__type_util, check_hlds__mode_util, check_hlds__inst_match.
+:- import_module check_hlds__type_util, check_hlds__mode_util.
+:- import_module check_hlds__inst_match.
 :- import_module hlds__instmap, hlds__goal_util, parse_tree__prog_out.
 :- import_module hlds__hlds_out, hlds__error_util, parse_tree__prog_util.
 :- import_module (parse_tree__inst), check_hlds__polymorphism.
diff -u old2/make_hlds.m ./make_hlds.m
--- old2/make_hlds.m	Wed Mar  6 17:06:38 2002
+++ ./make_hlds.m	Wed Mar  6 17:06:47 2002
@@ -99,17 +99,21 @@
 
 :- import_module hlds__hlds_goal.
 :- import_module parse_tree__prog_io, parse_tree__prog_io_goal.
-:- import_module parse_tree__prog_io_dcg, parse_tree__prog_io_util, parse_tree__prog_out.
+:- import_module parse_tree__prog_io_dcg, parse_tree__prog_io_util.
+:- import_module parse_tree__prog_out.
 :- import_module parse_tree__modules, parse_tree__module_qual.
-:- import_module parse_tree__prog_util, libs__options, hlds__hlds_out, check_hlds__typecheck.
+:- import_module parse_tree__prog_util, libs__options, hlds__hlds_out.
+:- import_module check_hlds__typecheck.
 :- import_module hlds__make_tags, hlds__quantification, (parse_tree__inst).
 :- import_module libs__globals.
 :- import_module ll_backend__code_util, check_hlds__unify_proc.
-:- import_module check_hlds__type_util, check_hlds__mode_util, check_hlds__mode_errors.
+:- import_module check_hlds__type_util, check_hlds__mode_util.
+:- import_module check_hlds__mode_errors.
 :- import_module parse_tree__mercury_to_mercury, hlds__passes_aux.
 :- import_module check_hlds__clause_to_proc, check_hlds__inst_match.
 :- import_module ll_backend__fact_table, check_hlds__purity, hlds__goal_util.
-:- import_module transform_hlds__term_util, backend_libs__export, ll_backend__llds.
+:- import_module transform_hlds__term_util, backend_libs__export.
+:- import_module ll_backend__llds.
 :- import_module hlds__error_util, backend_libs__foreign.
 :- import_module hlds__recompilation.
 
diff -u old2/mercury_compile.m ./mercury_compile.m
--- old2/mercury_compile.m	Wed Mar  6 17:06:38 2002
+++ ./mercury_compile.m	Wed Mar  6 17:06:47 2002
@@ -30,9 +30,11 @@
 
 	% semantic analysis
 :- import_module libs__handle_options, parse_tree__prog_io.
-:- import_module parse_tree__prog_out, parse_tree__modules, parse_tree__module_qual.
+:- import_module parse_tree__prog_out, parse_tree__modules.
+:- import_module parse_tree__module_qual.
 :- import_module parse_tree__equiv_type, hlds__make_hlds.
-:- import_module check_hlds__typecheck, check_hlds__purity, check_hlds__polymorphism, check_hlds__modes.
+:- import_module check_hlds__typecheck, check_hlds__purity.
+:- import_module check_hlds__polymorphism, check_hlds__modes.
 :- import_module check_hlds__switch_detection, check_hlds__cse_detection.
 :- import_module check_hlds__det_analysis, check_hlds__unique_modes.
 :- import_module check_hlds__stratify, check_hlds__simplify.
@@ -40,11 +42,13 @@
 
 	% high-level HLDS transformations
 :- import_module check_hlds__check_typeclass, transform_hlds__intermod.
-:- import_module transform_hlds__trans_opt, transform_hlds__table_gen, (transform_hlds__lambda).
+:- import_module transform_hlds__trans_opt, transform_hlds__table_gen.
+:- import_module (transform_hlds__lambda).
 :- import_module backend_libs__type_ctor_info, transform_hlds__termination.
 :- import_module transform_hlds__higher_order, transform_hlds__accumulator.
 :- import_module transform_hlds__inlining, transform_hlds__deforest.
-:- import_module aditi_backend__dnf, aditi_backend__magic, transform_hlds__dead_proc_elim.
+:- import_module aditi_backend__dnf, aditi_backend__magic.
+:- import_module transform_hlds__dead_proc_elim.
 :- import_module transform_hlds__delay_construct, transform_hlds__unused_args.
 :- import_module transform_hlds__unneeded_code, transform_hlds__lco.
 :- import_module ll_backend__deep_profiling.
@@ -52,7 +56,8 @@
 	% the LLDS back-end
 :- import_module ll_backend__saved_vars, ll_backend__liveness.
 :- import_module ll_backend__follow_code, ll_backend__live_vars.
-:- import_module ll_backend__arg_info, ll_backend__store_alloc, check_hlds__goal_path.
+:- import_module ll_backend__arg_info, ll_backend__store_alloc.
+:- import_module check_hlds__goal_path.
 :- import_module ll_backend__code_gen, ll_backend__optimize.
 :- import_module backend_libs__foreign, backend_libs__export.
 :- import_module backend_libs__base_typeclass_info.
@@ -88,7 +93,8 @@
 :- import_module hlds__hlds_out, ll_backend__llds, aditi_backend__rl.
 :- import_module parse_tree__mercury_to_mercury, hlds__hlds_data.
 :- import_module ll_backend__layout, transform_hlds__dependency_graph.
-:- import_module parse_tree__prog_util, aditi_backend__rl_dump, aditi_backend__rl_file.
+:- import_module parse_tree__prog_util, aditi_backend__rl_dump.
+:- import_module aditi_backend__rl_file.
 :- import_module libs__options, libs__globals, libs__trace_params.
 :- import_module hlds__passes_aux.
 :- import_module hlds__recompilation, hlds__recompilation_usage.
diff -u old2/middle_rec.m ./middle_rec.m
--- old2/middle_rec.m	Wed Mar  6 17:06:38 2002
+++ ./middle_rec.m	Wed Mar  6 17:06:47 2002
@@ -28,7 +28,8 @@
 :- import_module backend_libs__builtin_ops, hlds__hlds_module.
 :- import_module hlds__hlds_data, parse_tree__prog_data, parse_tree__prog_out.
 :- import_module ll_backend__code_gen, ll_backend__unify_gen.
-:- import_module ll_backend__code_util, ll_backend__code_aux, ll_backend__opt_util.
+:- import_module ll_backend__code_util, ll_backend__code_aux.
+:- import_module ll_backend__opt_util.
 :- import_module backend_libs__code_model.
 
 :- import_module bool, set, int, std_util, libs__tree, list, assoc_list.
diff -u old2/ml_code_gen.m ./ml_code_gen.m
--- old2/ml_code_gen.m	Wed Mar  6 17:06:38 2002
+++ ./ml_code_gen.m	Wed Mar  6 17:06:47 2002
@@ -788,7 +788,8 @@
 :- import_module backend_libs__foreign. % XXX needed for pragma foreign code
 :- import_module hlds__hlds_pred, hlds__hlds_data.
 :- import_module hlds__goal_util, check_hlds__type_util.
-:- import_module check_hlds__mode_util, backend_libs__builtin_ops, hlds__error_util.
+:- import_module check_hlds__mode_util, backend_libs__builtin_ops.
+:- import_module hlds__error_util.
 :- import_module backend_libs__c_util.
 :- import_module hlds__passes_aux, parse_tree__modules.
 :- import_module libs__globals, libs__options.
diff -u old2/ml_type_gen.m ./ml_type_gen.m
--- old2/ml_type_gen.m	Wed Mar  6 17:06:38 2002
+++ ./ml_type_gen.m	Wed Mar  6 17:06:47 2002
@@ -75,7 +75,8 @@
 
 :- implementation.
 :- import_module hlds__hlds_pred, parse_tree__prog_data.
-:- import_module parse_tree__prog_util, check_hlds__type_util, check_hlds__polymorphism.
+:- import_module parse_tree__prog_util, check_hlds__type_util.
+:- import_module check_hlds__polymorphism.
 :- import_module ml_backend__ml_code_util, hlds__error_util.
 :- import_module libs__globals, libs__options.
 
diff -u old2/mlds_to_c.m ./mlds_to_c.m
--- old2/mlds_to_c.m	Wed Mar  6 17:06:38 2002
+++ ./mlds_to_c.m	Wed Mar  6 17:06:47 2002
@@ -64,7 +64,8 @@
 :- import_module backend_libs__builtin_ops, backend_libs__c_util.
 :- import_module parse_tree__modules.
 :- import_module parse_tree__prog_data, parse_tree__prog_out.
-:- import_module check_hlds__type_util, hlds__error_util, backend_libs__code_model.
+:- import_module check_hlds__type_util, hlds__error_util.
+:- import_module backend_libs__code_model.
 
 :- import_module bool, int, string, library, list, map.
 :- import_module assoc_list, term, std_util, require.
diff -u old2/mlds_to_gcc.m ./mlds_to_gcc.m
--- old2/mlds_to_gcc.m	Wed Mar  6 17:06:38 2002
+++ ./mlds_to_gcc.m	Wed Mar  6 17:06:47 2002
@@ -164,7 +164,8 @@
 :- import_module libs__globals, libs__options, hlds__passes_aux.
 :- import_module backend_libs__builtin_ops, parse_tree__modules.
 :- import_module parse_tree__prog_data, parse_tree__prog_out.
-:- import_module parse_tree__prog_util, check_hlds__type_util, hlds__error_util.
+:- import_module parse_tree__prog_util, check_hlds__type_util.
+:- import_module hlds__error_util.
 :- import_module backend_libs__pseudo_type_info, backend_libs__code_model.
 
 :- import_module bool, int, string, library, list, map.
diff -u old2/mlds_to_il.m ./mlds_to_il.m
--- old2/mlds_to_il.m	Wed Mar  6 17:06:38 2002
+++ ./mlds_to_il.m	Wed Mar  6 17:06:47 2002
@@ -141,7 +141,8 @@
 :- import_module parse_tree__prog_data, parse_tree__prog_out.
 :- import_module parse_tree__prog_util, ll_backend__llds_out.
 :- import_module backend_libs__pseudo_type_info, backend_libs__rtti.
-:- import_module check_hlds__type_util, backend_libs__code_model, backend_libs__foreign.
+:- import_module check_hlds__type_util, backend_libs__code_model.
+:- import_module backend_libs__foreign.
 
 :- import_module ml_backend__il_peephole.
 :- import_module ml_backend__ml_util, ml_backend__ml_code_util.
diff -u old2/modecheck_call.m ./modecheck_call.m
--- old2/modecheck_call.m	Wed Mar  6 17:06:38 2002
+++ ./modecheck_call.m	Wed Mar  6 17:06:47 2002
@@ -71,9 +71,11 @@
 
 :- implementation.
 :- import_module hlds__hlds_data, hlds__instmap, parse_tree__prog_data.
-:- import_module (parse_tree__inst), check_hlds__inst_util, check_hlds__type_util.
+:- import_module (parse_tree__inst), check_hlds__inst_util.
+:- import_module check_hlds__type_util.
 :- import_module check_hlds__mode_info, check_hlds__mode_debug.
-:- import_module check_hlds__modes, check_hlds__mode_util, check_hlds__mode_errors.
+:- import_module check_hlds__modes, check_hlds__mode_util.
+:- import_module check_hlds__mode_errors.
 :- import_module check_hlds__clause_to_proc, check_hlds__inst_match.
 :- import_module check_hlds__det_report, check_hlds__unify_proc.
 :- import_module int, map, bool, set, require, term, varset.
diff -u old2/modecheck_unify.m ./modecheck_unify.m
--- old2/modecheck_unify.m	Wed Mar  6 17:06:38 2002
+++ ./modecheck_unify.m	Wed Mar  6 17:06:47 2002
@@ -45,9 +45,11 @@
 :- import_module hlds__hlds_module, hlds__hlds_goal, hlds__hlds_pred.
 :- import_module hlds__hlds_data, hlds__hlds_out.
 :- import_module check_hlds__mode_debug, check_hlds__mode_util.
-:- import_module check_hlds__mode_info, check_hlds__modes, check_hlds__mode_errors.
+:- import_module check_hlds__mode_info, check_hlds__modes.
+:- import_module check_hlds__mode_errors.
 :- import_module check_hlds__inst_match, check_hlds__inst_util.
-:- import_module check_hlds__unify_proc, ll_backend__code_util, check_hlds__unique_modes.
+:- import_module check_hlds__unify_proc, ll_backend__code_util.
+:- import_module check_hlds__unique_modes.
 :- import_module check_hlds__typecheck, check_hlds__modecheck_call.
 :- import_module (parse_tree__inst), hlds__quantification, hlds__make_hlds.
 :- import_module check_hlds__polymorphism.
diff -u old2/modes.m ./modes.m
--- old2/modes.m	Wed Mar  6 17:06:38 2002
+++ ./modes.m	Wed Mar  6 17:06:47 2002
@@ -326,9 +326,11 @@
 :- import_module hlds__make_hlds, hlds__hlds_data, check_hlds__unique_modes.
 :- import_module check_hlds__mode_debug.
 :- import_module check_hlds__mode_info, check_hlds__delay_info.
-:- import_module check_hlds__mode_errors, check_hlds__inst_match, hlds__instmap.
+:- import_module check_hlds__mode_errors, check_hlds__inst_match.
+:- import_module hlds__instmap.
 :- import_module check_hlds__type_util, check_hlds__mode_util.
-:- import_module ll_backend__code_util, check_hlds__unify_proc, hlds__special_pred.
+:- import_module ll_backend__code_util, check_hlds__unify_proc.
+:- import_module hlds__special_pred.
 :- import_module libs__globals, libs__options, parse_tree__mercury_to_mercury.
 :- import_module hlds__hlds_out, int, set.
 :- import_module hlds__passes_aux, check_hlds__typecheck.
diff -u old2/pd_info.m ./pd_info.m
--- old2/pd_info.m	Wed Mar  6 17:06:38 2002
+++ ./pd_info.m	Wed Mar  6 17:06:48 2002
@@ -160,7 +160,8 @@
 :- implementation.
 
 :- import_module hlds__hlds_pred, parse_tree__prog_data.
-:- import_module transform_hlds__pd_debug, transform_hlds__pd_util, check_hlds__det_util, libs__globals.
+:- import_module transform_hlds__pd_debug, transform_hlds__pd_util.
+:- import_module check_hlds__det_util, libs__globals.
 :- import_module check_hlds__inst_match, hlds__hlds_goal.
 :- import_module parse_tree__prog_util, term.
 :- import_module assoc_list, bool, int, require, string.
diff -u old2/pd_util.m ./pd_util.m
--- old2/pd_util.m	Wed Mar  6 17:06:38 2002
+++ ./pd_util.m	Wed Mar  6 17:06:48 2002
@@ -143,9 +143,11 @@
 :- import_module check_hlds__det_analysis, transform_hlds__constraint.
 :- import_module transform_hlds__pd_cost, hlds__hlds_data, hlds__instmap.
 :- import_module transform_hlds__unused_args, check_hlds__inst_match.
-:- import_module (parse_tree__inst), hlds__quantification, check_hlds__mode_util.
+:- import_module (parse_tree__inst), hlds__quantification.
+:- import_module check_hlds__mode_util.
 :- import_module ll_backend__code_aux, check_hlds__purity.
-:- import_module check_hlds__mode_info, check_hlds__unique_modes, transform_hlds__pd_debug.
+:- import_module check_hlds__mode_info, check_hlds__unique_modes.
+:- import_module transform_hlds__pd_debug.
 :- import_module check_hlds__type_util, check_hlds__det_util.
 :- import_module check_hlds__det_analysis, libs__options, hlds__goal_util.
 :- import_module check_hlds__det_report, check_hlds__inst_util.
diff -u old2/polymorphism.m ./polymorphism.m
--- old2/polymorphism.m	Wed Mar  6 17:06:38 2002
+++ ./polymorphism.m	Wed Mar  6 17:06:48 2002
@@ -333,7 +333,8 @@
 :- import_module ll_backend__code_util, check_hlds__unify_proc.
 :- import_module parse_tree__prog_util.
 :- import_module (parse_tree__inst), hlds__hlds_out.
-:- import_module backend_libs__base_typeclass_info, hlds__goal_util, hlds__passes_aux.
+:- import_module backend_libs__base_typeclass_info, hlds__goal_util.
+:- import_module hlds__passes_aux.
 :- import_module check_hlds__clause_to_proc.
 :- import_module libs__globals, libs__options.
 
diff -u old2/prog_io_goal.m ./prog_io_goal.m
--- old2/prog_io_goal.m	Wed Mar  6 17:06:38 2002
+++ ./prog_io_goal.m	Wed Mar  6 17:06:48 2002
@@ -96,7 +96,8 @@
 :- implementation.
 
 :- import_module check_hlds__mode_util, check_hlds__purity.
-:- import_module parse_tree__prog_io, parse_tree__prog_io_util, transform_hlds__term_util.
+:- import_module parse_tree__prog_io, parse_tree__prog_io_util.
+:- import_module transform_hlds__term_util.
 :- import_module term.
 :- import_module int, map, string, std_util.
 
diff -u old2/purity.m ./purity.m
--- old2/purity.m	Wed Mar  6 17:06:38 2002
+++ ./purity.m	Wed Mar  6 17:06:48 2002
@@ -208,7 +208,8 @@
 
 :- import_module hlds__hlds_data, parse_tree__prog_io_util.
 :- import_module check_hlds__type_util, check_hlds__mode_util.
-:- import_module ll_backend__code_util, parse_tree__prog_data, check_hlds__unify_proc.
+:- import_module ll_backend__code_util, parse_tree__prog_data.
+:- import_module check_hlds__unify_proc.
 :- import_module libs__globals, libs__options, parse_tree__mercury_to_mercury.
 :- import_module hlds__hlds_out.
 :- import_module hlds__passes_aux, check_hlds__typecheck.
diff -u old2/recompilation_version.m ./recompilation_version.m
--- old2/recompilation_version.m	Wed Mar  6 17:06:38 2002
+++ ./recompilation_version.m	Wed Mar  6 17:06:48 2002
@@ -35,7 +35,8 @@
 :- implementation.
 
 :- import_module parse_tree__mercury_to_mercury, check_hlds__mode_util.
-:- import_module parse_tree__prog_io, parse_tree__prog_util, check_hlds__type_util.
+:- import_module parse_tree__prog_io, parse_tree__prog_util.
+:- import_module check_hlds__type_util.
 :- import_module hlds__hlds_out, (parse_tree__inst).
 :- import_module assoc_list, bool, list, map, require, string, varset.
 
diff -u old2/rl_exprn.m ./rl_exprn.m
--- old2/rl_exprn.m	Wed Mar  6 17:06:38 2002
+++ ./rl_exprn.m	Wed Mar  6 17:06:48 2002
@@ -52,7 +52,8 @@
 :- interface.
 
 :- import_module hlds__hlds_module, hlds__hlds_pred, aditi_backend__rl.
-:- import_module aditi_backend__rl_code, aditi_backend__rl_file, parse_tree__prog_data.
+:- import_module aditi_backend__rl_code, aditi_backend__rl_file.
+:- import_module parse_tree__prog_data.
 :- import_module list.
 
 	% rl_exprn__generate_compare_exprn(ModuleInfo, SortSpec,
diff -u old2/simplify.m ./simplify.m
--- old2/simplify.m	Wed Mar  6 17:06:38 2002
+++ ./simplify.m	Wed Mar  6 17:06:48 2002
@@ -75,13 +75,15 @@
 :- implementation.
 
 :- import_module ll_backend__code_aux, check_hlds__det_analysis.
-:- import_module ll_backend__follow_code, hlds__goal_util, transform_hlds__const_prop.
+:- import_module ll_backend__follow_code, hlds__goal_util.
+:- import_module transform_hlds__const_prop.
 :- import_module hlds__hlds_module, hlds__hlds_data, (parse_tree__inst).
 :- import_module check_hlds__inst_match, varset.
 :- import_module libs__options, hlds__passes_aux, parse_tree__prog_data.
 :- import_module check_hlds__mode_util, check_hlds__type_util.
 :- import_module ll_backend__code_util, hlds__quantification.
-:- import_module check_hlds__modes, check_hlds__purity, transform_hlds__pd_cost.
+:- import_module check_hlds__modes, check_hlds__purity.
+:- import_module transform_hlds__pd_cost.
 :- import_module parse_tree__prog_util, check_hlds__unify_proc.
 :- import_module hlds__special_pred, check_hlds__polymorphism.
 
diff -u old2/stack_layout.m ./stack_layout.m
--- old2/stack_layout.m	Wed Mar  6 17:06:38 2002
+++ ./stack_layout.m	Wed Mar  6 17:06:48 2002
@@ -56,7 +56,8 @@
 :- import_module ll_backend__prog_rep, ll_backend__static_term.
 :- import_module ll_backend__layout_out.
 :- import_module backend_libs__rtti, ll_backend__layout.
-:- import_module ll_backend__ll_pseudo_type_info, (parse_tree__inst), ll_backend__code_util.
+:- import_module ll_backend__ll_pseudo_type_info, (parse_tree__inst).
+:- import_module ll_backend__code_util.
 :- import_module assoc_list, bool, string, int, require.
 :- import_module map, term, set, varset.
 
diff -u old2/stratify.m ./stratify.m
--- old2/stratify.m	Wed Mar  6 17:06:38 2002
+++ ./stratify.m	Wed Mar  6 17:06:48 2002
@@ -49,7 +49,8 @@
 :- import_module transform_hlds__dependency_graph, hlds__hlds_pred.
 :- import_module hlds__hlds_goal, hlds__hlds_data.
 :- import_module hlds__hlds_module, check_hlds__type_util.
-:- import_module check_hlds__mode_util, parse_tree__prog_data, hlds__passes_aux.
+:- import_module check_hlds__mode_util, parse_tree__prog_data.
+:- import_module hlds__passes_aux.
 :- import_module parse_tree__prog_out, libs__globals, libs__options.
 
 :- import_module assoc_list, map, list, set, bool, std_util, relation, require.
diff -u old2/switch_gen.m ./switch_gen.m
--- old2/switch_gen.m	Wed Mar  6 17:06:38 2002
+++ ./switch_gen.m	Wed Mar  6 17:06:48 2002
@@ -46,7 +46,8 @@
 :- interface.
 
 :- import_module parse_tree__prog_data, hlds__hlds_goal, hlds__hlds_data.
-:- import_module backend_libs__code_model, ll_backend__code_info, ll_backend__llds.
+:- import_module backend_libs__code_model, ll_backend__code_info.
+:- import_module ll_backend__llds.
 :- import_module list.
 
 :- pred switch_gen__generate_switch(code_model, prog_var, can_fail, list(case),
diff -u old2/table_gen.m ./table_gen.m
--- old2/table_gen.m	Wed Mar  6 17:06:38 2002
+++ ./table_gen.m	Wed Mar  6 17:06:48 2002
@@ -242,11 +242,13 @@
 :- import_module hlds__hlds_out, parse_tree__prog_out.
 :- import_module hlds__hlds_pred, hlds__instmap, check_hlds__polymorphism.
 :- import_module ll_backend__code_aux, check_hlds__det_analysis.
-:- import_module ll_backend__follow_code, hlds__goal_util, transform_hlds__const_prop.
+:- import_module ll_backend__follow_code, hlds__goal_util.
+:- import_module transform_hlds__const_prop.
 :- import_module hlds__hlds_module, hlds__hlds_goal, hlds__hlds_data.
 :- import_module (parse_tree__inst), check_hlds__inst_match.
 :- import_module libs__globals, libs__options, hlds__passes_aux.
-:- import_module parse_tree__prog_data, check_hlds__mode_util, check_hlds__type_util.
+:- import_module parse_tree__prog_data, check_hlds__mode_util.
+:- import_module check_hlds__type_util.
 :- import_module ll_backend__code_util, hlds__quantification.
 :- import_module check_hlds__modes, check_hlds__purity, parse_tree__prog_util.
 :- import_module backend_libs__code_model, ll_backend__continuation_info.
diff -u old2/typecheck.m ./typecheck.m
--- old2/typecheck.m	Wed Mar  6 17:06:38 2002
+++ ./typecheck.m	Wed Mar  6 17:06:49 2002
@@ -154,7 +154,8 @@
 :- implementation.
 
 :- import_module hlds__hlds_goal, parse_tree__prog_util.
-:- import_module check_hlds__type_util, parse_tree__modules, ll_backend__code_util.
+:- import_module check_hlds__type_util, parse_tree__modules.
+:- import_module ll_backend__code_util.
 :- import_module parse_tree__prog_io, parse_tree__prog_io_util.
 :- import_module parse_tree__prog_out, hlds__hlds_out, hlds__error_util.
 :- import_module parse_tree__mercury_to_mercury, check_hlds__mode_util.
diff -u old2/unify_gen.m ./unify_gen.m
--- old2/unify_gen.m	Wed Mar  6 17:06:38 2002
+++ ./unify_gen.m	Wed Mar  6 17:06:49 2002
@@ -43,7 +43,8 @@
 :- import_module hlds__hlds_module, hlds__hlds_pred, parse_tree__prog_data.
 :- import_module parse_tree__prog_out, ll_backend__code_util.
 :- import_module check_hlds__mode_util, check_hlds__type_util.
-:- import_module ll_backend__code_aux, hlds__hlds_out, libs__tree, ll_backend__arg_info.
+:- import_module ll_backend__code_aux, hlds__hlds_out, libs__tree.
+:- import_module ll_backend__arg_info.
 :- import_module libs__globals, libs__options, ll_backend__continuation_info.
 :- import_module ll_backend__stack_layout.
 :- import_module aditi_backend__rl, ll_backend__trace, hlds__error_util.
diff -u old2/unify_proc.m ./unify_proc.m
--- old2/unify_proc.m	Wed Mar  6 17:06:38 2002
+++ ./unify_proc.m	Wed Mar  6 17:06:49 2002
@@ -129,7 +129,8 @@
 :- import_module check_hlds__type_util.
 :- import_module parse_tree__mercury_to_mercury, hlds__hlds_out.
 :- import_module hlds__make_hlds, check_hlds__polymorphism.
-:- import_module check_hlds__post_typecheck, parse_tree__prog_util, parse_tree__prog_out.
+:- import_module check_hlds__post_typecheck, parse_tree__prog_util.
+:- import_module parse_tree__prog_out.
 :- import_module hlds__quantification, check_hlds__clause_to_proc, term.
 :- import_module varset.
 :- import_module check_hlds__modes, check_hlds__mode_util.
diff -u old2/unique_modes.m ./unique_modes.m
--- old2/unique_modes.m	Wed Mar  6 17:06:38 2002
+++ ./unique_modes.m	Wed Mar  6 17:06:49 2002
@@ -63,7 +63,8 @@
 :- import_module check_hlds__mode_util, parse_tree__prog_out, hlds__hlds_out.
 :- import_module parse_tree__mercury_to_mercury, hlds__passes_aux.
 :- import_module check_hlds__modes, parse_tree__prog_data.
-:- import_module check_hlds__mode_errors, ll_backend__llds, check_hlds__unify_proc.
+:- import_module check_hlds__mode_errors, ll_backend__llds.
+:- import_module check_hlds__unify_proc.
 :- import_module (parse_tree__inst), hlds__instmap, check_hlds__inst_match.
 :- import_module check_hlds__inst_util.
 :- import_module term, varset.
diff -u old2/unused_args.m ./unused_args.m
--- old2/unused_args.m	Wed Mar  6 17:06:38 2002
+++ ./unused_args.m	Wed Mar  6 17:06:49 2002
@@ -59,7 +59,8 @@
 :- import_module libs__options, parse_tree__prog_data, parse_tree__prog_out.
 :- import_module hlds__quantification, hlds__special_pred.
 :- import_module hlds__passes_aux, check_hlds__inst_match.
-:- import_module parse_tree__modules, check_hlds__polymorphism, hlds__goal_util.
+:- import_module parse_tree__modules, check_hlds__polymorphism.
+:- import_module hlds__goal_util.
 
 :- import_module assoc_list, bool, char, int, list, map, require.
 :- import_module set, std_util, string.

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
The University of Melbourne         |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-reviews mailing list
post:  mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the reviews mailing list