[m-rev.] trivial diff: fix comma positioning

Julien Fischer juliensf at csse.unimelb.edu.au
Wed May 23 20:08:40 AEST 2007


Estimated hours taken: 0
Branches: main

Fix some formatting.

compiler/distance_granularity.m:
compiler/exception_analysis.m:
compiler/implicit_parallelism.m:
compiler/inst_graph.m:
compiler/interval.m:
compiler/layout_out.m:
compiler/lp_rational.m:
compiler/make.program_target.m:
compiler/modules.m:
compiler/prog_data.m:
compiler/purity.m:
compiler/recompilation.check.m:
compiler/term_constr_data.m:
compiler/term_util.m:
compiler/xml_documentation.m:
deep_profiler/mdprof_cgi.m:
library/pqueue.m:
profiler/output.m:
 	Fix the positioning of commas.

 	s/[_|_]/[_ | _]/ in a spot.

Julien.

Index: compiler/distance_granularity.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/distance_granularity.m,v
retrieving revision 1.2
diff -u -r1.2 distance_granularity.m
--- compiler/distance_granularity.m	19 Jan 2007 07:04:11 -0000	1.2
+++ compiler/distance_granularity.m	23 May 2007 10:04:05 -0000
@@ -504,7 +504,7 @@
          % Create the condition.
          make_simple_test(GranularityVar, Var,
              umc_implicit("distance_granularity"), [], Test),
-        create_conj(UnifyGoal, Test, plain_conj , Cond),
+        create_conj(UnifyGoal, Test, plain_conj, Cond),

          % Create the then.
          Then0 = hlds_goal(conj(parallel_conj, GoalsInConj), ConjInfo),
@@ -687,7 +687,7 @@
                      MinusCallArgs = [GranularityVar, Var, VarResult],
                      MinusCallBuiltin = inline_builtin,
                      MinusCallSymName = qualified(unqualified("int"),"-"),
