[m-rev.] for review: two new scope types

Zoltan Somogyi zs at csse.unimelb.edu.au
Mon Jan 3 01:36:34 AEDT 2011


On 30-Dec-2010, Julien Fischer <juliensf at csse.unimelb.edu.au> wrote:
> It would also be useful if --verbose-error-messages is enabled, to
> report which function symbols are missing from the switch.

Actually, I think that if you are using require_complete_switch,
you are almost CERTAIN to want that information, so you should get it
by default. This diff does that; I will address any review comments on it
after commit.

Zoltan.

Make error messages for require_complete_switch scopes report the missing
functors.

Knowing which functors are missing requires knowing not only the set of
functors in the switched-on variable's type, but also which of these functors
have been eliminated by earlier tests, which requires having the instmap at
the point of entry to the switch. Simplification, which initially detected
unmet require_complete_switch requirements, does not have the instmap, and
threading the instmap through it would make it significantly less efficient.
So instead we now detect any problems with require_complete_switch scopes
(and require_detism scopes, which are similar) during determinism checking.

compiler/det_report.m:
	Factor out the code for finding the missing functors in conventional
	determinism errors, to allow it to be used for this new purpose.

	Check whether the requirements of require_complete_switch and
	require_detism scopes are met IF the predicate has any such scopes.

compiler/det_analysis.m:
compiler/det_util.m:
	Record whether the predicate has any such scopes.

compiler/hlds_pred.m:
	Add a predicate marker that allows this recording.

compiler/simplify.m:
	Delete the code that checks the require_complete_switch and
	require_detism scopes. Keep the code that deletes those scopes.
	(We have to do that here because determinism error reporting
	never updates the goal).

compiler/prog_out.m:
	Delete an unused predicate.

