mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-20 20:03:44 +00:00
tests/invalid/undef_inst.m:
tests/invalid/undef_mode.m:
tests/invalid/undef_type.m:
Besides the references to undefined insts, modes and types,
these modules also lacked interface and implementation section markers.
Add those markers.
tests/invalid/undef_inst.err_exp:
tests/invalid/undef_mode.err_exp:
tests/invalid/undef_type.err_exp:
Do not expect the error messages for the missing markers.
Continue to expect error messages about the undefined entities,
but with updated line numbers.
tests/invalid/undef_symbol.m:
tests/invalid/undef_type_mod_qual.m:
Fix programming style.
33 lines
651 B
Mathematica
33 lines
651 B
Mathematica
%---------------------------------------------------------------------------%
|
|
% vim: ts=4 sw=4 et ft=mercury
|
|
%---------------------------------------------------------------------------%
|
|
|
|
:- module undef_symbol.
|
|
|
|
:- interface.
|
|
|
|
:- import_module io.
|
|
|
|
:- pred main(io::di, io::uo) is det.
|
|
|
|
:- implementation.
|
|
|
|
main(!IO) :-
|
|
p(!IO),
|
|
q(!IO),
|
|
undef_symbol.r(!IO).
|
|
|
|
:- pred p(io::di, io::uo) is det.
|
|
|
|
p(!IO) :-
|
|
string.append("hello ", "world.\n", Str),
|
|
io.write_string(Str, !IO).
|
|
|
|
:- pred q(io::di, io::uo) is det.
|
|
|
|
q(!IO) :-
|
|
Context = term.context("random", 17),
|
|
io.write_line(Context, !IO).
|
|
|
|
% :- pred r(io::di, io::uo) is det.
|