Files
mercury/browser/mdb.m
Zoltan Somogyi 36c912b0e3 Carve three new modules out of browser/browse.m.
Each of the new modules, and the updated browse.m, have significantly more
cohesion than the original browse.m.

browser/print_term.m:
    A new module containing the parts of the old browse.m that dealt with
    printing out terms or their components.

    This module exports its services to the updated browse.m and
    to trace/mercury_trace_vars.c.

browser/save_term.m:
    A new module containing the parts of the old browse.m that dealt with
    dumping terms to files.

    This module exports its services to trace/mercury_trace_browse.c.

browser/term_paths.m:
    A new module containing the parts of the old browse.m that dealt with
    operations on paths in terms.

    This module exports its services to the updated browse.m,
    declarative_user.m, and print_term.m.

browser/browse.m:
    Delete the code moved to the new modules.

browser/mdb.m:
    Include the three new modules.

browser/term_to_html.m:
    Add module qualifiers to some calls to reduce ambiguity.

browser/declarative_user.m:
ssdb/ssdb.m:
trace/mercury_trace_browse.c:
trace/mercury_trace_vars.c:
    Conform to the changes above.
2023-08-01 04:15:22 +02:00

77 lines
2.5 KiB
Mathematica

%---------------------------------------------------------------------------%
% vim: ft=mercury ts=4 sw=4 et
%---------------------------------------------------------------------------%
% Copyright (C) 1998-2006 The University of Melbourne.
% Copyright (C) 2017-2018 The Mercury team.
% This file is distributed under the terms specified in COPYING.LIB.
%---------------------------------------------------------------------------%
:- module mdb.
:- interface.
:- pred mdb.version(string::out) is det.
% These interface modules are used directly by the test programs
% or the libmer_trace library.
:- include_module browse.
:- include_module browser_info.
:- include_module browser_term.
:- include_module collect_lib.
:- include_module cterm.
:- include_module debugger_interface.
:- include_module declarative_debugger.
:- include_module declarative_execution.
:- include_module diff.
:- include_module help.
:- include_module interactive_query.
:- include_module io_action.
:- include_module listing.
:- include_module print_term.
:- include_module save_term.
:- include_module term_paths.
%---------------------------------------------------------------------------%
%---------------------------------------------------------------------------%
:- implementation.
:- include_module declarative_analyser.
:- include_module declarative_edt.
:- include_module declarative_oracle.
:- include_module declarative_tree.
:- include_module declarative_user.
:- include_module frame.
:- include_module parse.
:- include_module percent_encoding.
:- include_module sized_pretty.
:- include_module term_rep.
:- include_module term_to_html.
:- include_module util.
% XXX these modules are more generally useful, but the
% dynamic linking library is not yet installed anywhere.
:- include_module dl.
:- include_module name_mangle.
%---------------------------------------------------------------------------%
% See library/library.m for why we implement this predicate this way.
:- pragma foreign_proc("C",
mdb.version(Version::out),
[will_not_call_mercury, promise_pure, thread_safe],
"
MR_ConstString version_string =
MR_VERSION "", configured for "" MR_FULLARCH;
// We need to cast away const here, because Mercury declares Version
// to have type MR_String, not MR_ConstString.
Version = (MR_String) (MR_Word) version_string;
").
mdb.version("unknown version").
%---------------------------------------------------------------------------%
:- end_module mdb.
%---------------------------------------------------------------------------%