Files
mercury/tests/recompilation/nested_module_r.m.1
Zoltan Somogyi 1b093f34ee Stop using a type where it does not belong.
compiler/module_imports.m:
    The module_timestamp type has long had a field of the need_qualifier type.
    For a year or more now, this field has had a big comment on it explaining
    why its use here does not match the semantics of the need_qualifier type.

    This diff gives this field a new, bespoke type, that is isomorphic
    to need_qualifier, but is completely deparate. Document the reason why
    I *can't* document the semantics of this new type :-(

compiler/grab_modules.m:
    Do the same kind of replacement on values that are used only to set
    this field of module_timestamps.

compiler/recompilation.check.m:
compiler/recompilation.usage.m:
    Use the values of the new type to make the same decisions we used to make
    using values of the need_qualifier type.

tests/recompilation/*.m*:
    Bring the programming style of these modules up to date.

tests/recompilation/*.err_exp.2:
    Expect the updated line numbers in messages.

Delete the need_qualifier field from timestamps.
2019-11-09 17:53:43 +11:00

45 lines
817 B
Groff

%---------------------------------------------------------------------------%
% vim: ts=4 sw=4 et ft=mercury
%---------------------------------------------------------------------------%
:- module nested_module_r.
:- interface.
:- import_module io.
:- pred main(io::di, io::uo) is det.
:- implementation.
:- import_module nested_module_r.sub_nested_module, nested_module_r_2.
:- type t
---> c(int).
main(!IO) :-
main_2(!IO).
:- module nested_module_r.sub_nested_module.
:- interface.
:- import_module io.
:- pred main_2(io::di, io::uo) is det.
:- implementation.
:- import_module nested_module_r_2.
main_2(!IO) :-
output(c(1), !IO).
:- pred output(t::in, io::di, io::uo) is det.
output(X, !IO) :-
io.write(X, !IO),
io.nl(!IO).
:- end_module nested_module_r.sub_nested_module.