mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-16 01:43:35 +00:00
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.
38 lines
799 B
Mathematica
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.
|