Fix more warnings from --warn-inconsistent-pred-order-clauses.

deep_profiler/*.m:
    Fix inconsistencies between (a) the order in which functions and predicates
    are declared, and (b) the order in which they are defined.

    In most modules, either the order of the declarations or the order
    of the definitions made sense, and I changed the other to match.
    In some modules, neither made sense, so I changed *both* to an order
    that *does* make sense (i.e. it has related predicates together).

    In query.m, put the various commands in the same sensible order
    as the code processing them.

    In html_format.m, merge two exported functions together, since
    they can't be used separately.

    In some places, put dividers between groups of related
    functions/predicates, to make the groups themselves more visible.

    In some places, fix comments or programming style.

deep_profiler/DEEP_FLAGS.in:
    Since all the modules in this directory are now free from any warnings
    generated by --warn-inconsistent-pred-order-clauses, specify that option
    by default in this directory to keep it that way.
This commit is contained in:
Zoltan Somogyi
2017-04-30 15:48:13 +10:00
parent 1a778114db
commit 9095985aa8
48 changed files with 2245 additions and 2214 deletions

View File

@@ -1,10 +1,10 @@
%-----------------------------------------------------------------------------%
%---------------------------------------------------------------------------%
% vim: ft=mercury ts=4 sw=4 et
%-----------------------------------------------------------------------------%
%---------------------------------------------------------------------------%
% Copyright (C) 2011-2012 The University of Melbourne.
% This file may only be copied under the terms of the GNU General
% Public License - see the file COPYING in the Mercury distribution.
%-----------------------------------------------------------------------------%
%---------------------------------------------------------------------------%
%
% File: autopar_calc_overlap.m
% Author: pbone.
@@ -12,7 +12,7 @@
% This module contains the code that calculates the likely overlap
% between conjuncts in a parallelized conjunction.
%
%-----------------------------------------------------------------------------%
%---------------------------------------------------------------------------%
:- module mdprof_fb.automatic_parallelism.autopar_calc_overlap.
:- interface.
@@ -30,8 +30,8 @@
incomplete_parallelisation::in, incomplete_parallelisation::out,
parallelisation_cost_data::out) is det.
%-----------------------------------------------------------------------------%
%-----------------------------------------------------------------------------%
%---------------------------------------------------------------------------%
%---------------------------------------------------------------------------%
:- implementation.
@@ -56,7 +56,7 @@
:- import_module set.
:- import_module string.
%----------------------------------------------------------------------------%
%---------------------------------------------------------------------------%
calculate_parallel_cost(Info, !Parallelisation, CostData) :-
ParConj = ip_get_par_conjs(!.Parallelisation),
@@ -624,4 +624,4 @@ var_first_use_time(FindProdOrCons, TimeBefore, Goal, Var, Time) :-
),
Time = TimeBefore + UseTime.
%----------------------------------------------------------------------------%
%---------------------------------------------------------------------------%