compiler/*.m:
	Remove unnecesary imports as flagged by --warn-unused-imports.

cvs diff: Diffing .
cvs diff: Diffing analysis
cvs diff: Diffing bindist
cvs diff: Diffing boehm_gc
cvs diff: Diffing boehm_gc/Mac_files
cvs diff: Diffing boehm_gc/cord
cvs diff: Diffing boehm_gc/cord/private
cvs diff: Diffing boehm_gc/doc
cvs diff: Diffing boehm_gc/extra
cvs diff: Diffing boehm_gc/include
cvs diff: Diffing boehm_gc/include/extra
cvs diff: Diffing boehm_gc/include/private
cvs diff: Diffing boehm_gc/libatomic_ops
cvs diff: Diffing boehm_gc/libatomic_ops/doc
cvs diff: Diffing boehm_gc/libatomic_ops/src
cvs diff: Diffing boehm_gc/libatomic_ops/src/atomic_ops
cvs diff: Diffing boehm_gc/libatomic_ops/src/atomic_ops/sysdeps
cvs diff: Diffing boehm_gc/libatomic_ops/src/atomic_ops/sysdeps/armcc
cvs diff: Diffing boehm_gc/libatomic_ops/src/atomic_ops/sysdeps/gcc
cvs diff: Diffing boehm_gc/libatomic_ops/src/atomic_ops/sysdeps/hpc
cvs diff: Diffing boehm_gc/libatomic_ops/src/atomic_ops/sysdeps/ibmc
cvs diff: Diffing boehm_gc/libatomic_ops/src/atomic_ops/sysdeps/icc
cvs diff: Diffing boehm_gc/libatomic_ops/src/atomic_ops/sysdeps/msftc
cvs diff: Diffing boehm_gc/libatomic_ops/src/atomic_ops/sysdeps/sunc
cvs diff: Diffing boehm_gc/libatomic_ops/tests
cvs diff: Diffing boehm_gc/libatomic_ops-1.2
cvs diff: Diffing boehm_gc/libatomic_ops-1.2/doc
cvs diff: Diffing boehm_gc/libatomic_ops-1.2/src
cvs diff: Diffing boehm_gc/libatomic_ops-1.2/src/atomic_ops
cvs diff: Diffing boehm_gc/libatomic_ops-1.2/src/atomic_ops/sysdeps
cvs diff: Diffing boehm_gc/libatomic_ops-1.2/tests
cvs diff: Diffing boehm_gc/m4
cvs diff: Diffing boehm_gc/tests
cvs diff: Diffing browser
cvs diff: Diffing bytecode
cvs diff: Diffing compiler
Index: compiler/det_analysis.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/det_analysis.m,v
retrieving revision 1.227
diff -u -b -r1.227 det_analysis.m
--- compiler/det_analysis.m	30 Dec 2010 11:17:53 -0000	1.227
+++ compiler/det_analysis.m	2 Jan 2011 10:06:16 -0000
@@ -297,6 +297,7 @@
     det_info_get_module_info(DetInfo, !:ModuleInfo),
     det_info_get_error_specs(DetInfo, !:Specs),
     det_info_get_has_format_call(DetInfo, HasFormatCalls),
+    det_info_get_has_req_scope(DetInfo, HasRequireScope),
 
     % Take the worst of the old and inferred detisms. This is needed to prevent
     % loops on p :- not(p), at least if the initial assumed detism is det.
@@ -378,15 +379,24 @@
     % Put back the new proc_info structure.
     map.det_update(ProcTable0, ProcId, ProcInfo, ProcTable),
     pred_info_set_procedures(ProcTable, PredInfo0, PredInfo1),
+
+    pred_info_get_markers(PredInfo1, Markers1),
     (
-        HasFormatCalls = no,
-        PredInfo = PredInfo1
+        HasFormatCalls = does_not_contain_format_call,
+        Markers2 = Markers1
     ;
-        HasFormatCalls = yes,
-        pred_info_get_markers(PredInfo1, Markers1),
-        add_marker(marker_has_format_call, Markers1, Markers),
-        pred_info_set_markers(Markers, PredInfo1, PredInfo)
+        HasFormatCalls = contains_format_call,
+        add_marker(marker_has_format_call, Markers1, Markers2)
+    ),
+    (
+        HasRequireScope = does_not_contain_require_scope,
+        Markers = Markers2
+    ;
+        HasRequireScope = contains_require_scope,
+        add_marker(marker_has_require_scope, Markers2, Markers)
     ),
+    pred_info_set_markers(Markers, PredInfo1, PredInfo),
+
     map.det_update(PredTable0, PredId, PredInfo, PredTable),
     module_info_set_preds(PredTable, !ModuleInfo).
 
@@ -435,10 +445,10 @@
     bool::in, determinism::out, list(failing_context)::out,
     det_info::in, det_info::out) is det.
 
-det_infer_goal_1(hlds_goal(GoalExpr0, GoalInfo0), hlds_goal(GoalExpr, GoalInfo),
-        InstMap0, !.SolnContext, RightFailingContexts,
+det_infer_goal_1(Goal0, Goal, InstMap0, !.SolnContext, RightFailingContexts,
         MaybePromiseEqvSolutionSets, AddPruning, Detism, GoalFailingContexts,
         !DetInfo) :-
+    Goal0 = hlds_goal(GoalExpr0, GoalInfo0),
     InstmapDelta = goal_info_get_instmap_delta(GoalInfo0),
 
     (
@@ -563,7 +573,8 @@
     ;
         % Either no commit is needed, or a `scope' is already present.
         GoalExpr = GoalExpr1
-    ).
+    ),
+    Goal = hlds_goal(GoalExpr, GoalInfo).
 
 :- func promise_eqv_solutions_kind_prunes(promise_solutions_kind) = bool.
 
@@ -995,7 +1006,7 @@
     CalleeModuleName = pred_info_module(CalleePredInfo),
     CalleeName = pred_info_name(CalleePredInfo),
     ( is_format_call(CalleeModuleName, CalleeName, Args) ->
-        det_info_set_has_format_call(yes, !DetInfo)
+        det_info_set_has_format_call(!DetInfo)
     ;
         true
     ),
@@ -1691,8 +1702,6 @@
     ;
         ( Reason = exist_quant(_)
         ; Reason = promise_purity(_)
-        ; Reason = require_detism(_)
-        ; Reason = require_complete_switch(_)
         ; Reason = commit(_)
         ; Reason = barrier(_)
         ),
@@ -1700,6 +1709,14 @@
             RightFailingContexts, MaybePromiseEqvSolutionSets0,
             Detism, GoalFailingContexts, !DetInfo)
     ;
+        ( Reason = require_complete_switch(_)
+        ; Reason = require_detism(_)
+        ),
+        det_info_set_has_req_scope(!DetInfo),
+        det_infer_goal(Goal0, Goal, InstMap0, SolnContext,
+            RightFailingContexts, MaybePromiseEqvSolutionSets0,
+            Detism, GoalFailingContexts, !DetInfo)
+    ;
         Reason = from_ground_term(_, FromGroundTermKind),
         (
             FromGroundTermKind = from_ground_term_construct,
Index: compiler/det_report.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/det_report.m,v
retrieving revision 1.152
diff -u -b -r1.152 det_report.m
--- compiler/det_report.m	15 Dec 2010 06:29:33 -0000	1.152
+++ compiler/det_report.m	2 Jan 2011 13:09:08 -0000
@@ -186,9 +186,9 @@
     proc_info::in, module_info::in, module_info::out,
     list(error_spec)::in, list(error_spec)::out) is det.
 
-check_determinism(PredId, ProcId, PredInfo0, ProcInfo0, !ModuleInfo, !Specs) :-
-    proc_info_get_declared_determinism(ProcInfo0, MaybeDetism),
-    proc_info_get_inferred_determinism(ProcInfo0, InferredDetism),
+check_determinism(PredId, ProcId, PredInfo, ProcInfo, !ModuleInfo, !Specs) :-
+    proc_info_get_declared_determinism(ProcInfo, MaybeDetism),
+    proc_info_get_inferred_determinism(ProcInfo, InferredDetism),
     (
         MaybeDetism = no
     ;
@@ -203,7 +203,7 @@
                 ShouldIssueWarning),
             globals.lookup_bool_option(Globals, warn_inferred_erroneous,
                 WarnAboutInferredErroneous),
-            pred_info_get_markers(PredInfo0, Markers),
+            pred_info_get_markers(PredInfo, Markers),
             (
                 ShouldIssueWarning = yes,
 
@@ -221,7 +221,7 @@
                 % these up. These can happen for the Unify pred for the unit
                 % type, if such types are not boxed (as they are not
                 % boxed for the IL backend).
-                \+ is_unify_or_compare_pred(PredInfo0),
+                \+ is_unify_or_compare_pred(PredInfo),
 
                 % Don't warn about predicates which are inferred erroneous
                 % when the appropriate option is set. This is to avoid warnings
@@ -236,10 +236,10 @@
                 % Only warn about predicates that are defined in this module.
                 % This avoids warnings being emitted for opt_imported 
                 % predicates.
-                pred_info_get_import_status(PredInfo0, ImportStatus),
+                pred_info_get_import_status(PredInfo, ImportStatus),
                 status_defined_in_this_module(ImportStatus) = yes
             ->
-                proc_info_get_detism_decl(ProcInfo0, DetismDecl),
+                proc_info_get_detism_decl(ProcInfo, DetismDecl),
                 Message = "warning: " ++ detism_decl_name(DetismDecl) ++
                     " could be tighter.\n",
                 report_determinism_problem(PredId, ProcId, !.ModuleInfo,
@@ -252,34 +252,37 @@
             )
         ;
             Cmp = tighter,
-            proc_info_get_detism_decl(ProcInfo0, DetismDecl),
+            proc_info_get_detism_decl(ProcInfo, DetismDecl),
             Message = "error: " ++ detism_decl_name(DetismDecl) ++
                 " not satisfied.\n",
             report_determinism_problem(PredId, ProcId, !.ModuleInfo, Message,
                 DeclaredDetism, InferredDetism, ReportMsgs),
-            proc_info_get_goal(ProcInfo0, Goal),
-            proc_info_get_vartypes(ProcInfo0, VarTypes),
-            proc_info_get_initial_instmap(ProcInfo0, !.ModuleInfo, InstMap0),
+            proc_info_get_goal(ProcInfo, Goal),
+            proc_info_get_vartypes(ProcInfo, VarTypes),
+            proc_info_get_initial_instmap(ProcInfo, !.ModuleInfo, InstMap0),
             det_info_init(!.ModuleInfo, VarTypes, PredId, ProcId, 
                 pess_extra_vars_report, [], DetInfo0),
             det_diagnose_goal(Goal, InstMap0, DeclaredDetism, [],
-                DetInfo0, DetInfo, GoalMsgs0),
+                DetInfo0, DetInfo, GoalMsgs),
             det_info_get_module_info(DetInfo, !:ModuleInfo),
-            sort_error_msgs(GoalMsgs0, GoalMsgs),
+            sort_error_msgs(GoalMsgs, SortedGoalMsgs),
             ReportSpec = error_spec(severity_error, phase_detism_check,
-                ReportMsgs ++ GoalMsgs),
+                ReportMsgs ++ SortedGoalMsgs),
             !:Specs = [ReportSpec | !.Specs]
         )
     ),
 
+    make_reqscope_checks_if_needed(!.ModuleInfo, PredId, ProcId,
+        PredInfo, ProcInfo, !Specs),
+
     % Make sure the code model is valid given the eval method.
-    proc_info_get_eval_method(ProcInfo0, EvalMethod),
+    proc_info_get_eval_method(ProcInfo, EvalMethod),
     Valid = valid_determinism_for_eval_method(EvalMethod, InferredDetism),
     (
         Valid = yes
     ;
         Valid = no,
-        proc_info_get_context(ProcInfo0, Context),
+        proc_info_get_context(ProcInfo, Context),
         MainPieces =
             [words("Error: `pragma "
                 ++ eval_method_to_pragma_name(EvalMethod) ++ "'"),
@@ -303,6 +306,26 @@
         !:Specs = [ValidSpec | !.Specs]
     ).
 
+:- pred make_reqscope_checks_if_needed(module_info::in,
+    pred_id::in, proc_id::in, pred_info::in, proc_info::in,
+    list(error_spec)::in, list(error_spec)::out) is det.
+
+make_reqscope_checks_if_needed(ModuleInfo, PredId, ProcId, PredInfo, ProcInfo,
+        !Specs) :-
+    pred_info_get_markers(PredInfo, Markers),
+    ( check_marker(Markers, marker_has_require_scope) ->
+        proc_info_get_goal(ProcInfo, Goal),
+        proc_info_get_vartypes(ProcInfo, VarTypes),
+        proc_info_get_initial_instmap(ProcInfo, ModuleInfo, InstMap0),
+        det_info_init(ModuleInfo, VarTypes, PredId, ProcId, 
+            pess_extra_vars_ignore, [], DetInfo0),
+        reqscope_check_goal(Goal, InstMap0, DetInfo0, DetInfo),
+        det_info_get_error_specs(DetInfo, RCSSpecs),
+        !:Specs = RCSSpecs ++ !.Specs
+    ;
+        true
+    ).
+
 :- func detism_decl_name(detism_decl) = string.
 
 detism_decl_name(DetismDecl) = Name :-
@@ -318,7 +341,7 @@
         % This shouldn't happen, but if it does, it is better to get an
         % error message that puts you on the right track than to get
         % a compiler abort.
-        % unexpected(this_file, "detism_decl_name: detism_decl_none")
+        % unexpected($module, $pred, "detism_decl_name: detism_decl_none")
     ).
 
 :- pred get_valid_dets(eval_method::in, determinism::out) is nondet.
@@ -590,35 +613,14 @@
             Context = goal_info_get_context(GoalInfo),
             det_diagnose_switch_context(SwitchContexts, !.DetInfo,
                 NestingPieces),
-            det_get_proc_info(!.DetInfo, ProcInfo),
-            proc_info_get_varset(ProcInfo, VarSet),
-            VarStr = mercury_var_to_string(VarSet, no, Var),
-            det_info_get_module_info(!.DetInfo, ModuleInfo),
-            (
+            find_missing_cons_ids(!.DetInfo, InstMap0, Var, Cases,
+                VarStr, MaybeMissingPieces),
                 (
-                    instmap_lookup_var(InstMap0, Var, VarInst),
-                    inst_is_bound_to_functors(ModuleInfo, VarInst, BoundInsts)
-                ->
-                    det_info_get_vartypes(!.DetInfo, VarTypes),
-                    map.lookup(VarTypes, Var, VarType),
-                    type_to_ctor_det(VarType, VarTypeCtor),
-                    list.map(bound_inst_to_cons_id(VarTypeCtor),
-                        BoundInsts, ConsIds)
-                ;
-                    det_lookup_var_type(ModuleInfo, ProcInfo, Var, TypeDefn),
-                    hlds_data.get_type_defn_body(TypeDefn, TypeBody),
-                    ConsTable = TypeBody ^ du_type_cons_tag_values,
-                    map.keys(ConsTable, ConsIds)
-                )
-            ->
-                % XXX If the current instmap has an entry giving the set of
-                % possible bindings for Var, we should restrict ConsIds
-                % to the functors that appear in it.
-                det_diagnose_missing_consids(ConsIds, Cases, MissingConsIds),
-                cons_id_list_to_pieces(MissingConsIds, MissingPieces),
+                MaybeMissingPieces = yes(MissingPieces),
                 Pieces = [words("The switch on"), fixed(VarStr),
                     words("does not cover") | MissingPieces]
             ;
+                MaybeMissingPieces = no,
                 Pieces = [words("The switch on"), fixed(VarStr),
                     words("can fail.")]
             ),
@@ -626,8 +628,10 @@
         ;
             Msgs1 = []
         ),
-        det_diagnose_switch_arms(Var, Cases, InstMap0, Desired, SwitchContexts,
-            !DetInfo, Msgs2),
+        det_info_get_vartypes(!.DetInfo, VarTypes),
+        map.lookup(VarTypes, Var, VarType),
+        det_diagnose_switch_arms(Var, VarType, Cases, InstMap0,
+            Desired, SwitchContexts, !DetInfo, Msgs2),
         Msgs = Msgs1 ++ Msgs2
     ;
         GoalExpr = plain_call(PredId, ProcId, _, _, CallContext, _),
@@ -640,7 +644,8 @@
     ;
         GoalExpr = generic_call(GenericCall, _, _, _),
         Context = goal_info_get_context(GoalInfo),
-        report_generic_call_context(GenericCall, StartingPieces),
+        hlds_goal.generic_call_id(GenericCall, CallId),
+        StartingPieces = [words(call_id_to_string(CallId))],
         det_diagnose_primitive_goal(Desired, Actual, Context, StartingPieces,
             Msgs)
     ;
@@ -728,21 +733,12 @@
         ;
             ShortHand = bi_implication(_, _),
             % These should have been expanded out by now.
-            unexpected(this_file, "det_diagnose_goal_expr: bi_implication")
+            unexpected($module, $pred, "bi_implication")
         )
     ).
 
 %-----------------------------------------------------------------------------%
 
-:- pred report_generic_call_context(generic_call::in,
-    list(format_component)::out) is det.
-
-report_generic_call_context(CallType, StartingPieces) :-
-    hlds_goal.generic_call_id(CallType, CallId),
-    StartingPieces = [words(call_id_to_string(CallId))].
-
-%-----------------------------------------------------------------------------%
-
 :- pred det_diagnose_primitive_goal(determinism::in, determinism::in,
     prog_context::in, list(format_component)::in, list(error_msg)::out) is det.
 
@@ -851,26 +847,25 @@
         !DetInfo, !ClausesWithSoln, Msgs2),
     Msgs = Msgs1 ++ Msgs2.
 
-:- pred det_diagnose_switch_arms(prog_var::in, list(case)::in, instmap::in,
-    determinism::in, list(switch_context)::in, det_info::in, det_info::out,
-    list(error_msg)::out) is det.
+:- pred det_diagnose_switch_arms(prog_var::in, mer_type::in, list(case)::in,
+    instmap::in, determinism::in, list(switch_context)::in,
+    det_info::in, det_info::out, list(error_msg)::out) is det.
 
-det_diagnose_switch_arms(_Var, [], _, _Desired, _SwitchContexts, !DetInfo, []).
-det_diagnose_switch_arms(Var, [Case | Cases], InstMap0, Desired,
+det_diagnose_switch_arms(_Var, _VarType, [], _, _Desired, _SwitchContexts,
+        !DetInfo, []).
+det_diagnose_switch_arms(Var, VarType, [Case | Cases], InstMap0, Desired,
         SwitchContexts0, !DetInfo, Msgs) :-
     Case = case(MainConsId, OtherConsIds, Goal),
     NewSwitchContext = switch_context(Var, MainConsId, OtherConsIds),
     SwitchContexts1 = [NewSwitchContext | SwitchContexts0],
-    det_info_get_vartypes(!.DetInfo, VarTypes),
-    map.lookup(VarTypes, Var, VarType),
     det_info_get_module_info(!.DetInfo, ModuleInfo0),
     bind_var_to_functors(Var, VarType, MainConsId, OtherConsIds,
         InstMap0, InstMap1, ModuleInfo0, ModuleInfo),
     det_info_set_module_info(ModuleInfo, !DetInfo),
     det_diagnose_goal(Goal, InstMap1, Desired, SwitchContexts1,
         !DetInfo, Msgs1),
-    det_diagnose_switch_arms(Var, Cases, InstMap0, Desired, SwitchContexts0,
-        !DetInfo, Msgs2),
+    det_diagnose_switch_arms(Var, VarType, Cases, InstMap0, Desired,
+        SwitchContexts0, !DetInfo, Msgs2),
     Msgs = Msgs1 ++ Msgs2.
 
 :- pred det_diagnose_orelse_goals(list(hlds_goal)::in, instmap::in,
@@ -888,6 +883,200 @@
 
 %-----------------------------------------------------------------------------%
 
+    % Check that the switches in all require_complete_switch scopes
+    % are actually complete. If they are not, add an error message
+    % to !DetInfo.
+    %
+:- pred reqscope_check_goal(hlds_goal::in, instmap::in,
+    det_info::in, det_info::out) is det.
+
+reqscope_check_goal(Goal, InstMap0, !DetInfo) :-
+    Goal = hlds_goal(GoalExpr, GoalInfo),
+    (
+        GoalExpr = conj(_, Goals),
+        reqscope_check_conj(Goals, InstMap0, !DetInfo)
+    ;
+        GoalExpr = disj(Goals),
+        reqscope_check_disj(Goals, InstMap0, !DetInfo)
+    ;
+        GoalExpr = switch(Var, _, Cases),
+        det_info_get_vartypes(!.DetInfo, VarTypes),
+        map.lookup(VarTypes, Var, VarType),
+        reqscope_check_switch(Var, VarType, Cases, InstMap0, !DetInfo)
+    ;
+        GoalExpr = if_then_else(_, Cond, Then, Else),
+        reqscope_check_goal(Cond, InstMap0, !DetInfo),
+        update_instmap(Cond, InstMap0, InstMap1),
+        reqscope_check_goal(Then, InstMap1, !DetInfo),
+        reqscope_check_goal(Else, InstMap0, !DetInfo)
+    ;
+        GoalExpr = negation(SubGoal),
+        reqscope_check_goal(SubGoal, InstMap0, !DetInfo)
+    ;
+        GoalExpr = scope(Reason, SubGoal),
+        reqscope_check_scope(Reason, SubGoal, GoalInfo, InstMap0, !DetInfo),
+        reqscope_check_goal(SubGoal, InstMap0, !DetInfo)
+    ;
+        GoalExpr = shorthand(ShortHand),
+        (
+            ShortHand = atomic_goal(_, _, _, _, MainGoal, OrElseGoals, _),
+            reqscope_check_goal(MainGoal, InstMap0, !DetInfo),
+            reqscope_check_disj(OrElseGoals, InstMap0, !DetInfo)
+        ;
+            ShortHand = try_goal(_, _, SubGoal),
+            reqscope_check_goal(SubGoal, InstMap0, !DetInfo)
+        ;
+            ShortHand = bi_implication(_, _),
+            % These should have been expanded out by now.
+            unexpected($module, $pred, "bi_implication")
+        )
+    ;
+        ( GoalExpr = plain_call(_, _, _, _, _, _)
+        ; GoalExpr = generic_call(_, _, _, _)
+        ; GoalExpr = unify(_, _, _, _, _)
+        ; GoalExpr = call_foreign_proc(_, _, _, _, _, _, _)
+        )
+    ).
+
+:- pred reqscope_check_scope(scope_reason::in, hlds_goal::in,
+    hlds_goal_info::in, instmap::in, det_info::in, det_info::out) is det.
+
+reqscope_check_scope(Reason, SubGoal, ScopeGoalInfo, InstMap0, !DetInfo) :-
+    (
+        Reason = require_detism(RequiredDetism),
+        SubGoal = hlds_goal(_, SubGoalInfo),
+        ActualDetism = goal_info_get_determinism(SubGoalInfo),
+        ( ActualDetism = RequiredDetism ->
+            true
+        ;
+            RequiredDetismStr = determinism_to_string(RequiredDetism),
+            ActualDetismStr = determinism_to_string(ActualDetism),
+            DetismPieces = [words("Error: required determinism is"),
+                quote(RequiredDetismStr), suffix(","),
+                words("but actual determinism is"),
+                quote(ActualDetismStr), suffix("."), nl],
+            Context = goal_info_get_context(ScopeGoalInfo),
+            DetismMsg = simple_msg(Context, [always(DetismPieces)]),
+            DetismSpec = error_spec(severity_error, phase_detism_check,
+                [DetismMsg]),
+            det_info_add_error_spec(DetismSpec, !DetInfo)
+        )
+    ;
+        Reason = require_complete_switch(RequiredVar),
+        % We must test the version of the subgoal that has not yet been
+        % simplified, since simplification can convert a complete
+        % switch into an incomplete switch by deleting an arm
+        % consisting of nothing but `fail'.
+        SubGoal = hlds_goal(SubGoalExpr, _),
+        (
+            SubGoalExpr = switch(SwitchVar, CanFail, Cases),
+            SwitchVar = RequiredVar
+        ->
+            (
+                CanFail = cannot_fail
+            ;
+                CanFail = can_fail,
+                find_missing_cons_ids(!.DetInfo, InstMap0, SwitchVar, Cases,
+                    VarStr, MaybeMissingPieces),
+                (
+                    MaybeMissingPieces = yes(MissingPieces),
+                    SwitchPieces = [words("Error: the switch on"),
+                        quote(VarStr), 
+                        words("is required to be complete,"),
+                        words("but it does not cover") | MissingPieces]
+                ;
+                    MaybeMissingPieces = no,
+                    SwitchPieces = [words("Error: the switch on"),
+                        quote(VarStr), 
+                        words("is required to be complete,"),
+                        words("but it is not.")]
+                ),
+                Context = goal_info_get_context(ScopeGoalInfo),
+                SwitchMsg = simple_msg(Context,
+                    [always(SwitchPieces)]),
+                SwitchSpec = error_spec(severity_error, phase_detism_check,
+                    [SwitchMsg]),
+                det_info_add_error_spec(SwitchSpec, !DetInfo)
+            )
+        ;
+            true
+        )
+    ;
+        ( Reason = exist_quant(_)
+        ; Reason = commit(_)
+        ; Reason = barrier(_)
+        ; Reason = promise_purity(_)
+        ; Reason = promise_solutions(_, _)
+        ; Reason = from_ground_term(_, _)
+        ; Reason = trace_goal(_, _, _, _, _)
+        )
+    ).
+
+:- pred reqscope_check_conj(list(hlds_goal)::in, instmap::in,
+    det_info::in, det_info::out) is det.
+
+reqscope_check_conj([], _InstMap0, !DetInfo).
+reqscope_check_conj([Goal | Goals], InstMap0, !DetInfo) :-
+    reqscope_check_goal(Goal, InstMap0, !DetInfo),
+    update_instmap(Goal, InstMap0, InstMap1),
+    reqscope_check_conj(Goals, InstMap1, !DetInfo).
+
+:- pred reqscope_check_disj(list(hlds_goal)::in, instmap::in,
+    det_info::in, det_info::out) is det.
+
+reqscope_check_disj([], _InstMap0, !DetInfo).
+reqscope_check_disj([Goal | Goals], InstMap0, !DetInfo) :-
+    reqscope_check_goal(Goal, InstMap0, !DetInfo),
+    reqscope_check_disj(Goals, InstMap0, !DetInfo).
+
+:- pred reqscope_check_switch(prog_var::in, mer_type::in, list(case)::in,
+    instmap::in, det_info::in, det_info::out) is det.
+
+reqscope_check_switch(_Var, _VarType, [], _InstMap0, !DetInfo).
+reqscope_check_switch(Var, VarType, [Case | Cases], InstMap0, !DetInfo) :-
+    Case = case(MainConsId, OtherConsIds, Goal),
+    det_info_get_module_info(!.DetInfo, ModuleInfo0),
+    bind_var_to_functors(Var, VarType, MainConsId, OtherConsIds,
+        InstMap0, InstMap1, ModuleInfo0, ModuleInfo),
+    det_info_set_module_info(ModuleInfo, !DetInfo),
+    reqscope_check_goal(Goal, InstMap1, !DetInfo),
+    reqscope_check_switch(Var, VarType, Cases, InstMap0, !DetInfo).
+
+%-----------------------------------------------------------------------------%
+
+:- pred find_missing_cons_ids(det_info::in, instmap::in, prog_var::in,
+    list(case)::in, string::out, maybe(list(format_component))::out) is det.
+
+find_missing_cons_ids(DetInfo, InstMap0, Var, Cases, VarStr,
+        MaybeMissingPieces) :-
+    det_get_proc_info(DetInfo, ProcInfo),
+    proc_info_get_varset(ProcInfo, VarSet),
+    VarStr = mercury_var_to_string(VarSet, no, Var),
+    det_info_get_module_info(DetInfo, ModuleInfo),
+    (
+        (
+            instmap_lookup_var(InstMap0, Var, VarInst),
+            inst_is_bound_to_functors(ModuleInfo, VarInst, BoundInsts)
+        ->
+            det_info_get_vartypes(DetInfo, VarTypes),
+            map.lookup(VarTypes, Var, VarType),
+            type_to_ctor_det(VarType, VarTypeCtor),
+            list.map(bound_inst_to_cons_id(VarTypeCtor),
+                BoundInsts, ConsIds)
+        ;
+            det_lookup_var_type(ModuleInfo, ProcInfo, Var, TypeDefn),
+            hlds_data.get_type_defn_body(TypeDefn, TypeBody),
+            ConsTable = TypeBody ^ du_type_cons_tag_values,
+            map.keys(ConsTable, ConsIds)
+        )
+    ->
+        det_diagnose_missing_consids(ConsIds, Cases, MissingConsIds),
+        cons_id_list_to_pieces(MissingConsIds, MissingPieces),
+        MaybeMissingPieces = yes(MissingPieces)
+    ;
+        MaybeMissingPieces = no
+    ).
+
 :- pred det_diagnose_missing_consids(list(cons_id)::in, list(case)::in,
     list(cons_id)::out) is det.
 
@@ -1197,11 +1386,5 @@
     globals.set_option(Option, Value, !Globals).
 
 %-----------------------------------------------------------------------------%
-
-:- func this_file = string.
-
-this_file = "det_report.m".
-
-%-----------------------------------------------------------------------------%
 :- end_module det_report.
 %-----------------------------------------------------------------------------%
Index: compiler/det_util.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/det_util.m,v
retrieving revision 1.53
diff -u -b -r1.53 det_util.m
--- compiler/det_util.m	15 Dec 2010 06:29:33 -0000	1.53
+++ compiler/det_util.m	2 Jan 2011 10:08:26 -0000
@@ -58,6 +58,20 @@
     ;       pess_extra_vars_ignore.
             % Do not emit an error message if the above occurs.
 
+    % Does the predicate being analyzed contain a require_complete_switch
+    % or require_detism scope?
+    %
+:- type contains_require_scope
+    --->    does_not_contain_require_scope
+    ;       contains_require_scope.
+
+    % Does the predicate being analyzed contain a call that can be optimized
+    % by format_call.m?
+    %
+:- type contains_format_call
+    --->    does_not_contain_format_call
+    ;       contains_format_call.
+
 :- type det_info.
 
     % Given a list of cases, and a list of the possible cons_ids
@@ -102,15 +116,18 @@
 :- pred det_info_get_vartypes(det_info::in, vartypes::out) is det.
 :- pred det_info_get_pess_extra_vars(det_info::in,
     report_pess_extra_vars::out) is det.
+:- pred det_info_get_has_format_call(det_info::in,
+    contains_format_call::out) is det.
+:- pred det_info_get_has_req_scope(det_info::in,
+    contains_require_scope::out) is det.
 :- pred det_info_get_error_specs(det_info::in, list(error_spec)::out) is det.
-:- pred det_info_get_has_format_call(det_info::in, bool::out) is det.
 
 :- pred det_info_set_module_info(module_info::in, det_info::in, det_info::out)
     is det.
 :- pred det_info_set_vartypes(vartypes::in, det_info::in, det_info::out)
     is det.
-:- pred det_info_set_has_format_call(bool::in, det_info::in, det_info::out)
-    is det.
+:- pred det_info_set_has_format_call(det_info::in, det_info::out) is det.
+:- pred det_info_set_has_req_scope(det_info::in, det_info::out) is det.
 
 %-----------------------------------------------------------------------------%
 %-----------------------------------------------------------------------------%
@@ -124,7 +141,6 @@
 :- import_module parse_tree.prog_util.
 
 :- import_module map.
-:- import_module require.
 :- import_module set_tree234.
 :- import_module term.
 
@@ -193,12 +209,9 @@
 det_lookup_var_type(ModuleInfo, ProcInfo, Var, TypeDefn) :-
     proc_info_get_vartypes(ProcInfo, VarTypes),
     map.lookup(VarTypes, Var, Type),
-    ( type_to_ctor(Type, TypeCtor) ->
+    type_to_ctor_det(Type, TypeCtor),
         module_info_get_type_table(ModuleInfo, TypeTable),
-        search_type_ctor_defn(TypeTable, TypeCtor, TypeDefn)
-    ;
-        unexpected(this_file, "det_lookup_var_type")
-    ).
+    search_type_ctor_defn(TypeTable, TypeCtor, TypeDefn).
 
 det_no_output_vars(Vars, InstMap, InstMapDelta, DetInfo) :-
     det_info_get_module_info(DetInfo, ModuleInfo),
@@ -222,8 +235,9 @@
                 di_reorder_disj     :: bool,        % --reorder-disj
                 di_fully_strict     :: bool,        % --fully-strict
                 di_pess_extra_vars  :: report_pess_extra_vars,
-                di_error_specs      :: list(error_spec),
-                di_has_format_call  :: bool
+                di_has_format_call  :: contains_format_call,
+                di_has_req_scope    :: contains_require_scope,
+                di_error_specs      :: list(error_spec)
             ).
 
 det_info_init(ModuleInfo, VarTypes, PredId, ProcId, PessExtraVars,
@@ -233,7 +247,9 @@
     globals.lookup_bool_option(Globals, reorder_disj, ReorderDisj),
     globals.lookup_bool_option(Globals, fully_strict, FullyStrict),
     DetInfo = det_info(ModuleInfo, VarTypes, PredId, ProcId,
-        ReorderConj, ReorderDisj, FullyStrict, PessExtraVars, Specs, no).
+        ReorderConj, ReorderDisj, FullyStrict, PessExtraVars,
+        does_not_contain_format_call, does_not_contain_require_scope,
+        Specs).
 
 det_info_get_module_info(DI, DI ^ di_module_info).
 det_info_get_pred_id(DI, DI ^ di_pred_id).
@@ -243,8 +259,9 @@
 det_info_get_fully_strict(DI, DI ^ di_fully_strict).
 det_info_get_vartypes(DI, DI ^ di_vartypes).
 det_info_get_pess_extra_vars(DI, DI ^ di_pess_extra_vars).
-det_info_get_error_specs(DI, DI ^ di_error_specs).
 det_info_get_has_format_call(DI, DI ^ di_has_format_call).
+det_info_get_has_req_scope(DI, DI ^ di_has_req_scope).
+det_info_get_error_specs(DI, DI ^ di_error_specs).
 
 :- pred det_info_set_error_specs(list(error_spec)::in,
     det_info::in, det_info::out) is det.
@@ -253,16 +270,12 @@
     !DetInfo ^ di_module_info := ModuleInfo.
 det_info_set_vartypes(VarTypes, !DetInfo) :-
     !DetInfo ^ di_vartypes := VarTypes.
+det_info_set_has_format_call(!DetInfo) :-
+    !DetInfo ^ di_has_format_call := contains_format_call.
+det_info_set_has_req_scope(!DetInfo) :-
+    !DetInfo ^ di_has_req_scope := contains_require_scope.
 det_info_set_error_specs(Specs, !DetInfo) :-
     !DetInfo ^ di_error_specs := Specs.
-det_info_set_has_format_call(HasFormatCall, !DetInfo) :-
-    !DetInfo ^ di_has_format_call := HasFormatCall.
-
-%-----------------------------------------------------------------------------%
-
-:- func this_file = string.
-
-this_file = "det_util.m".
 
 %-----------------------------------------------------------------------------%
 :- end_module det_util.
Index: compiler/hlds_module.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/hlds_module.m,v
retrieving revision 1.168
diff -u -b -r1.168 hlds_module.m
--- compiler/hlds_module.m	30 Dec 2010 11:17:55 -0000	1.168
+++ compiler/hlds_module.m	2 Jan 2011 07:44:59 -0000
@@ -651,7 +651,6 @@
 :- import_module libs.options.
 :- import_module parse_tree.file_names.
 :- import_module parse_tree.module_imports.
-:- import_module parse_tree.prog_util.
 :- import_module transform_hlds.mmc_analysis.
 
 :- import_module assoc_list.
Index: compiler/hlds_out_pred.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/hlds_out_pred.m,v
retrieving revision 1.3
diff -u -b -r1.3 hlds_out_pred.m
--- compiler/hlds_out_pred.m	20 Dec 2010 07:47:31 -0000	1.3
+++ compiler/hlds_out_pred.m	2 Jan 2011 10:00:51 -0000
@@ -1246,6 +1246,7 @@
 marker_name(marker_calls_are_fully_qualified, "calls_are_fully_qualified").
 marker_name(marker_mode_check_clauses, "mode_check_clauses").
 marker_name(marker_mutable_access_pred, "mutable_access_pred").
+marker_name(marker_has_require_scope, "has_require_scope").
 marker_name(marker_has_format_call, "has_format_call").
 
 %-----------------------------------------------------------------------------%
Index: compiler/hlds_pred.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/hlds_pred.m,v
retrieving revision 1.263
diff -u -b -r1.263 hlds_pred.m
--- compiler/hlds_pred.m	20 Dec 2010 07:47:31 -0000	1.263
+++ compiler/hlds_pred.m	2 Jan 2011 09:52:21 -0000
@@ -424,6 +424,14 @@
             % This marker is used to inform inlining that we should _always_
             % attempt to inline this predicate across module boundaries.
 
+    ;       marker_has_require_scope
+            % The body of this predicate contains a require_complete_switch
+            % or require_detism scope. This marker is set if applicable during
+            % determinism inference. It is used during determinism reporting:
+            % procedures that have this marker are checked for violations of
+            % the requirements of these scopes even if the overall determinism
+            % of the procedure body is correct.
+
     ;       marker_has_format_call.
             % The body of this predicate contains calls to predicates
             % recognized by format_call.is_format_call. This marker is set
Index: compiler/intermod.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/intermod.m,v
retrieving revision 1.256
diff -u -b -r1.256 intermod.m
--- compiler/intermod.m	30 Dec 2010 11:17:55 -0000	1.256
+++ compiler/intermod.m	2 Jan 2011 10:01:02 -0000
@@ -2015,6 +2015,7 @@
 should_output_marker(marker_calls_are_fully_qualified, no).
 should_output_marker(marker_mode_check_clauses, yes).
 should_output_marker(marker_mutable_access_pred, no).
+should_output_marker(marker_has_require_scope, no).
 should_output_marker(marker_has_format_call, no).
 
 :- pred get_pragma_foreign_code_vars(list(foreign_arg)::in, list(mer_mode)::in,
Index: compiler/make_tags.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/make_tags.m,v
retrieving revision 1.61
diff -u -b -r1.61 make_tags.m
--- compiler/make_tags.m	15 Dec 2010 06:29:43 -0000	1.61
+++ compiler/make_tags.m	2 Jan 2011 07:46:16 -0000
@@ -88,7 +88,6 @@
 :- import_module libs.globals.
 :- import_module libs.options.
 :- import_module parse_tree.prog_type.
-:- import_module parse_tree.prog_util.
 
 :- import_module bool.
 :- import_module int.
Index: compiler/mark_static_terms.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/mark_static_terms.m,v
retrieving revision 1.34
diff -u -b -r1.34 mark_static_terms.m
--- compiler/mark_static_terms.m	15 Dec 2010 06:29:43 -0000	1.34
+++ compiler/mark_static_terms.m	2 Jan 2011 07:46:31 -0000
@@ -40,11 +40,8 @@
 :- import_module parse_tree.prog_data.
 
 :- import_module list.
-:- import_module map.
-:- import_module pair.
 :- import_module require.
 :- import_module set_tree234.
-:- import_module svmap.
 
 %-----------------------------------------------------------------------------%
 
Index: compiler/mark_tail_calls.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/mark_tail_calls.m,v
retrieving revision 1.3
diff -u -b -r1.3 mark_tail_calls.m
--- compiler/mark_tail_calls.m	20 Dec 2010 07:47:34 -0000	1.3
+++ compiler/mark_tail_calls.m	2 Jan 2011 08:01:53 -0000
@@ -33,7 +33,6 @@
 :- implementation.
 
 :- import_module check_hlds.mode_util.
-:- import_module libs.compiler_util.
 :- import_module parse_tree.prog_data.
 
 :- import_module list.
Index: compiler/md4.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/md4.m,v
retrieving revision 1.2
diff -u -b -r1.2 md4.m
--- compiler/md4.m	2 Nov 2009 05:53:44 -0000	1.2
+++ compiler/md4.m	2 Jan 2011 07:47:32 -0000
@@ -34,8 +34,6 @@
 :- module libs.md4.
 :- interface.
 
-:- import_module string.
-
 :- func md4sum(string) = string.
 
 %-----------------------------------------------------------------------------%
@@ -43,8 +41,6 @@
 
 :- implementation.
 
-:- import_module libs.compiler_util.
-
 %-----------------------------------------------------------------------------%
 
 :- pragma foreign_decl("C", "local", "
Index: compiler/ml_call_gen.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/ml_call_gen.m,v
retrieving revision 1.88
diff -u -b -r1.88 ml_call_gen.m
--- compiler/ml_call_gen.m	15 Dec 2010 06:29:46 -0000	1.88
+++ compiler/ml_call_gen.m	2 Jan 2011 07:49:01 -0000
@@ -95,14 +95,10 @@
 :- import_module libs.globals.
 :- import_module libs.options.
 :- import_module mdbcomp.prim_data.
-:- import_module ml_backend.ml_accurate_gc.
-:- import_module ml_backend.ml_closure_gen.
 :- import_module ml_backend.ml_code_util.
-:- import_module parse_tree.prog_type.
 
 :- import_module bool.
 :- import_module int.
-:- import_module map.
 :- import_module maybe.
 :- import_module require.
 :- import_module string.
Index: compiler/ml_code_gen.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/ml_code_gen.m,v
retrieving revision 1.229
diff -u -b -r1.229 ml_code_gen.m
--- compiler/ml_code_gen.m	15 Dec 2010 06:29:46 -0000	1.229
+++ compiler/ml_code_gen.m	2 Jan 2011 08:03:39 -0000
@@ -513,36 +513,22 @@
 :- implementation.
 
 :- import_module backend_libs.builtin_ops.
-:- import_module backend_libs.c_util.
-:- import_module backend_libs.foreign. % XXX needed for pragma foreign code
-:- import_module check_hlds.mode_util.
 :- import_module check_hlds.type_util.
-:- import_module hlds.goal_form.
-:- import_module hlds.hlds_module.
-:- import_module hlds.hlds_pred.
-:- import_module libs.globals.
-:- import_module libs.options.
 :- import_module ml_backend.ml_call_gen.
 :- import_module ml_backend.ml_code_util.
 :- import_module ml_backend.ml_commit_gen.
 :- import_module ml_backend.ml_disj_gen.
 :- import_module ml_backend.ml_foreign_proc_gen.
 :- import_module ml_backend.ml_gen_info.
-:- import_module ml_backend.ml_global_data.
 :- import_module ml_backend.ml_switch_gen.
-:- import_module ml_backend.ml_type_gen.
 :- import_module ml_backend.ml_unify_gen.
-:- import_module ml_backend.ml_util.
-:- import_module parse_tree.builtin_lib_types.
 :- import_module parse_tree.prog_type.
 
 :- import_module bool.
 :- import_module map.
 :- import_module maybe.
-:- import_module pair.
 :- import_module require.
 :- import_module set.
-:- import_module string.
 
 %-----------------------------------------------------------------------------%
 %-----------------------------------------------------------------------------%
Index: compiler/ml_code_util.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/ml_code_util.m,v
retrieving revision 1.154
diff -u -b -r1.154 ml_code_util.m
--- compiler/ml_code_util.m	15 Dec 2010 06:29:47 -0000	1.154
+++ compiler/ml_code_util.m	2 Jan 2011 07:50:30 -0000
@@ -553,9 +553,7 @@
 
 :- import_module backend_libs.foreign.
 :- import_module check_hlds.mode_util.
-:- import_module check_hlds.polymorphism.
 :- import_module check_hlds.type_util.
-:- import_module hlds.instmap.
 :- import_module libs.globals.
 :- import_module libs.options.
 :- import_module mdbcomp.program_representation.
@@ -568,13 +566,10 @@
 :- import_module parse_tree.prog_type.
 :- import_module parse_tree.prog_util.
 
-:- import_module counter.
-:- import_module int.
 :- import_module map.
 :- import_module pair.
 :- import_module require.
 :- import_module set.
-:- import_module stack.
 :- import_module string.
 :- import_module term.
 :- import_module varset.
Index: compiler/ml_lookup_switch.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/ml_lookup_switch.m,v
retrieving revision 1.6
diff -u -b -r1.6 ml_lookup_switch.m
--- compiler/ml_lookup_switch.m	15 Dec 2010 06:29:47 -0000	1.6
+++ compiler/ml_lookup_switch.m	2 Jan 2011 07:50:44 -0000
@@ -49,8 +49,6 @@
 :- import_module hlds.goal_form.
 :- import_module hlds.hlds_data.
 :- import_module hlds.hlds_module.
-:- import_module libs.globals.
-:- import_module ml_backend.ml_code_gen.
 :- import_module ml_backend.ml_code_util.
 :- import_module ml_backend.ml_global_data.
 :- import_module ml_backend.ml_util.
Index: compiler/ml_optimize.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/ml_optimize.m,v
retrieving revision 1.67
diff -u -b -r1.67 ml_optimize.m
--- compiler/ml_optimize.m	15 Dec 2010 06:29:47 -0000	1.67
+++ compiler/ml_optimize.m	2 Jan 2011 08:02:00 -0000
@@ -53,7 +53,6 @@
 :- import_module int.
 :- import_module list.
 :- import_module maybe.
-:- import_module pair.
 :- import_module require.
 :- import_module std_util.
 :- import_module string.
Index: compiler/ml_proc_gen.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/ml_proc_gen.m,v
retrieving revision 1.9
diff -u -b -r1.9 ml_proc_gen.m
--- compiler/ml_proc_gen.m	15 Dec 2010 06:29:47 -0000	1.9
+++ compiler/ml_proc_gen.m	2 Jan 2011 07:50:57 -0000
@@ -37,7 +37,6 @@
 :- import_module hlds.hlds_goal.
 :- import_module hlds.hlds_pred.
 :- import_module hlds.passes_aux.
-:- import_module hlds.pred_table.
 :- import_module hlds.quantification.
 :- import_module libs.globals.
 :- import_module libs.options.
Index: compiler/ml_simplify_switch.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/ml_simplify_switch.m,v
retrieving revision 1.31
diff -u -b -r1.31 ml_simplify_switch.m
--- compiler/ml_simplify_switch.m	15 Dec 2010 06:29:47 -0000	1.31
+++ compiler/ml_simplify_switch.m	2 Jan 2011 07:51:04 -0000
@@ -45,7 +45,6 @@
 :- import_module parse_tree.prog_type.
 
 :- import_module bool.
-:- import_module cord.
 :- import_module int.
 :- import_module list.
 :- import_module map.
Index: compiler/ml_string_switch.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/ml_string_switch.m,v
retrieving revision 1.47
diff -u -b -r1.47 ml_string_switch.m
--- compiler/ml_string_switch.m	15 Dec 2010 06:29:47 -0000	1.47
+++ compiler/ml_string_switch.m	2 Jan 2011 07:51:42 -0000
@@ -49,7 +49,6 @@
 :- import_module parse_tree.builtin_lib_types.
 
 :- import_module assoc_list.
-:- import_module bool.
 :- import_module int.
 :- import_module map.
 :- import_module maybe.
Index: compiler/ml_switch_gen.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/ml_switch_gen.m,v
retrieving revision 1.52
diff -u -b -r1.52 ml_switch_gen.m
--- compiler/ml_switch_gen.m	15 Dec 2010 06:29:47 -0000	1.52
+++ compiler/ml_switch_gen.m	2 Jan 2011 07:51:53 -0000
@@ -118,7 +118,6 @@
 :- import_module assoc_list.
 :- import_module bool.
 :- import_module int.
-:- import_module map.
 :- import_module maybe.
 :- import_module pair.
 :- import_module require.
Index: compiler/ml_type_gen.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/ml_type_gen.m,v
retrieving revision 1.97
diff -u -b -r1.97 ml_type_gen.m
--- compiler/ml_type_gen.m	15 Dec 2010 06:29:48 -0000	1.97
+++ compiler/ml_type_gen.m	2 Jan 2011 08:02:20 -0000
@@ -120,12 +120,9 @@
 :- import_module libs.options.
 :- import_module ml_backend.ml_code_util.
 :- import_module ml_backend.ml_util.
-:- import_module parse_tree.java_names.
 :- import_module parse_tree.prog_data.
 :- import_module parse_tree.prog_type.
-:- import_module parse_tree.prog_util.
 
-:- import_module assoc_list.
 :- import_module int.
 :- import_module list.
 :- import_module map.
Index: compiler/ml_unify_gen.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/ml_unify_gen.m,v
retrieving revision 1.152
diff -u -b -r1.152 ml_unify_gen.m
--- compiler/ml_unify_gen.m	15 Dec 2010 06:29:48 -0000	1.152
+++ compiler/ml_unify_gen.m	2 Jan 2011 07:52:07 -0000
@@ -139,16 +139,13 @@
 :- import_module ml_backend.ml_util.
 :- import_module parse_tree.builtin_lib_types.
 :- import_module parse_tree.prog_type.
-:- import_module parse_tree.prog_util.
 
 :- import_module assoc_list.
-:- import_module counter.
 :- import_module int.
 :- import_module map.
 :- import_module pair.
 :- import_module require.
 :- import_module set.
-:- import_module string.
 :- import_module svmap.
 :- import_module term.
 :- import_module varset.
Index: compiler/mlds.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/mlds.m,v
retrieving revision 1.187
diff -u -b -r1.187 mlds.m
--- compiler/mlds.m	15 Dec 2010 06:29:48 -0000	1.187
+++ compiler/mlds.m	2 Jan 2011 07:52:27 -0000
@@ -1849,11 +1849,9 @@
 :- import_module hlds.hlds_data.
 :- import_module libs.globals.
 :- import_module parse_tree.file_names.
-:- import_module parse_tree.prog_type.
-:- import_module parse_tree.prog_util.
 :- import_module parse_tree.java_names.
+:- import_module parse_tree.prog_type.
 
-:- import_module char.
 :- import_module int.
 :- import_module require.
 :- import_module string.
Index: compiler/mlds_to_c.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/mlds_to_c.m,v
retrieving revision 1.252
diff -u -b -r1.252 mlds_to_c.m
--- compiler/mlds_to_c.m	15 Dec 2010 06:29:48 -0000	1.252
+++ compiler/mlds_to_c.m	2 Jan 2011 07:52:45 -0000
@@ -90,12 +90,10 @@
 :- import_module ml_backend.ml_util.
 :- import_module parse_tree.file_names.
 :- import_module parse_tree.module_cmds.
-:- 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 parse_tree.prog_util.
 
 :- import_module assoc_list.
 :- import_module bool.
Index: compiler/mlds_to_cs.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/mlds_to_cs.m,v
retrieving revision 1.12
diff -u -b -r1.12 mlds_to_cs.m
--- compiler/mlds_to_cs.m	15 Dec 2010 06:29:48 -0000	1.12
+++ compiler/mlds_to_cs.m	2 Jan 2011 07:52:58 -0000
@@ -68,7 +68,6 @@
 :- import_module parse_tree.prog_out.
 :- import_module parse_tree.prog_type.
 
-:- import_module assoc_list.
 :- import_module bool.
 :- import_module cord.
 :- import_module digraph.
@@ -77,7 +76,6 @@
 :- import_module list.
 :- import_module map.
 :- import_module maybe.
-:- import_module pair.
 :- import_module require.
 :- import_module set.
 :- import_module string.
Index: compiler/mlds_to_gcc.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/mlds_to_gcc.m,v
retrieving revision 1.155
diff -u -b -r1.155 mlds_to_gcc.m
--- compiler/mlds_to_gcc.m	15 Dec 2010 06:29:48 -0000	1.155
+++ compiler/mlds_to_gcc.m	2 Jan 2011 07:53:49 -0000
@@ -169,7 +169,6 @@
 :- import_module ml_backend.ml_util.
 :- import_module ml_backend.mlds_to_c.  % to handle C foreign_code
 :- import_module parse_tree.file_names.
-:- import_module parse_tree.modules.
 :- import_module parse_tree.prog_data.
 :- import_module parse_tree.prog_foreign.
 :- import_module parse_tree.prog_type.
Index: compiler/mlds_to_il.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/mlds_to_il.m,v
retrieving revision 1.219
diff -u -b -r1.219 mlds_to_il.m
--- compiler/mlds_to_il.m	15 Dec 2010 06:29:49 -0000	1.219
+++ compiler/mlds_to_il.m	2 Jan 2011 07:53:13 -0000
@@ -155,11 +155,9 @@
 :- import_module ml_backend.ml_global_data.
 :- import_module ml_backend.ml_type_gen.
 :- import_module ml_backend.ml_util.
-:- import_module parse_tree.error_util.
 :- import_module parse_tree.prog_data.
 :- import_module parse_tree.prog_foreign.
 :- import_module parse_tree.prog_type.
-:- import_module parse_tree.prog_util.
 
 :- import_module assoc_list.
 :- import_module cord.
Index: compiler/mlds_to_ilasm.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/mlds_to_ilasm.m,v
retrieving revision 1.43
diff -u -b -r1.43 mlds_to_ilasm.m
--- compiler/mlds_to_ilasm.m	15 Dec 2010 06:29:50 -0000	1.43
+++ compiler/mlds_to_ilasm.m	2 Jan 2011 08:02:27 -0000
@@ -48,7 +48,6 @@
 :- import_module maybe.
 :- import_module require.
 :- import_module set.
-:- import_module string.
 
 %-----------------------------------------------------------------------------%
 
Index: compiler/mlds_to_java.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/mlds_to_java.m,v
retrieving revision 1.164
diff -u -b -r1.164 mlds_to_java.m
--- compiler/mlds_to_java.m	15 Dec 2010 06:29:50 -0000	1.164
+++ compiler/mlds_to_java.m	2 Jan 2011 07:53:30 -0000
@@ -87,7 +87,6 @@
 :- import_module backend_libs.builtin_ops.
 :- import_module backend_libs.c_util.
 :- import_module backend_libs.rtti.
-:- import_module check_hlds.type_util.
 :- import_module hlds.hlds_pred.           % for pred_proc_id.
 :- import_module libs.file_util.
 :- import_module libs.globals.
@@ -107,7 +106,6 @@
 :- 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 bool.
Index: compiler/mlds_to_managed.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/mlds_to_managed.m,v
retrieving revision 1.55
diff -u -b -r1.55 mlds_to_managed.m
--- compiler/mlds_to_managed.m	15 Dec 2010 06:29:50 -0000	1.55
+++ compiler/mlds_to_managed.m	2 Jan 2011 07:53:38 -0000
@@ -47,7 +47,6 @@
 :- import_module ml_backend.ml_global_data.
 :- import_module ml_backend.ml_util.
 :- import_module ml_backend.mlds_to_il.
-:- import_module parse_tree.modules.
 :- import_module parse_tree.prog_data.
 :- import_module parse_tree.prog_foreign.
 :- import_module parse_tree.prog_out.
Index: compiler/mode_ordering.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/mode_ordering.m,v
retrieving revision 1.32
diff -u -b -r1.32 mode_ordering.m
--- compiler/mode_ordering.m	20 Dec 2010 07:47:35 -0000	1.32
+++ compiler/mode_ordering.m	2 Jan 2011 07:37:38 -0000
@@ -58,7 +58,6 @@
 :- import_module parse_tree.prog_data.
 
 :- import_module assoc_list.
-:- import_module cord.
 :- import_module digraph.
 :- import_module pair.
 :- import_module require.
Index: compiler/modecheck_unify.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/modecheck_unify.m,v
retrieving revision 1.136
diff -u -b -r1.136 modecheck_unify.m
--- compiler/modecheck_unify.m	15 Dec 2010 06:29:51 -0000	1.136
+++ compiler/modecheck_unify.m	2 Jan 2011 07:37:52 -0000
@@ -73,7 +73,6 @@
 
 :- import_module assoc_list.
 :- import_module bool.
-:- import_module io.
 :- import_module list.
 :- import_module map.
 :- import_module maybe.
Index: compiler/modecheck_util.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/modecheck_util.m,v
retrieving revision 1.2
diff -u -b -r1.2 modecheck_util.m
--- compiler/modecheck_util.m	15 Dec 2010 06:29:51 -0000	1.2
+++ compiler/modecheck_util.m	2 Jan 2011 07:40:12 -0000
@@ -178,60 +178,28 @@
 
 :- implementation.
 
-:- import_module check_hlds.clause_to_proc.
-:- import_module check_hlds.cse_detection.
 :- import_module check_hlds.delay_info.
-:- import_module check_hlds.delay_partial_inst.
-:- import_module check_hlds.det_analysis.
 :- import_module check_hlds.inst_match.
 :- import_module check_hlds.inst_util.
-:- import_module check_hlds.mode_debug.
 :- import_module check_hlds.mode_errors.
-:- import_module check_hlds.mode_util.
-:- import_module check_hlds.modecheck_call.
 :- import_module check_hlds.modecheck_goal.
 :- import_module check_hlds.modecheck_unify.
 :- import_module check_hlds.polymorphism.
-:- import_module check_hlds.switch_detection.
 :- import_module check_hlds.type_util.
-:- import_module check_hlds.unify_proc.
-:- import_module check_hlds.unique_modes.
-:- import_module hlds.goal_util.
-:- import_module hlds.hlds_clauses.
-:- import_module hlds.hlds_data.
 :- import_module hlds.hlds_module.
-:- import_module hlds.hlds_out.
-:- import_module hlds.passes_aux.
 :- import_module hlds.pred_table.
-:- import_module hlds.quantification.
 :- import_module hlds.special_pred.
-:- import_module libs.
-:- import_module libs.file_util.
-:- import_module libs.globals.
-:- import_module libs.options.
 :- import_module mdbcomp.
 :- import_module mdbcomp.prim_data.
-:- import_module parse_tree.builtin_lib_types.
-:- import_module parse_tree.error_util.
-:- import_module parse_tree.mercury_to_mercury.
-:- import_module parse_tree.prog_event.
-:- import_module parse_tree.prog_mode.
-:- import_module parse_tree.prog_out.
 :- import_module parse_tree.prog_type.
 
-:- import_module assoc_list.
-:- import_module bag.
 :- import_module bool.
 :- import_module int.
-:- import_module io.
 :- import_module list.
 :- import_module map.
 :- import_module pair.
-:- import_module queue.
 :- import_module require.
 :- import_module set.
-:- import_module string.
-:- import_module svmap.
 :- import_module term.
 :- import_module varset.
 
Index: compiler/module_cmds.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/module_cmds.m,v
retrieving revision 1.14
diff -u -b -r1.14 module_cmds.m
--- compiler/module_cmds.m	15 Dec 2010 06:29:52 -0000	1.14
+++ compiler/module_cmds.m	2 Jan 2011 07:54:03 -0000
@@ -199,7 +199,6 @@
 :- import_module parse_tree.file_names.
 :- import_module parse_tree.java_names.
 
-:- import_module char.
 :- import_module dir.
 :- import_module getopt_io.
 :- import_module int.
Index: compiler/modules.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/modules.m,v
retrieving revision 1.461
diff -u -b -r1.461 modules.m
--- compiler/modules.m	15 Dec 2010 06:29:52 -0000	1.461
+++ compiler/modules.m	2 Jan 2011 07:54:55 -0000
@@ -366,10 +366,7 @@
 
 :- implementation.
 
-:- import_module hlds.passes_aux.
-:- import_module libs.handle_options.
 :- import_module libs.options.
-:- import_module make.              % XXX undesirable dependency
 :- import_module parse_tree.deps_map.
 :- import_module parse_tree.file_names.
 :- import_module parse_tree.mercury_to_mercury.
@@ -380,8 +377,6 @@
 :- import_module parse_tree.prog_mutable.
 :- import_module parse_tree.prog_out.
 :- import_module parse_tree.prog_type.
-:- import_module parse_tree.prog_util.
-:- import_module parse_tree.source_file_map.
 :- import_module parse_tree.write_deps_file.
 :- import_module recompilation.version.
 
@@ -390,7 +385,6 @@
 :- import_module dir.
 :- import_module getopt_io.
 :- import_module int.
-:- import_module library.
 :- import_module map.
 :- import_module multi_map.
 :- import_module pair.
@@ -403,7 +397,6 @@
 :- import_module svset.
 :- import_module term.
 :- import_module unit.
-:- import_module varset.
 
 %-----------------------------------------------------------------------------%
 %
Index: compiler/ordering_mode_constraints.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/ordering_mode_constraints.m,v
retrieving revision 1.27
diff -u -b -r1.27 ordering_mode_constraints.m
--- compiler/ordering_mode_constraints.m	20 Dec 2010 07:47:35 -0000	1.27
+++ compiler/ordering_mode_constraints.m	2 Jan 2011 07:40:36 -0000
@@ -119,12 +119,10 @@
 
 :- import_module bimap.
 :- import_module bool.
-:- import_module cord.
 :- import_module int.
 :- import_module map.
 :- import_module maybe.
 :- import_module multi_map.
-:- import_module pair.
 :- import_module require.
 :- import_module string.
 :- import_module svset.
Index: compiler/passes_aux.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/passes_aux.m,v
retrieving revision 1.101
diff -u -b -r1.101 passes_aux.m
--- compiler/passes_aux.m	15 Dec 2010 06:29:54 -0000	1.101
+++ compiler/passes_aux.m	2 Jan 2011 07:46:41 -0000
@@ -210,7 +210,6 @@
 :- import_module libs.file_util.
 :- import_module libs.globals.
 :- import_module libs.options.
-:- import_module libs.process_util.
 :- import_module parse_tree.mercury_to_mercury.
 :- import_module parse_tree.prog_mode.
 :- import_module parse_tree.prog_out.
Index: compiler/polymorphism.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/polymorphism.m,v
retrieving revision 1.355
diff -u -b -r1.355 polymorphism.m
--- compiler/polymorphism.m	29 Dec 2010 04:52:18 -0000	1.355
+++ compiler/polymorphism.m	2 Jan 2011 07:40:56 -0000
@@ -399,7 +399,6 @@
 :- import_module hlds.quantification.
 :- import_module hlds.special_pred.
 :- import_module libs.
-:- import_module libs.compiler_util.
 :- import_module libs.globals.
 :- import_module libs.options.
 :- import_module mdbcomp.prim_data.
@@ -408,13 +407,11 @@
 :- import_module parse_tree.prog_mode.
 :- import_module parse_tree.prog_type.
 :- import_module parse_tree.prog_type_subst.
-:- import_module parse_tree.prog_util.
 
 :- import_module assoc_list.
 :- import_module bool.
 :- import_module cord.
 :- import_module int.
-:- import_module io.
 :- import_module map.
 :- import_module pair.
 :- import_module require.
Index: compiler/process_util.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/process_util.m,v
retrieving revision 1.32
diff -u -b -r1.32 process_util.m
--- compiler/process_util.m	14 Oct 2009 05:28:42 -0000	1.32
+++ compiler/process_util.m	2 Jan 2011 07:47:59 -0000
@@ -123,10 +123,6 @@
 
 :- implementation.
 
-:- import_module libs.compiler_util.
-:- import_module libs.globals.
-:- import_module libs.options.
-
 %-----------------------------------------------------------------------------%
 
 build_with_check_for_interrupt(VeryVerbose, Build, Cleanup, Succeeded,
Index: compiler/prog_data.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/prog_data.m,v
retrieving revision 1.225
diff -u -b -r1.225 prog_data.m
--- compiler/prog_data.m	15 Dec 2010 06:29:56 -0000	1.225
+++ compiler/prog_data.m	2 Jan 2011 07:55:05 -0000
@@ -42,7 +42,6 @@
 
 :- implementation.
 
-:- import_module library.
 :- import_module require.
 :- import_module string.
 
Index: compiler/prog_event.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/prog_event.m,v
retrieving revision 1.17
diff -u -b -r1.17 prog_event.m
--- compiler/prog_event.m	15 Dec 2010 06:29:56 -0000	1.17
+++ compiler/prog_event.m	2 Jan 2011 07:55:16 -0000
@@ -63,11 +63,9 @@
 :- import_module parse_tree.builtin_lib_types.
 :- import_module parse_tree.prog_mode.
 :- import_module parse_tree.prog_out.
-:- import_module parse_tree.prog_type.
 
 :- import_module assoc_list.
 :- import_module bimap.
-:- import_module bool.
 :- import_module digraph.
 :- import_module int.
 :- import_module map.
Index: compiler/prog_io.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/prog_io.m,v
retrieving revision 1.303
diff -u -b -r1.303 prog_io.m
--- compiler/prog_io.m	15 Dec 2010 06:29:56 -0000	1.303
+++ compiler/prog_io.m	2 Jan 2011 07:55:54 -0000
@@ -196,10 +196,6 @@
 :- import_module parse_tree.prog_io_type_defn.
 :- import_module parse_tree.prog_io_typeclass.
 :- import_module parse_tree.prog_io_util.
-:- 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 recompilation.
 :- import_module recompilation.version.
 
@@ -207,7 +203,6 @@
 :- import_module bool.
 :- import_module counter.
 :- import_module dir.
-:- import_module int.
 :- import_module map.
 :- import_module pair.
 :- import_module parser.
@@ -215,7 +210,6 @@
 :- import_module set.
 :- import_module string.
 :- import_module term_io.
-:- import_module unit.
 
 %-----------------------------------------------------------------------------%
 
Index: compiler/prog_io_typeclass.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/prog_io_typeclass.m,v
retrieving revision 1.67
diff -u -b -r1.67 prog_io_typeclass.m
--- compiler/prog_io_typeclass.m	15 Dec 2010 06:29:57 -0000	1.67
+++ compiler/prog_io_typeclass.m	2 Jan 2011 07:56:16 -0000
@@ -62,18 +62,12 @@
 :- import_module parse_tree.mercury_to_mercury.
 :- import_module parse_tree.prog_io.
 :- import_module parse_tree.prog_io_sym_name.
-:- 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 map.
-:- import_module maybe.
-:- import_module pair.
 :- import_module require.
-:- import_module solutions.
-:- import_module string.
 :- 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.33
diff -u -b -r1.33 prog_mutable.m
--- compiler/prog_mutable.m	28 Oct 2010 03:16:32 -0000	1.33
+++ compiler/prog_mutable.m	2 Jan 2011 07:56:32 -0000
@@ -592,8 +592,6 @@
 :- import_module parse_tree.file_names.
 :- import_module parse_tree.prog_foreign.
 :- import_module parse_tree.prog_mode.
-:- import_module parse_tree.prog_type.
-:- import_module parse_tree.prog_util.
 
 :- import_module list.
 :- import_module maybe.
Index: compiler/prog_out.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/prog_out.m,v
retrieving revision 1.89
diff -u -b -r1.89 prog_out.m
--- compiler/prog_out.m	15 Dec 2010 06:29:57 -0000	1.89
+++ compiler/prog_out.m	2 Jan 2011 07:57:27 -0000
@@ -156,12 +156,10 @@
 :- import_module parse_tree.error_util.
 :- import_module parse_tree.prog_util.
 
-:- import_module pair.
 :- import_module require.
 :- import_module string.
 :- import_module term.
 :- import_module term_io.
-:- import_module varset.
 
 %-----------------------------------------------------------------------------%
 %-----------------------------------------------------------------------------%
@@ -272,22 +270,6 @@
 
 %-----------------------------------------------------------------------------%
 
-:- pred write_list(list(T)::in, pred(T, io, io)::in(pred(in, di, uo) is det),
-    io::di, io::uo) is det.
-
-write_list([Import1, Import2, Import3 | Imports], Writer, !IO) :-
-    call(Writer, Import1, !IO),
-    io.write_string(", ", !IO),
-    write_list([Import2, Import3 | Imports], Writer, !IO).
-write_list([Import1, Import2], Writer, !IO) :-
-    call(Writer, Import1, !IO),
-    io.write_string(" and ", !IO),
-    call(Writer, Import2, !IO).
-write_list([Import], Writer, !IO) :-
-    call(Writer, Import, !IO).
-write_list([], _, !IO) :-
-    unexpected(this_file, "write_list: empty list").
-
 write_string_list([], !IO).
 write_string_list([Name], !IO) :-
     io.write_string(Name, !IO).
Index: compiler/prop_mode_constraints.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/prop_mode_constraints.m,v
retrieving revision 1.28
diff -u -b -r1.28 prop_mode_constraints.m
--- compiler/prop_mode_constraints.m	20 Dec 2010 07:47:36 -0000	1.28
+++ compiler/prop_mode_constraints.m	2 Jan 2011 07:41:08 -0000
@@ -88,7 +88,6 @@
 :- import_module parse_tree.prog_data.
 
 :- import_module bool.
-:- import_module pair.
 :- import_module require.
 :- import_module set.
 :- import_module string.
Index: compiler/purity.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/purity.m,v
retrieving revision 1.140
diff -u -b -r1.140 purity.m
--- compiler/purity.m	29 Dec 2010 04:52:18 -0000	1.140
+++ compiler/purity.m	2 Jan 2011 07:41:59 -0000
@@ -176,10 +176,6 @@
 :- import_module hlds.passes_aux.
 :- import_module hlds.pred_table.
 :- import_module hlds.quantification.
-:- import_module libs.
-:- import_module libs.file_util.
-:- import_module libs.globals.
-:- import_module libs.options.
 :- import_module mdbcomp.
 :- import_module mdbcomp.prim_data.
 :- import_module parse_tree.builtin_lib_types.
@@ -191,10 +187,8 @@
 
 :- 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.
Index: compiler/qual_info.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/qual_info.m,v
retrieving revision 1.25
diff -u -b -r1.25 qual_info.m
--- compiler/qual_info.m	11 Jun 2009 07:00:18 -0000	1.25
+++ compiler/qual_info.m	2 Jan 2011 07:45:10 -0000
@@ -101,7 +101,6 @@
 :- import_module parse_tree.prog_util.
 
 :- import_module map.
-:- import_module pair.
 :- import_module svmap.
 :- import_module term.
 :- import_module varset.
Index: compiler/quantification.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/quantification.m,v
retrieving revision 1.141
diff -u -b -r1.141 quantification.m
--- compiler/quantification.m	29 Dec 2010 04:52:19 -0000	1.141
+++ compiler/quantification.m	2 Jan 2011 07:46:51 -0000
@@ -107,7 +107,6 @@
 :- import_module hlds.instmap.
 
 :- import_module assoc_list.
-:- import_module bool.
 :- import_module map.
 :- import_module maybe.
 :- import_module pair.
Index: compiler/read_modules.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/read_modules.m,v
retrieving revision 1.4
diff -u -b -r1.4 read_modules.m
--- compiler/read_modules.m	14 Oct 2009 05:28:43 -0000	1.4
+++ compiler/read_modules.m	2 Jan 2011 07:57:37 -0000
@@ -143,7 +143,6 @@
 
 :- import_module bool.
 :- import_module dir.
-:- import_module getopt_io.
 :- import_module string.
 
 %-----------------------------------------------------------------------------%
Index: compiler/simplify.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/simplify.m,v
retrieving revision 1.254
diff -u -b -r1.254 simplify.m
--- compiler/simplify.m	29 Dec 2010 04:52:19 -0000	1.254
+++ compiler/simplify.m	2 Jan 2011 10:17:38 -0000
@@ -146,10 +146,8 @@
 :- import_module mdbcomp.prim_data.
 :- import_module parse_tree.
 :- import_module parse_tree.builtin_lib_types.
-:- 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.
@@ -158,7 +156,6 @@
 :- import_module transform_hlds.pd_cost.
 
 :- import_module int.
-:- import_module io.
 :- import_module map.
 :- import_module maybe.
 :- import_module pair.
@@ -1909,11 +1906,9 @@
         )
     ;
         simplify_info_get_common_info(!.Info, Common),
-        % Note that we need to keep SubGoal0 for require_complete_switch
-        % scopes.
         simplify_goal(SubGoal0, SubGoal, !Info),
         nested_scopes(Reason0, SubGoal, GoalInfo0, Goal1),
-        Goal1 = hlds_goal(GoalExpr1, GoalInfo1),
+        Goal1 = hlds_goal(GoalExpr1, _GoalInfo1),
         ( GoalExpr1 = scope(FinalReason, FinalSubGoal) ->
             (
                 ( FinalReason = promise_purity(_)
@@ -1922,6 +1917,11 @@
                 ),
                 Goal = Goal1
             ;
+                ( FinalReason = require_detism(_)
+                ; FinalReason = require_complete_switch(_)
+                ),
+                Goal = FinalSubGoal
+            ;
                 ( FinalReason = commit(_)
                 ; FinalReason = exist_quant(_)
                 ; FinalReason = promise_solutions(_, _)
@@ -1940,58 +1940,6 @@
                 % of the goal.
                 simplify_info_set_common_info(Common, !Info)
             ;
-                FinalReason = require_detism(RequiredDetism),
-                FinalSubGoal = hlds_goal(_, FinalSubGoalInfo),
-                ActualDetism = goal_info_get_determinism(FinalSubGoalInfo),
-                ( ActualDetism = RequiredDetism ->
-                    true
-                ;
-                    RequiredDetismStr = determinism_to_string(RequiredDetism),
-                    ActualDetismStr = determinism_to_string(ActualDetism),
-                    DetismPieces = [words("Error: required determinism is"),
-                        quote(RequiredDetismStr), suffix(","),
-                        words("but actual determinism is"),
-                        quote(ActualDetismStr), suffix("."), nl],
-                    Context = goal_info_get_context(GoalInfo1),
-                    DetismMsg = simple_msg(Context, [always(DetismPieces)]),
-                    DetismSpec = error_spec(severity_error,
-                        phase_simplify(report_in_any_mode), [DetismMsg]),
-                    simplify_info_add_error_spec(DetismSpec, !Info)
-                ),
-                Goal = FinalSubGoal
-            ;
-                FinalReason = require_complete_switch(RequiredVar),
-                % We must test the version of the subgoal that has not yet been
-                % simplified, since simplification can convert a complete
-                % switch into an incomplete switch by deleting an arm
-                % consisting of nothing but `fail'.
-                SubGoal0 = hlds_goal(SubGoalExpr0, _),
-                (
-                    SubGoalExpr0 = switch(SwitchVar, CanFail, _Cases),
-                    SwitchVar = RequiredVar
-                ->
-                    (
-                        CanFail = cannot_fail
-                    ;
-                        CanFail = can_fail,
-                        simplify_info_get_varset(!.Info, VarSet),
-                        VarStr = mercury_var_to_string(VarSet, no, SwitchVar),
-                        SwitchPieces = [words("Error: the switch on"),
-                            quote(VarStr), 
-                            words("is required to be complete,"),
-                            words("but it is not."), nl],
-                        Context = goal_info_get_context(GoalInfo1),
-                        SwitchMsg = simple_msg(Context,
-                            [always(SwitchPieces)]),
-                        SwitchSpec = error_spec(severity_error,
-                            phase_simplify(report_in_any_mode), [SwitchMsg]),
-                        simplify_info_add_error_spec(SwitchSpec, !Info)
-                    )
-                ;
-                    true
-                ),
-                Goal = FinalSubGoal
-            ;
                 FinalReason = trace_goal(MaybeCompiletimeExpr,
                     MaybeRuntimeExpr, _, _, _),
                 ( simplify_do_after_front_end(!.Info) ->
Index: compiler/state_var.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/state_var.m,v
retrieving revision 1.32
diff -u -b -r1.32 state_var.m
--- compiler/state_var.m	15 Dec 2010 06:30:03 -0000	1.32
+++ compiler/state_var.m	2 Jan 2011 07:45:33 -0000
@@ -353,7 +353,6 @@
 :- import_module char.
 :- import_module int.
 :- import_module io.
-:- import_module pair.
 :- import_module require.
 :- import_module string.
 :- import_module svmap.
Index: compiler/stratify.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/stratify.m,v
retrieving revision 1.75
diff -u -b -r1.75 stratify.m
--- compiler/stratify.m	15 Dec 2010 06:30:03 -0000	1.75
+++ compiler/stratify.m	2 Jan 2011 07:42:18 -0000
@@ -53,7 +53,6 @@
 
 :- import_module check_hlds.mode_util.
 :- import_module hlds.hlds_error_util.
-:- import_module hlds.hlds_data.
 :- import_module hlds.hlds_goal.
 :- import_module hlds.hlds_module.
 :- import_module hlds.hlds_pred.
Index: compiler/superhomogeneous.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/superhomogeneous.m,v
retrieving revision 1.38
diff -u -b -r1.38 superhomogeneous.m
--- compiler/superhomogeneous.m	15 Dec 2010 06:30:04 -0000	1.38
+++ compiler/superhomogeneous.m	2 Jan 2011 07:45:44 -0000
@@ -119,7 +119,6 @@
 :- import_module hlds.make_hlds.field_access.
 :- import_module hlds.make_hlds.qual_info.
 :- import_module libs.globals.  % for get_maybe_from_ground_term_threshold
-:- import_module parse_tree.mercury_to_mercury.
 :- import_module parse_tree.module_qual.
 :- import_module parse_tree.prog_io_sym_name.
 :- import_module parse_tree.prog_io_dcg.
Index: compiler/switch_detection.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/switch_detection.m,v
retrieving revision 1.152
diff -u -b -r1.152 switch_detection.m
--- compiler/switch_detection.m	15 Dec 2010 06:30:04 -0000	1.152
+++ compiler/switch_detection.m	2 Jan 2011 08:01:11 -0000
@@ -93,7 +93,6 @@
 :- import_module set.
 :- import_module set_tree234.
 :- import_module string.
-:- import_module svmap.
 :- import_module term.
 :- import_module unit.
 
Index: compiler/table_gen.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/table_gen.m,v
retrieving revision 1.156
diff -u -b -r1.156 table_gen.m
--- compiler/table_gen.m	15 Dec 2010 06:30:04 -0000	1.156
+++ compiler/table_gen.m	2 Jan 2011 10:01:12 -0000
@@ -1982,6 +1982,7 @@
 keep_marker(marker_calls_are_fully_qualified) = yes.
 keep_marker(marker_mode_check_clauses) = yes.
 keep_marker(marker_mutable_access_pred) = yes.
+keep_marker(marker_has_require_scope) = yes.
 keep_marker(marker_has_format_call) = yes.
 
 %-----------------------------------------------------------------------------%
Index: compiler/try_expand.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/try_expand.m,v
retrieving revision 1.13
diff -u -b -r1.13 try_expand.m
--- compiler/try_expand.m	29 Dec 2010 04:52:19 -0000	1.13
+++ compiler/try_expand.m	2 Jan 2011 07:42:49 -0000
@@ -217,14 +217,12 @@
 
 :- import_module check_hlds.det_analysis.
 :- import_module check_hlds.det_report.
-:- import_module check_hlds.inst_util.
 :- import_module check_hlds.modes.
 :- import_module check_hlds.polymorphism.
 :- import_module hlds.goal_util.
 :- import_module hlds.hlds_goal.
 :- 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 mdbcomp.
@@ -232,10 +230,8 @@
 :- import_module parse_tree.
 :- import_module parse_tree.builtin_lib_types.
 :- import_module parse_tree.prog_mode.
-:- import_module parse_tree.prog_type.
 
 :- import_module bool.
-:- import_module int.
 :- import_module map.
 :- import_module maybe.
 :- import_module pair.
Index: compiler/type_constraints.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/type_constraints.m,v
retrieving revision 1.11
diff -u -b -r1.11 type_constraints.m
--- compiler/type_constraints.m	20 Dec 2010 07:47:38 -0000	1.11
+++ compiler/type_constraints.m	2 Jan 2011 07:43:01 -0000
@@ -40,7 +40,6 @@
 :- import_module hlds.hlds_pred.
 :- import_module hlds.pred_table.
 :- import_module hlds.special_pred.
-:- import_module libs.compiler_util.
 :- import_module mdbcomp.
 :- import_module mdbcomp.prim_data.
 :- import_module mdbcomp.program_representation.
@@ -62,7 +61,6 @@
 :- import_module pair.
 :- import_module require.
 :- import_module set.
-:- import_module std_util.
 :- import_module string.
 :- import_module svbimap.
 :- import_module svmap.
Index: compiler/typecheck.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/typecheck.m,v
retrieving revision 1.451
diff -u -b -r1.451 typecheck.m
--- compiler/typecheck.m	29 Dec 2010 04:52:19 -0000	1.451
+++ compiler/typecheck.m	2 Jan 2011 07:43:23 -0000
@@ -138,13 +138,8 @@
 :- import_module require.
 :- import_module set.
 :- import_module set_tree234.
-:- import_module std_util.
 :- import_module string.
-:- import_module svmap.
-:- import_module svset.
-:- import_module svvarset.
 :- import_module term.
-:- import_module term_io.
 :- import_module varset.
 
 %-----------------------------------------------------------------------------%
Index: compiler/typecheck_errors.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/typecheck_errors.m,v
retrieving revision 1.48
diff -u -b -r1.48 typecheck_errors.m
--- compiler/typecheck_errors.m	15 Dec 2010 06:30:09 -0000	1.48
+++ compiler/typecheck_errors.m	2 Jan 2011 07:43:32 -0000
@@ -108,7 +108,6 @@
 :- import_module libs.
 :- import_module libs.options.
 :- import_module parse_tree.mercury_to_mercury.
-:- import_module parse_tree.modules.
 :- import_module parse_tree.prog_io_util.
 :- import_module parse_tree.prog_mode.
 :- import_module parse_tree.prog_type.
Index: compiler/typecheck_info.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/typecheck_info.m,v
retrieving revision 1.32
diff -u -b -r1.32 typecheck_info.m
--- compiler/typecheck_info.m	15 Dec 2010 06:30:09 -0000	1.32
+++ compiler/typecheck_info.m	2 Jan 2011 07:43:40 -0000
@@ -377,9 +377,7 @@
 :- import_module parse_tree.prog_type.
 :- import_module parse_tree.prog_type_subst.
 
-:- import_module assoc_list.
 :- import_module int.
-:- import_module pair.
 :- import_module require.
 :- import_module string.
 :- import_module set.
Index: compiler/typeclasses.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/typeclasses.m,v
retrieving revision 1.26
diff -u -b -r1.26 typeclasses.m
--- compiler/typeclasses.m	14 Sep 2009 03:30:31 -0000	1.26
+++ compiler/typeclasses.m	2 Jan 2011 07:44:06 -0000
@@ -94,7 +94,6 @@
 :- import_module int.
 :- import_module list.
 :- import_module map.
-:- import_module multi_map.
 :- import_module set.
 :- import_module svmap.
 :- import_module term.
@@ -102,8 +101,6 @@
 
 %-----------------------------------------------------------------------------%
 
-:- import_module io.
-
 perform_context_reduction(!Info) :-
     trace [compiletime(flag("type_checkpoint")), io(!IO)] (
         type_checkpoint("before context reduction", !.Info, !IO)
Index: compiler/unify_proc.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/unify_proc.m,v
retrieving revision 1.214
diff -u -b -r1.214 unify_proc.m
--- compiler/unify_proc.m	15 Dec 2010 06:30:09 -0000	1.214
+++ compiler/unify_proc.m	2 Jan 2011 08:01:40 -0000
@@ -132,14 +132,11 @@
 :- import_module check_hlds.clause_to_proc.
 :- import_module check_hlds.inst_match.
 :- import_module check_hlds.mode_util.
-:- import_module check_hlds.modes.
 :- import_module check_hlds.polymorphism.
 :- import_module check_hlds.post_typecheck.
 :- import_module check_hlds.type_util.
-:- import_module check_hlds.unique_modes.
 :- import_module hlds.goal_util.
 :- import_module hlds.hlds_args.
-:- import_module hlds.hlds_out.
 :- import_module hlds.hlds_rtti.
 :- import_module hlds.instmap.
 :- import_module hlds.make_hlds.
@@ -151,7 +148,6 @@
 :- import_module libs.options.
 :- import_module mdbcomp.prim_data.
 :- import_module parse_tree.builtin_lib_types.
-:- import_module parse_tree.error_util.
 :- import_module parse_tree.prog_mode.
 :- import_module parse_tree.prog_type.
 :- import_module recompilation.
Index: compiler/unique_modes.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/unique_modes.m,v
retrieving revision 1.135
diff -u -b -r1.135 unique_modes.m
--- compiler/unique_modes.m	15 Dec 2010 06:30:09 -0000	1.135
+++ compiler/unique_modes.m	2 Jan 2011 07:44:15 -0000
@@ -97,7 +97,6 @@
 
 :- import_module bag.
 :- import_module int.
-:- import_module io.
 :- import_module map.
 :- import_module maybe.
 :- import_module pair.
Index: compiler/unused_imports.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/unused_imports.m,v
retrieving revision 1.24
diff -u -b -r1.24 unused_imports.m
--- compiler/unused_imports.m	30 Jul 2010 05:16:20 -0000	1.24
+++ compiler/unused_imports.m	2 Jan 2011 07:44:26 -0000
@@ -54,13 +54,11 @@
 :- import_module mdbcomp.
 :- import_module mdbcomp.prim_data.
 :- import_module parse_tree.file_names.
-:- import_module parse_tree.modules.
 :- import_module parse_tree.prog_data.
 
 :- import_module bool.
 :- import_module map.
 :- import_module maybe.
-:- import_module pair.
 :- import_module set.
 :- import_module string.
 :- import_module term.
Index: compiler/xml_documentation.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/xml_documentation.m,v
retrieving revision 1.26
diff -u -b -r1.26 xml_documentation.m
--- compiler/xml_documentation.m	30 Jul 2010 05:16:20 -0000	1.26
+++ compiler/xml_documentation.m	2 Jan 2011 07:44:35 -0000
@@ -36,8 +36,6 @@
 :- import_module hlds.hlds_data.
 :- import_module hlds.hlds_pred.
 :- import_module hlds.pred_table.
-:- import_module libs.
-:- import_module libs.compiler_util.
 :- import_module mdbcomp.
 :- import_module mdbcomp.prim_data.
 :- import_module parse_tree.
cvs diff: Diffing compiler/notes
cvs diff: Diffing deep_profiler
cvs diff: Diffing deep_profiler/notes
cvs diff: Diffing doc
cvs diff: Diffing extras
cvs diff: Diffing extras/base64
cvs diff: Diffing extras/cgi
cvs diff: Diffing extras/complex_numbers
cvs diff: Diffing extras/complex_numbers/samples
cvs diff: Diffing extras/complex_numbers/tests
cvs diff: Diffing extras/curs
cvs diff: Diffing extras/curs/samples
cvs diff: Diffing extras/curses
cvs diff: Diffing extras/curses/sample
cvs diff: Diffing extras/dynamic_linking
cvs diff: Diffing extras/error
cvs diff: Diffing extras/fixed
cvs diff: Diffing extras/gator
cvs diff: Diffing extras/gator/generations
cvs diff: Diffing extras/gator/generations/1
cvs diff: Diffing extras/graphics
cvs diff: Diffing extras/graphics/easyx
cvs diff: Diffing extras/graphics/easyx/samples
cvs diff: Diffing extras/graphics/mercury_allegro
cvs diff: Diffing extras/graphics/mercury_allegro/examples
cvs diff: Diffing extras/graphics/mercury_allegro/samples
cvs diff: Diffing extras/graphics/mercury_allegro/samples/demo
cvs diff: Diffing extras/graphics/mercury_allegro/samples/mandel
cvs diff: Diffing extras/graphics/mercury_allegro/samples/pendulum2
cvs diff: Diffing extras/graphics/mercury_allegro/samples/speed
cvs diff: Diffing extras/graphics/mercury_cairo
cvs diff: Diffing extras/graphics/mercury_cairo/samples
cvs diff: Diffing extras/graphics/mercury_cairo/samples/data
cvs diff: Diffing extras/graphics/mercury_cairo/tutorial
cvs diff: Diffing extras/graphics/mercury_glut
cvs diff: Diffing extras/graphics/mercury_opengl
cvs diff: Diffing extras/graphics/mercury_tcltk
cvs diff: Diffing extras/graphics/samples
cvs diff: Diffing extras/graphics/samples/calc
cvs diff: Diffing extras/graphics/samples/gears
cvs diff: Diffing extras/graphics/samples/maze
cvs diff: Diffing extras/graphics/samples/pent
cvs diff: Diffing extras/lazy_evaluation
cvs diff: Diffing extras/lex
cvs diff: Diffing extras/lex/samples
cvs diff: Diffing extras/lex/tests
cvs diff: Diffing extras/log4m
cvs diff: Diffing extras/logged_output
cvs diff: Diffing extras/monte
cvs diff: Diffing extras/moose
cvs diff: Diffing extras/moose/samples
cvs diff: Diffing extras/moose/tests
cvs diff: Diffing extras/mopenssl
cvs diff: Diffing extras/morphine
cvs diff: Diffing extras/morphine/non-regression-tests
cvs diff: Diffing extras/morphine/scripts
cvs diff: Diffing extras/morphine/source
cvs diff: Diffing extras/net
cvs diff: Diffing extras/odbc
cvs diff: Diffing extras/posix
cvs diff: Diffing extras/posix/samples
cvs diff: Diffing extras/quickcheck
cvs diff: Diffing extras/quickcheck/tutes
cvs diff: Diffing extras/references
cvs diff: Diffing extras/references/samples
cvs diff: Diffing extras/references/tests
cvs diff: Diffing extras/solver_types
cvs diff: Diffing extras/solver_types/library
cvs diff: Diffing extras/trailed_update
cvs diff: Diffing extras/trailed_update/samples
cvs diff: Diffing extras/trailed_update/tests
cvs diff: Diffing extras/windows_installer_generator
cvs diff: Diffing extras/windows_installer_generator/sample
cvs diff: Diffing extras/windows_installer_generator/sample/images
cvs diff: Diffing extras/xml
cvs diff: Diffing extras/xml/samples
cvs diff: Diffing extras/xml_stylesheets
cvs diff: Diffing java
cvs diff: Diffing java/runtime
cvs diff: Diffing library
cvs diff: Diffing mdbcomp
cvs diff: Diffing profiler
cvs diff: Diffing robdd
cvs diff: Diffing runtime
cvs diff: Diffing runtime/GETOPT
cvs diff: Diffing runtime/machdeps
cvs diff: Diffing samples
cvs diff: Diffing samples/c_interface
cvs diff: Diffing samples/c_interface/c_calls_mercury
cvs diff: Diffing samples/c_interface/cplusplus_calls_mercury
cvs diff: Diffing samples/c_interface/mercury_calls_c
cvs diff: Diffing samples/c_interface/mercury_calls_cplusplus
cvs diff: Diffing samples/c_interface/mercury_calls_fortran
cvs diff: Diffing samples/c_interface/simpler_c_calls_mercury
cvs diff: Diffing samples/c_interface/simpler_cplusplus_calls_mercury
cvs diff: Diffing samples/c_interface/standalone_c
cvs diff: Diffing samples/concurrency
cvs diff: Diffing samples/concurrency/dining_philosophers
cvs diff: Diffing samples/concurrency/midimon
cvs diff: Diffing samples/diff
cvs diff: Diffing samples/java_interface
cvs diff: Diffing samples/java_interface/java_calls_mercury
cvs diff: Diffing samples/java_interface/mercury_calls_java
cvs diff: Diffing samples/muz
cvs diff: Diffing samples/rot13
cvs diff: Diffing samples/solutions
cvs diff: Diffing samples/solver_types
cvs diff: Diffing samples/tests
cvs diff: Diffing samples/tests/c_interface
cvs diff: Diffing samples/tests/c_interface/c_calls_mercury
cvs diff: Diffing samples/tests/c_interface/cplusplus_calls_mercury
cvs diff: Diffing samples/tests/c_interface/mercury_calls_c
cvs diff: Diffing samples/tests/c_interface/mercury_calls_cplusplus
cvs diff: Diffing samples/tests/c_interface/mercury_calls_fortran
cvs diff: Diffing samples/tests/c_interface/simpler_c_calls_mercury
cvs diff: Diffing samples/tests/c_interface/simpler_cplusplus_calls_mercury
cvs diff: Diffing samples/tests/diff
cvs diff: Diffing samples/tests/muz
cvs diff: Diffing samples/tests/rot13
cvs diff: Diffing samples/tests/solutions
cvs diff: Diffing samples/tests/toplevel
cvs diff: Diffing scripts
cvs diff: Diffing slice
cvs diff: Diffing ssdb
cvs diff: Diffing tests
cvs diff: Diffing tests/analysis
cvs diff: Diffing tests/analysis/ctgc
cvs diff: Diffing tests/analysis/excp
cvs diff: Diffing tests/analysis/ext
cvs diff: Diffing tests/analysis/sharing
cvs diff: Diffing tests/analysis/table
cvs diff: Diffing tests/analysis/trail
cvs diff: Diffing tests/analysis/unused_args
cvs diff: Diffing tests/benchmarks
cvs diff: Diffing tests/debugger
cvs diff: Diffing tests/debugger/declarative
cvs diff: Diffing tests/dppd
cvs diff: Diffing tests/general
cvs diff: Diffing tests/general/accumulator
cvs diff: Diffing tests/general/string_format
cvs diff: Diffing tests/general/structure_reuse
cvs diff: Diffing tests/grade_subdirs
cvs diff: Diffing tests/hard_coded
cvs diff: Diffing tests/hard_coded/exceptions
cvs diff: Diffing tests/hard_coded/purity
cvs diff: Diffing tests/hard_coded/sub-modules
cvs diff: Diffing tests/hard_coded/typeclasses
cvs diff: Diffing tests/invalid
Index: tests/invalid/require_scopes.err_exp
===================================================================
RCS file: /home/mercury/mercury1/repository/tests/invalid/require_scopes.err_exp,v
retrieving revision 1.1
diff -u -b -r1.1 require_scopes.err_exp
--- tests/invalid/require_scopes.err_exp	29 Dec 2010 04:52:23 -0000	1.1
+++ tests/invalid/require_scopes.err_exp	2 Jan 2011 13:09:31 -0000
@@ -3,4 +3,4 @@
 require_scopes.m:040: Error: required determinism is `nondet', but actual
 require_scopes.m:040:   determinism is `semidet'.
 require_scopes.m:064: Error: the switch on `A' is required to be complete, but
-require_scopes.m:064:   it is not.
+require_scopes.m:064:   it does not cover require_scopes.f1/0.
cvs diff: Diffing tests/invalid/purity
cvs diff: Diffing tests/misc_tests
cvs diff: Diffing tests/mmc_make
cvs diff: Diffing tests/mmc_make/lib
cvs diff: Diffing tests/par_conj
cvs diff: Diffing tests/recompilation
cvs diff: Diffing tests/stm
cvs diff: Diffing tests/stm/orig
cvs diff: Diffing tests/stm/orig/stm-compiler
cvs diff: Diffing tests/stm/orig/stm-compiler/test1
cvs diff: Diffing tests/stm/orig/stm-compiler/test10
cvs diff: Diffing tests/stm/orig/stm-compiler/test2
cvs diff: Diffing tests/stm/orig/stm-compiler/test3
cvs diff: Diffing tests/stm/orig/stm-compiler/test4
cvs diff: Diffing tests/stm/orig/stm-compiler/test5
cvs diff: Diffing tests/stm/orig/stm-compiler/test6
cvs diff: Diffing tests/stm/orig/stm-compiler/test7
cvs diff: Diffing tests/stm/orig/stm-compiler/test8
cvs diff: Diffing tests/stm/orig/stm-compiler/test9
cvs diff: Diffing tests/stm/orig/stm-compiler-par
cvs diff: Diffing tests/stm/orig/stm-compiler-par/bm1
cvs diff: Diffing tests/stm/orig/stm-compiler-par/bm2
cvs diff: Diffing tests/stm/orig/stm-compiler-par/stmqueue
cvs diff: Diffing tests/stm/orig/stm-compiler-par/test1
cvs diff: Diffing tests/stm/orig/stm-compiler-par/test10
cvs diff: Diffing tests/stm/orig/stm-compiler-par/test11
cvs diff: Diffing tests/stm/orig/stm-compiler-par/test2
cvs diff: Diffing tests/stm/orig/stm-compiler-par/test3
cvs diff: Diffing tests/stm/orig/stm-compiler-par/test4
cvs diff: Diffing tests/stm/orig/stm-compiler-par/test5
cvs diff: Diffing tests/stm/orig/stm-compiler-par/test6
cvs diff: Diffing tests/stm/orig/stm-compiler-par/test7
cvs diff: Diffing tests/stm/orig/stm-compiler-par/test8
cvs diff: Diffing tests/stm/orig/stm-compiler-par/test9
cvs diff: Diffing tests/stm/orig/stm-compiler-par-asm_fast
cvs diff: Diffing tests/stm/orig/stm-compiler-par-asm_fast/test1
cvs diff: Diffing tests/stm/orig/stm-compiler-par-asm_fast/test2
cvs diff: Diffing tests/stm/orig/stm-compiler-par-asm_fast/test3
cvs diff: Diffing tests/stm/orig/stm-compiler-par-asm_fast/test4
cvs diff: Diffing tests/stm/orig/stm-compiler-par-asm_fast/test5
cvs diff: Diffing tests/stm/orig/stm-compiler-par-asm_fast/test6
cvs diff: Diffing tests/stm/orig/stm-compiler-par-asm_fast/test7
cvs diff: Diffing tests/stm/orig/stm-compiler-par-asm_fast/test8
cvs diff: Diffing tests/stm/orig/stm-compiler-par-asm_fast/test9
cvs diff: Diffing tests/tabling
cvs diff: Diffing tests/term
cvs diff: Diffing tests/trailing
cvs diff: Diffing tests/valid
cvs diff: Diffing tests/warnings
cvs diff: Diffing tools
cvs diff: Diffing trace
cvs diff: Diffing util
cvs diff: Diffing vim
cvs diff: Diffing vim/after
cvs diff: Diffing vim/ftplugin
cvs diff: Diffing vim/syntax
--------------------------------------------------------------------------
mercury-reviews mailing list
Post messages to:       mercury-reviews at csse.unimelb.edu.au
Administrative Queries: owner-mercury-reviews at csse.unimelb.edu.au
Subscriptions:          mercury-reviews-request at csse.unimelb.edu.au
--------------------------------------------------------------------------



More information about the reviews mailing list