-                    Rhs = rhs_functor(cons(MinusCallSymName, 2) , no, 
+                    Rhs = rhs_functor(cons(MinusCallSymName, 2), no,
                          [GranularityVar, Var]),
                      MinusCallUnifyContext = yes(call_unify_context(VarResult,
                          Rhs, unify_context(
Index: compiler/exception_analysis.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/exception_analysis.m,v
retrieving revision 1.37
diff -u -r1.37 exception_analysis.m
--- compiler/exception_analysis.m	19 Jan 2007 07:04:11 -0000	1.37
+++ compiler/exception_analysis.m	23 May 2007 10:04:05 -0000
@@ -489,7 +489,7 @@
      Goal = scope(_, ScopeGoal),
      check_goal_for_exceptions(SCC, VarTypes, ScopeGoal, !Result,
          !ModuleInfo, !IO).
-check_goal_for_exceptions_2(_, _, Goal, _, !Result, !ModuleInfo ,!IO) :-
+check_goal_for_exceptions_2(_, _, Goal, _, !Result, !ModuleInfo, !IO) :-
      Goal = call_foreign_proc(Attributes, _, _, _, _, _, _),
      %
      % NOTE: for --intermodule-analysis the results for for foreign_procs will
Index: compiler/implicit_parallelism.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/implicit_parallelism.m,v
retrieving revision 1.2
diff -u -r1.2 implicit_parallelism.m
--- compiler/implicit_parallelism.m	19 Jan 2007 07:04:15 -0000	1.2
+++ compiler/implicit_parallelism.m	23 May 2007 10:04:05 -0000
@@ -290,10 +290,12 @@
          process_goal_for_implicit_parallelism(Cond0, Cond, ProcInfo,
              !ModuleInfo, no, _, 0, _, !CalleeListToBeParallelized,
              !SiteNumCounter),
-        process_goal_for_implicit_parallelism(Then0, Then, ProcInfo, !ModuleInfo
-            , no, _, 0, _, !CalleeListToBeParallelized, !SiteNumCounter),
-        process_goal_for_implicit_parallelism(Else0, Else, ProcInfo, !ModuleInfo
-            , no, _, 0, _, !CalleeListToBeParallelized, !SiteNumCounter),
+        process_goal_for_implicit_parallelism(Then0, Then, ProcInfo,
+            !ModuleInfo, no, _, 0, _, !CalleeListToBeParallelized,
+            !SiteNumCounter),
+        process_goal_for_implicit_parallelism(Else0, Else, ProcInfo,
+            !ModuleInfo, no, _, 0, _, !CalleeListToBeParallelized,
+            !SiteNumCounter),
          GoalProcessed = hlds_goal(if_then_else(Vars, Cond, Then, Else),
              GoalInfo),
          update_conj_and_index(!MaybeConj, GoalProcessed, !IndexInConj), 
@@ -324,8 +326,8 @@
      list(candidate_call_site)::in, list(candidate_call_site)::out,
      counter::in, counter::out) is det.

-process_call_for_implicit_parallelism(Call, ProcInfo, !ModuleInfo, !IndexInConj
-    , !MaybeConj, !CalleeListToBeParallelized, !SiteNumCounter) :-
+process_call_for_implicit_parallelism(Call, ProcInfo, !ModuleInfo,
+    !IndexInConj, !MaybeConj, !CalleeListToBeParallelized, !SiteNumCounter) :-
      counter.allocate(SlotNumber, !SiteNumCounter),
      get_call_kind_and_callee(!.ModuleInfo, Call, Kind, CalleeRawId),
      (
Index: compiler/inst_graph.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/inst_graph.m,v
retrieving revision 1.15
diff -u -r1.15 inst_graph.m
--- compiler/inst_graph.m	27 Dec 2006 03:17:52 -0000	1.15
+++ compiler/inst_graph.m	23 May 2007 10:04:05 -0000
@@ -289,7 +289,7 @@

  foldl_reachable_aux2(P, InstGraph, Var, Seen, !Acc1, !Acc2) :-
      P(Var, !Acc1, !Acc2),
-    map.lookup(InstGraph, Var, node(Functors, _)) ,
+    map.lookup(InstGraph, Var, node(Functors, _)),
      map.foldl2((pred(_ConsId::in, Args::in, MAcc10::in, MAcc1::out,
              MAcc20::in, MAcc2::out) is det :-
          list.foldl2((pred(Arg::in, LAccA0::in, LAccA::out,
Index: compiler/interval.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/interval.m,v
retrieving revision 1.27
diff -u -r1.27 interval.m
--- compiler/interval.m	6 Jan 2007 10:56:14 -0000	1.27
+++ compiler/interval.m	23 May 2007 10:04:05 -0000
@@ -941,7 +941,7 @@
          GoalExpr = scope(Reason, SubGoal),
          Goal = hlds_goal(GoalExpr, GoalInfo0)
      ;
-        GoalExpr0 = generic_call(GenericCall, _ , _, _),
+        GoalExpr0 = generic_call(GenericCall, _, _, _),
          % Casts are generated inline.
          ( GenericCall = cast(_) ->
              MustHaveMap = no
Index: compiler/layout_out.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/layout_out.m,v
retrieving revision 1.90
diff -u -r1.90 layout_out.m
--- compiler/layout_out.m	2 May 2007 02:15:58 -0000	1.90
+++ compiler/layout_out.m	23 May 2007 10:04:05 -0000
@@ -1015,7 +1015,7 @@
          _MaybeTrailSlot, _MaybeMaxfrSlot, _EvalMethod,
          _MaybeCallTableSlot, _EffTraceLevel, _Flags),
      ProcLabel = make_proc_label_from_rtti(RttiProcLabel),
-    ModuleName = get_defining_module_name(ProcLabel) ,
+    ModuleName = get_defining_module_name(ProcLabel),
      (
          MaybeCallLabelLayout = yes(CallLabelDetails),
          CallLabelDetails = label_layout_details(CallProcLabel, LabelNum,
Index: compiler/lp_rational.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/lp_rational.m,v
retrieving revision 1.8
diff -u -r1.8 lp_rational.m
--- compiler/lp_rational.m	1 Dec 2006 15:04:04 -0000	1.8
+++ compiler/lp_rational.m	23 May 2007 10:04:05 -0000
@@ -361,15 +361,15 @@
  constraint([], (=<), Const) = lte([], Const).
  constraint([], (=),  Const) = eq([], Const).
  constraint([], (>=), Const) = lte([], -Const).
-constraint(Terms0 @ [_|_], (=<), Const0) = Constraint :-
+constraint(Terms0 @ [_ | _], (=<), Const0) = Constraint :-
      Terms1 = sum_like_terms(Terms0),
      normalize_terms_and_const(yes, Terms1, Const0, Terms, Const),
      Constraint = lte(Terms, Const).
-constraint(Terms0 @ [_|_], (=) , Const0) = Constraint :-
+constraint(Terms0 @ [_ | _], (=), Const0) = Constraint :-
      Terms1 = sum_like_terms(Terms0),
      normalize_terms_and_const(no, Terms1, Const0, Terms, Const),
      Constraint = eq(Terms, Const).
-constraint(Terms0 @ [_|_], (>=), Const0) = Constraint :-
+constraint(Terms0 @ [_ | _], (>=), Const0) = Constraint :-
      Terms1 = sum_like_terms(Terms0),
      normalize_terms_and_const(yes, Terms1, Const0, Terms, Const),
      Constraint = lte(negate_lp_terms(Terms), -Const).
@@ -579,7 +579,7 @@
          (
              Constraint = lte([Term | _], _)
          ;
-            Constraint = eq([Term | _] ,  _)
+            Constraint = eq([Term | _],  _)
          ;
              Constraint = gte([Term | _], _)
          ),
@@ -974,7 +974,7 @@
  optimize(ObjVars, Result, !Tableau) :-
      simplex(Result0, !Tableau),
      (
-        Result0 = no ,
+        Result0 = no,
          Result  = unbounded
      ;
          Result0 = yes,
@@ -2026,7 +2026,7 @@
  normalize_vector(Var, !.Terms, !.Constant, !:Terms, !:Constant) :-
      ( Coefficient = !.Terms ^ elem(Var) ->
          ( if    Coefficient = zero
-          then  unexpected(this_file ,
+          then  unexpected(this_file,
                      "normalize_vector/5: zero coefficient in vector.")
            else  true
          ),
Index: compiler/make.program_target.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/make.program_target.m,v
retrieving revision 1.71
diff -u -r1.71 make.program_target.m
--- compiler/make.program_target.m	7 May 2007 06:59:23 -0000	1.71
+++ compiler/make.program_target.m	23 May 2007 10:04:05 -0000
@@ -870,7 +870,7 @@
  install_library(MainModuleName, Succeeded, !Info, !IO) :-
      find_reachable_local_modules(MainModuleName, DepsSuccess, AllModules0,
          !Info, !IO),
-    AllModules = set.to_sorted_list(AllModules0) ,
+    AllModules = set.to_sorted_list(AllModules0),
      make_install_dirs(DirSucceeded, LinkSucceeded, !IO),
      (
          DepsSuccess = yes,
Index: compiler/modules.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/modules.m,v
retrieving revision 1.423
diff -u -r1.423 modules.m
--- compiler/modules.m	15 May 2007 02:38:21 -0000	1.423
+++ compiler/modules.m	23 May 2007 10:04:05 -0000
@@ -3168,7 +3168,7 @@
              PicAsmDateFileName, " ",
              ILDateFileName, " ",
              JavaDateFileName
-        ] , !IO),
+        ], !IO),
          io.write_strings(DepStream, [" : ", SourceFileName], !IO),
          % If the module contains nested sub-modules then `.int0'
          % file must first be built.
Index: compiler/prog_data.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/prog_data.m,v
retrieving revision 1.189
diff -u -r1.189 prog_data.m
--- compiler/prog_data.m	7 May 2007 05:21:35 -0000	1.189
+++ compiler/prog_data.m	23 May 2007 10:04:05 -0000
@@ -19,7 +19,6 @@
  % backends are contained in prog_item.m.
  %
  %-----------------------------------------------------------------------------%
-%-----------------------------------------------------------------------------%

  :- module parse_tree.prog_data.
  :- interface.
Index: compiler/purity.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/purity.m,v
retrieving revision 1.112
diff -u -r1.112 purity.m
--- compiler/purity.m	17 May 2007 03:52:50 -0000	1.112
+++ compiler/purity.m	23 May 2007 10:04:05 -0000
@@ -287,7 +287,7 @@
      module_info::in, list(error_spec)::in, list(error_spec)::out) is det.

  puritycheck_pred(PredId, !PredInfo, ModuleInfo, !Specs) :-
-    pred_info_get_purity(!.PredInfo, DeclPurity) ,
+    pred_info_get_purity(!.PredInfo, DeclPurity),
      pred_info_get_promised_purity(!.PredInfo, PromisedPurity),
      some [!ClausesInfo] (
          pred_info_get_clauses_info(!.PredInfo, !:ClausesInfo),
Index: compiler/recompilation.check.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/recompilation.check.m,v
retrieving revision 1.39
diff -u -r1.39 recompilation.check.m
--- compiler/recompilation.check.m	19 Jan 2007 07:04:29 -0000	1.39
+++ compiler/recompilation.check.m	23 May 2007 10:04:05 -0000
@@ -1165,7 +1165,7 @@
      constructor_arg::in,
      recompilation_check_info::in, recompilation_check_info::out) is det.

-check_field_ambiguities(_, _, ctor_arg(no, _, _) , !Info).
+check_field_ambiguities(_, _, ctor_arg(no, _, _), !Info).
  check_field_ambiguities(NeedQualifier, ResolvedCtor,
          ctor_arg(yes(FieldName), _, _), !Info) :-
      % XXX The arities to match below will need to change if we ever
Index: compiler/term_constr_data.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/term_constr_data.m,v
retrieving revision 1.7
diff -u -r1.7 term_constr_data.m
--- compiler/term_constr_data.m	27 Dec 2006 03:17:56 -0000	1.7
+++ compiler/term_constr_data.m	23 May 2007 10:04:05 -0000
@@ -637,7 +637,7 @@
          ), SCC, !IO).

  dump_abstract_proc(Proc, Indent, Module, !IO) :-
-    Proc = abstract_proc(AbstractPPId, _, _, _, HeadVars, _ ,_,
+    Proc = abstract_proc(AbstractPPId, _, _, _, HeadVars, _, _,
          Body, _, Varset, _, _),
      indent_line(Indent, !IO),
      AbstractPPId = real(PPId),
Index: compiler/term_util.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/term_util.m,v
retrieving revision 1.55
diff -u -r1.55 term_util.m
--- compiler/term_util.m	17 May 2007 03:52:53 -0000	1.55
+++ compiler/term_util.m	23 May 2007 10:04:05 -0000
@@ -125,7 +125,7 @@

      % Succeeds if one or more variables in the list are higher order.
      %
-:- pred horder_vars(list(prog_var)::in , vartypes::in) is semidet.
+:- pred horder_vars(list(prog_var)::in, vartypes::in) is semidet.

  :- pred get_context_from_scc(list(pred_proc_id)::in, module_info::in,
      prog_context::out) is det.
Index: compiler/xml_documentation.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/xml_documentation.m,v
retrieving revision 1.15
diff -u -r1.15 xml_documentation.m
--- compiler/xml_documentation.m	17 May 2007 03:52:56 -0000	1.15
+++ compiler/xml_documentation.m	23 May 2007 10:04:05 -0000
@@ -566,7 +566,7 @@
  mer_mode(IVarset, user_defined_mode(Name, Args)) = Xml :-
      Ref = attr("ref", sym_name_and_arity_to_id("mode", Name, length(Args))),
      XmlArgs = xml_list("mode_args", mer_inst(IVarset), Args),
-    Xml = elem("user_defined_mode" , [Ref], [name(Name), XmlArgs]).
+    Xml = elem("user_defined_mode", [Ref], [name(Name), XmlArgs]).

  :- func mer_inst(inst_varset, mer_inst) = xml.

@@ -578,7 +578,7 @@
      XmlInsts = xml_list("bound_insts", bound_inst(IVarset), BoundInsts),
      Xml = elem("bound", [], [XmlUniq, XmlInsts]).
  mer_inst(_, ground(U, _)) = elem("ground", [], [uniqueness(U)]).
-mer_inst(_, not_reached) = elem("not_reached", [] , []).
+mer_inst(_, not_reached) = elem("not_reached", [], []).
  mer_inst(IVarset, inst_var(IVar)) = Xml :-
      IVarName = varset.lookup_name(IVarset, IVar),
      Xml = tagged_string("inst_var", IVarName).
Index: deep_profiler/mdprof_cgi.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/deep_profiler/mdprof_cgi.m,v
retrieving revision 1.18
diff -u -r1.18 mdprof_cgi.m
--- deep_profiler/mdprof_cgi.m	2 Apr 2007 02:42:32 -0000	1.18
+++ deep_profiler/mdprof_cgi.m	23 May 2007 10:04:05 -0000
@@ -133,7 +133,7 @@
  :- pred write_version_message(string::in, io::di, io::uo) is det.

  write_version_message(ProgName, !IO) :-
-    library.version(Version) ,
+    library.version(Version),
      io.write_string(ProgName, !IO),
      io.write_string(": Mercury deep profiler", !IO),
      io.nl(!IO),
Index: library/pqueue.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/library/pqueue.m,v
retrieving revision 1.24
diff -u -r1.24 pqueue.m
--- library/pqueue.m	28 Jul 2006 04:54:04 -0000	1.24
+++ library/pqueue.m	23 May 2007 10:04:05 -0000
@@ -101,7 +101,7 @@
          V1 = V0,
          pqueue.insert_2(K, V, L0, R0, L, R)
      ),
-    PQ = pqueue(D, K1 ,V1, L, R).
+    PQ = pqueue(D, K1, V1, L, R).

  :- pred pqueue.insert_2(K::in, V::in, pqueue(K, V)::in, pqueue(K, V)::in,
      pqueue(K, V)::out, pqueue(K, V)::out) is det.
Index: profiler/output.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/profiler/output.m,v
retrieving revision 1.26
diff -u -r1.26 output.m
--- profiler/output.m	1 Dec 2006 15:04:39 -0000	1.26
+++ profiler/output.m	23 May 2007 10:04:05 -0000
@@ -226,9 +226,9 @@
      string.int_to_string(Index, IndexStr0),
      string.append_list(["[", IndexStr0, "] "], IndexStr),
      string.format("%40d             %s [%d]\n",
-        [i(SelfCalls),s(FullName),i(Index)], SelfCallsString),
+        [i(SelfCalls), s(FullName), i(Index)], SelfCallsString),
      string.format("%-6s %5.1f %7.2f %11.2f %7d", [s(IndexStr),
-        f(Percentage) , f(Self), f(Descendant), i(TotalCalls)], InitMiddleStr),
+        f(Percentage), f(Self), f(Descendant), i(TotalCalls)], InitMiddleStr),

      ( SelfCalls \= 0 ->
          io.write_string(SelfCallsString, !IO)

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