Files
mercury/tests/submodules/nested_intermod.m
Zoltan Somogyi eb6617c175 Rename X's aux modules as X_helper_N in submodules.
tests/submodules/*.m:
    Rename modules as mentioned above.

    Indent nested submodules to make them stand out.

    Group foreign_procs by what predicate they implement, not by
    their implementation language.

tests/submodules/*.m:
tests/submodules/*.err_exp:
tests/submodules/Mmakefile:
tests/submodules/Mercury.options:
    Update all references to the moved modules.
2023-06-19 22:16:36 +02:00

38 lines
799 B
Mathematica

%---------------------------------------------------------------------------%
% vim: ts=4 sw=4 et ft=mercury
%---------------------------------------------------------------------------%
:- module nested_intermod.
:- interface.
:- import_module io.
:- pred xyzzy(int).
:- mode xyzzy(in) is semidet.
:- pred main(io::di, io::uo) is det.
:- implementation.
:- import_module nested_intermod_helper_1.
main(!IO) :-
test(1, !IO),
test(2, !IO),
test(3, !IO),
test(4, !IO),
test(5, !IO).
:- pred test(int::in, io::di, io::uo) is det.
test(X, !IO) :-
io.print("X = ", !IO), io.print(X, !IO), io.print(": ", !IO),
( if xyzzy(X) then
io.print_line("yes", !IO)
else
io.print_line("no", !IO)
).
xyzzy(X) :-
foo(X).
:- end_module nested_intermod.