[m-rev.] diff: module qualification in browser
Zoltan Somogyi
zs at cs.mu.OZ.AU
Mon Jan 24 18:43:48 AEDT 2005
browser/*.m:
Fix the current mixture of __ and . to module qualify module names
by standardizing on the latter.
Zoltan.
cvs diff: Diffing .
Index: browse.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/browser/browse.m,v
retrieving revision 1.49
diff -u -b -r1.49 browse.m
--- browse.m 18 Jan 2005 03:56:51 -0000 1.49
+++ browse.m 24 Jan 2005 02:39:31 -0000
@@ -16,12 +16,13 @@
% authors: aet
% stability: low
-:- module mdb__browse.
+:- module mdb.browse.
:- interface.
-:- import_module mdb__browser_info.
-:- import_module mdb__browser_term.
+:- import_module mdb.browser_info.
+:- import_module mdb.browser_term.
+
:- import_module io, std_util, list.
% The interactive term browser. The caller type will be `browse', and
Index: browse_test.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/browser/browse_test.m,v
retrieving revision 1.4
diff -u -b -r1.4 browse_test.m
--- browse_test.m 14 Sep 2003 22:24:27 -0000 1.4
+++ browse_test.m 24 Jan 2005 02:39:41 -0000
@@ -15,8 +15,7 @@
:- import_module io.
-:- pred main(io__state, io__state).
-:- mode main(di, uo) is cc_multi.
+:- pred main(io::di, io::uo) is cc_multi.
:- implementation.
Index: browser_info.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/browser/browser_info.m,v
retrieving revision 1.17
diff -u -b -r1.17 browser_info.m
--- browser_info.m 18 Jan 2005 03:56:51 -0000 1.17
+++ browser_info.m 24 Jan 2005 02:39:58 -0000
@@ -10,14 +10,13 @@
% Basic data structures used by the browser.
%
-:- module mdb__browser_info.
+:- module mdb.browser_info.
:- interface.
-:- import_module mdbcomp.
-:- import_module mdbcomp__program_representation.
-:- import_module mdb__browser_term.
+:- import_module mdb.browser_term.
:- import_module mdb.parse.
+:- import_module mdbcomp.program_representation.
:- import_module bool, list, std_util, io, getopt.
Index: browser_term.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/browser/browser_term.m,v
retrieving revision 1.1
diff -u -b -r1.1 browser_term.m
--- browser_term.m 9 Aug 2004 03:05:20 -0000 1.1
+++ browser_term.m 24 Jan 2005 02:40:01 -0000
@@ -7,7 +7,7 @@
% This module defines a type to represent both natural and synthetic terms
% for use by the browser.
-:- module mdb__browser_term.
+:- module mdb.browser_term.
:- interface.
Index: collect_lib.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/browser/collect_lib.m,v
retrieving revision 1.9
diff -u -b -r1.9 collect_lib.m
--- collect_lib.m 6 Feb 2003 13:37:07 -0000 1.9
+++ collect_lib.m 24 Jan 2005 02:40:07 -0000
@@ -54,7 +54,7 @@
% execution. When the end of the execution is reached, the last value of
% the collecting variable is send to the debugger.
-:- module mdb__collect_lib.
+:- module mdb.collect_lib.
:- interface.
:- pred dummy_pred_to_avoid_warning_about_nothing_exported is det.
Index: debugger_interface.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/browser/debugger_interface.m,v
retrieving revision 1.21
diff -u -b -r1.21 debugger_interface.m
--- debugger_interface.m 19 Jan 2005 03:10:16 -0000 1.21
+++ debugger_interface.m 24 Jan 2005 02:40:30 -0000
@@ -13,7 +13,7 @@
%
% This module corresponds to what is called the "Query Handler" in Opium.
-:- module mdb__debugger_interface.
+:- module mdb.debugger_interface.
:- interface.
% This module exports the following C functions:
@@ -31,11 +31,11 @@
:- implementation.
-:- import_module list, bool, std_util.
-:- import_module mdb__interactive_query.
-:- import_module mdb__util.
-:- import_module mdbcomp__prim_data.
+:- import_module mdb.interactive_query.
+:- import_module mdb.util.
+:- import_module mdbcomp.prim_data.
+:- import_module list, bool, std_util.
:- import_module io, require.
dummy_pred_to_avoid_warning_about_nothing_exported.
Index: declarative_debugger.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/browser/declarative_debugger.m,v
retrieving revision 1.48
diff -u -b -r1.48 declarative_debugger.m
--- declarative_debugger.m 21 Jan 2005 14:54:46 -0000 1.48
+++ declarative_debugger.m 24 Jan 2005 02:38:57 -0000
@@ -53,16 +53,15 @@
%
%-----------------------------------------------------------------------------%
-:- module mdb__declarative_debugger.
+:- module mdb.declarative_debugger.
:- interface.
-:- import_module mdb__declarative_execution.
-:- import_module mdb__io_action.
-:- import_module mdbcomp__program_representation.
:- import_module mdb.browser_info.
-
+:- import_module mdb.declarative_execution.
+:- import_module mdb.io_action.
:- import_module mdb.term_rep.
+:- import_module mdbcomp.program_representation.
:- import_module io, list, std_util, string.
Index: declarative_execution.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/browser/declarative_execution.m,v
retrieving revision 1.33
diff -u -b -r1.33 declarative_execution.m
--- declarative_execution.m 21 Jan 2005 14:54:46 -0000 1.33
+++ declarative_execution.m 24 Jan 2005 02:39:10 -0000
@@ -14,14 +14,14 @@
% end (in browser/declarative_debugger.m) where it is analysed
% to produce a bug diagnosis.
-:- module mdb__declarative_execution.
+:- module mdb.declarative_execution.
:- interface.
-:- import_module mdb__util.
+:- import_module mdb.util.
:- import_module mdb.term_rep.
-:- import_module mdbcomp__prim_data.
-:- import_module mdbcomp__program_representation.
+:- import_module mdbcomp.prim_data.
+:- import_module mdbcomp.program_representation.
:- import_module list, std_util, io, bool.
Index: declarative_oracle.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/browser/declarative_oracle.m,v
retrieving revision 1.35
diff -u -b -r1.35 declarative_oracle.m
--- declarative_oracle.m 20 Jan 2005 02:47:50 -0000 1.35
+++ declarative_oracle.m 24 Jan 2005 02:40:54 -0000
@@ -22,13 +22,13 @@
% the user will not be asked the same question twice.
%
-:- module mdb__declarative_oracle.
+:- module mdb.declarative_oracle.
:- interface.
-:- import_module mdb__declarative_debugger.
-:- import_module mdb__declarative_execution.
:- import_module mdb.browser_info.
+:- import_module mdb.declarative_debugger.
+:- import_module mdb.declarative_execution.
:- import_module io, bool, string.
Index: declarative_test.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/browser/declarative_test.m,v
retrieving revision 1.4
diff -u -b -r1.4 declarative_test.m
--- declarative_test.m 27 Oct 2003 06:19:09 -0000 1.4
+++ declarative_test.m 24 Jan 2005 02:41:02 -0000
@@ -15,14 +15,13 @@
:- import_module io.
-:- pred main(io__state, io__state).
-:- mode main(di, uo) is det.
+:- pred main(io::di, io::uo) is det.
:- implementation.
:- import_module mdb.
-:- import_module mdb__declarative_debugger.
-:- import_module mdb__declarative_execution.
+:- import_module mdb.declarative_debugger.
+:- import_module mdb.declarative_execution.
:- import_module list, std_util, map, require.
Index: declarative_tree.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/browser/declarative_tree.m,v
retrieving revision 1.16
diff -u -b -r1.16 declarative_tree.m
--- declarative_tree.m 19 Jan 2005 09:55:20 -0000 1.16
+++ declarative_tree.m 24 Jan 2005 02:41:17 -0000
@@ -10,13 +10,13 @@
%
%-----------------------------------------------------------------------------%
-:- module mdb__declarative_tree.
+:- module mdb.declarative_tree.
:- interface.
:- import_module mdb.declarative_edt.
-:- import_module mdb__declarative_execution.
-:- import_module mdbcomp__program_representation.
+:- import_module mdb.declarative_execution.
+:- import_module mdbcomp.program_representation.
% The type of nodes in our implementation of EDTs. The parameter
% is meant to be the type of references to trace nodes. In
@@ -45,11 +45,11 @@
:- implementation.
-:- import_module mdb__declarative_debugger.
-:- import_module mdb__io_action.
-:- import_module mdbcomp__prim_data.
-:- import_module mdbcomp__program_representation.
-:- import_module mdb__util.
+:- import_module mdb.declarative_debugger.
+:- import_module mdb.io_action.
+:- import_module mdb.util.
+:- import_module mdbcomp.prim_data.
+:- import_module mdbcomp.program_representation.
:- import_module assoc_list, bool, exception, int, list, map, std_util, string.
:- import_module io.
Index: declarative_user.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/browser/declarative_user.m,v
retrieving revision 1.38
diff -u -b -r1.38 declarative_user.m
--- declarative_user.m 21 Jan 2005 14:54:47 -0000 1.38
+++ declarative_user.m 24 Jan 2005 02:39:17 -0000
@@ -12,12 +12,12 @@
% responses to debugger queries from the user.
%
-:- module mdb__declarative_user.
+:- module mdb.declarative_user.
:- interface.
-:- import_module mdb__declarative_debugger.
:- import_module mdb.browser_info.
+:- import_module mdb.declarative_debugger.
:- import_module io.
Index: dl.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/browser/dl.m,v
retrieving revision 1.23
diff -u -b -r1.23 dl.m
--- dl.m 2 Sep 2004 04:03:50 -0000 1.23
+++ dl.m 24 Jan 2005 02:41:36 -0000
@@ -14,10 +14,13 @@
% see the documentation for those procedures (i.e. `man dlopen').
%-----------------------------------------------------------------------------%
-:- module mdb__dl.
+
+:- module mdb.dl.
+
:- interface.
+
+:- import_module mdb.name_mangle.
:- import_module io.
-:- import_module mdb__name_mangle.
:- type (mode) ---> lazy ; now. % RTLD_LAZY or RTLD_NOW
:- type scope ---> local ; global. % RTLD_GLOBAL or not.
@@ -78,6 +81,7 @@
:- pred dl__close(handle::in, dl__result::out, io::di, io::uo) is det.
:- implementation.
+
:- import_module std_util, require, string, list, int.
:- pragma foreign_decl("C", "
Index: frame.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/browser/frame.m,v
retrieving revision 1.6
diff -u -b -r1.6 frame.m
--- frame.m 5 Nov 2003 03:17:31 -0000 1.6
+++ frame.m 24 Jan 2005 02:41:48 -0000
@@ -15,7 +15,7 @@
% authors: aet
% stability: low
-:- module mdb__frame.
+:- module mdb.frame.
:- interface.
@@ -56,8 +56,8 @@
%---------------------------------------------------------------------------%
:- implementation.
+:- import_module mdb.util.
:- import_module string, list, int, io, require.
-:- import_module mdb__util.
frame__from_string(Str, [Str]).
Index: help.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/browser/help.m,v
retrieving revision 1.5
diff -u -b -r1.5 help.m
--- help.m 2 Sep 2004 04:03:50 -0000 1.5
+++ help.m 24 Jan 2005 02:42:00 -0000
@@ -19,7 +19,7 @@
%
%-----------------------------------------------------------------------------%
-:- module mdb__help.
+:- module mdb.help.
:- interface.
Index: interactive_query.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/browser/interactive_query.m,v
retrieving revision 1.23
diff -u -b -r1.23 interactive_query.m
--- interactive_query.m 13 Oct 2004 09:24:59 -0000 1.23
+++ interactive_query.m 24 Jan 2005 02:42:10 -0000
@@ -15,7 +15,8 @@
% procedure query/2 in that module, calls that procedure, and then
% cleans up the generated files.
-:- module mdb__interactive_query.
+:- module mdb.interactive_query.
+
:- interface.
:- import_module io, list.
@@ -34,9 +35,9 @@
:- implementation.
-:- import_module mdb__dl.
-:- import_module mdb__name_mangle.
-:- import_module mdb__util.
+:- import_module mdb.dl.
+:- import_module mdb.name_mangle.
+:- import_module mdb.util.
:- import_module std_util, bool, string, term, varset, term_io, parser.
Index: io_action.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/browser/io_action.m,v
retrieving revision 1.6
diff -u -b -r1.6 io_action.m
--- io_action.m 19 Jan 2005 03:10:17 -0000 1.6
+++ io_action.m 24 Jan 2005 02:42:19 -0000
@@ -12,12 +12,13 @@
%-----------------------------------------------------------------------------%
-:- module mdb__io_action.
+:- module mdb.io_action.
:- interface.
-:- import_module mdb__browser_term.
-:- import_module mdbcomp__prim_data.
+:- import_module mdb.browser_term.
+:- import_module mdbcomp.prim_data.
+
:- import_module list, map, std_util, io.
:- type io_action
Index: mdb.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/browser/mdb.m,v
retrieving revision 1.16
diff -u -b -r1.16 mdb.m
--- mdb.m 21 Jan 2005 14:54:46 -0000 1.16
+++ mdb.m 24 Jan 2005 02:33:07 -0000
@@ -36,6 +36,7 @@
:- include_module parse.
:- include_module sized_pretty.
:- include_module util.
+:- include_module term_rep.
:- include_module set_cc.
:- include_module tree234_cc.
Index: name_mangle.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/browser/name_mangle.m,v
retrieving revision 1.8
diff -u -b -r1.8 name_mangle.m
--- name_mangle.m 6 Feb 2003 13:37:08 -0000 1.8
+++ name_mangle.m 24 Jan 2005 02:58:21 -0000
@@ -20,7 +20,9 @@
% it can be easily changed if the representation of `mercury_proc' changes.
%-----------------------------------------------------------------------------%
-:- module mdb__name_mangle.
+
+:- module mdb.name_mangle.
+
:- interface.
% Given a mercury_proc specifying the module name,
@@ -56,6 +58,7 @@
%-----------------------------------------------------------------------------%
:- implementation.
+
:- import_module string, char, int, list.
% XXX most of the code below is very similar to the code in
@@ -72,6 +75,7 @@
).
:- func llds_proc_name_mangle(mercury_proc) = string.
+
llds_proc_name_mangle(MercuryProc) = LabelName :-
MercuryProc = mercury_proc(PredOrFunc, Module, Name0, Arity, ModeNum),
sym_name_mangle(Module, ModuleName),
@@ -109,6 +113,7 @@
).
:- func mlds_proc_name_mangle(mercury_proc) = string.
+
mlds_proc_name_mangle(MercuryProc) = LabelName :-
MercuryProc = mercury_proc(PredOrFunc, Module, Name0, Arity, ModeNum),
sym_name_mangle(Module, ModuleName),
@@ -139,8 +144,7 @@
PredOrFuncString, "_", ModeNumString],
LabelName).
-:- pred sym_name_mangle(sym_name, string).
-:- mode sym_name_mangle(in, out) is det.
+:- pred sym_name_mangle(sym_name::in, string::out) is det.
sym_name_mangle(unqualified(Name), MangledName) :-
name_mangle(Name, MangledName).
@@ -155,8 +159,7 @@
% quoted names such as 'name with embedded spaces' are valid
% predicate names in Mercury.
-:- pred name_mangle(string, string).
-:- mode name_mangle(in, out) is det.
+:- pred name_mangle(string::in, string::out) is det.
name_mangle(Name, MangledName) :-
(
@@ -177,8 +180,7 @@
convert_to_valid_c_identifier(Name, MangledName)
).
-:- pred convert_to_valid_c_identifier(string, string).
-:- mode convert_to_valid_c_identifier(in, out) is det.
+:- pred convert_to_valid_c_identifier(string::in, string::out) is det.
convert_to_valid_c_identifier(String, Name) :-
(
@@ -190,8 +192,7 @@
string__append("f", Name0, Name)
).
-:- pred qualify_name(string, string, string).
-:- mode qualify_name(in, in, out) is det.
+:- pred qualify_name(string::in, string::in, string::out) is det.
qualify_name(Module0, Name0, Name) :-
string__append_list([Module0, "__", Name0], Name).
@@ -203,8 +204,7 @@
% If the functor name is not found in the table, then
% we use a fall-back method which produces ugly names.
-:- pred name_conversion_table(string, string).
-:- mode name_conversion_table(in, out) is semidet.
+:- pred name_conversion_table(string::in, string::out) is semidet.
name_conversion_table("\\=", "f_not_equal").
name_conversion_table(">=", "f_greater_or_equal").
@@ -230,8 +230,7 @@
%
% For example, given the input "\n\t" we return "_10_8".
-:- pred convert_to_valid_c_identifier_2(string, string).
-:- mode convert_to_valid_c_identifier_2(in, out) is det.
+:- pred convert_to_valid_c_identifier_2(string::in, string::out) is det.
convert_to_valid_c_identifier_2(String, Name) :-
(
@@ -248,6 +247,7 @@
).
:- pred use_asm_labels is semidet.
+
:- pragma foreign_proc("C", use_asm_labels,
[will_not_call_mercury, promise_pure, thread_safe],
"
@@ -261,6 +261,7 @@
private_builtin__sorry("use_asm_labels").
:- pred high_level_code is semidet.
+
:- pragma foreign_proc("C", high_level_code,
[will_not_call_mercury, promise_pure, thread_safe],
"
Index: parse.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/browser/parse.m,v
retrieving revision 1.23
diff -u -b -r1.23 parse.m
--- parse.m 18 Jan 2005 03:56:52 -0000 1.23
+++ parse.m 24 Jan 2005 02:44:38 -0000
@@ -101,11 +101,11 @@
% ".."
%
-:- module mdb__parse.
+:- module mdb.parse.
:- interface.
-:- import_module mdb__browser_info.
+:- import_module mdb.browser_info.
:- import_module io, string, list, std_util, getopt.
@@ -167,7 +167,7 @@
:- implementation.
-:- import_module mdb__util.
+:- import_module mdb.util.
:- import_module bool, list, char, int.
Index: prim_data.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/browser/prim_data.m,v
retrieving revision 1.1
diff -u -b -r1.1 prim_data.m
--- prim_data.m 19 Jan 2005 03:10:18 -0000 1.1
+++ prim_data.m 24 Jan 2005 02:44:43 -0000
@@ -12,7 +12,7 @@
%-----------------------------------------------------------------------------%
-:- module mdbcomp__prim_data.
+:- module mdbcomp.prim_data.
:- interface.
Index: program_representation.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/browser/program_representation.m,v
retrieving revision 1.12
diff -u -b -r1.12 program_representation.m
--- program_representation.m 19 Nov 2004 11:54:17 -0000 1.12
+++ program_representation.m 24 Jan 2005 02:45:05 -0000
@@ -29,7 +29,7 @@
%-----------------------------------------------------------------------------%
-:- module mdbcomp__program_representation.
+:- module mdbcomp.program_representation.
:- interface.
Index: sized_pretty.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/browser/sized_pretty.m,v
retrieving revision 1.10
diff -u -b -r1.10 sized_pretty.m
--- sized_pretty.m 5 Nov 2004 06:30:19 -0000 1.10
+++ sized_pretty.m 24 Jan 2005 02:45:36 -0000
@@ -157,12 +157,13 @@
%
%---------------------------------------------------------------------------%
-:- module mdb__sized_pretty.
+:- module mdb.sized_pretty.
:- interface.
-:- import_module mdb__browser_info.
-:- import_module mdb__browser_term.
+:- import_module mdb.browser_info.
+:- import_module mdb.browser_term.
+
:- import_module std_util, int, string.
% sized_pretty__univ_to_string_line(Univ, LineWidth, Lines, String)
@@ -187,7 +188,6 @@
:- type measure_params
---> measure_params(int). % This parameter specifies Linewidth
-
:- type maybe_deconstructed(T)
---> not_deconstructed
; deconstructed(
Index: term_rep.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/browser/term_rep.m,v
retrieving revision 1.2
diff -u -b -r1.2 term_rep.m
Index: trace_counts.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/browser/trace_counts.m,v
retrieving revision 1.1
diff -u -b -r1.1 trace_counts.m
--- trace_counts.m 19 Jan 2005 03:10:18 -0000 1.1
+++ trace_counts.m 24 Jan 2005 02:45:54 -0000
@@ -13,12 +13,12 @@
%-----------------------------------------------------------------------------%
-:- module mdbcomp__trace_counts.
+:- module mdbcomp.trace_counts.
:- interface.
-:- import_module mdbcomp__prim_data.
-:- import_module mdbcomp__program_representation.
+:- import_module mdbcomp.prim_data.
+:- import_module mdbcomp.program_representation.
:- import_module io, map.
Index: util.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/browser/util.m,v
retrieving revision 1.26
diff -u -b -r1.26 util.m
--- util.m 19 Jan 2005 03:10:18 -0000 1.26
+++ util.m 24 Jan 2005 02:46:05 -0000
@@ -4,11 +4,11 @@
% Public License - see the file COPYING.LIB in the Mercury distribution.
%---------------------------------------------------------------------------%
-:- module mdb__util.
+:- module mdb.util.
:- interface.
-:- import_module mdbcomp__prim_data.
+:- import_module mdbcomp.prim_data.
:- import_module list, string, io, bool.
@@ -52,6 +52,7 @@
:- type unbound ---> '_'.
%---------------------------------------------------------------------------%
+
:- implementation.
:- import_module int, require.
--------------------------------------------------------------------------
mercury-reviews mailing list
post: mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------
More information about the reviews
mailing list