mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-18 02:43:40 +00:00
compiler/prog_item.m:
Clarify the documentation of include_module items.
tests/invalid/bad_include.{m,err_exp}:
A new test case to test diagnostics for different kinds of invalid
include_module items.
tests/invalid/Mmakefile:
Enable the new test case.
30 lines
916 B
Mathematica
30 lines
916 B
Mathematica
%---------------------------------------------------------------------------%
|
|
% vim: ft=mercury ts=4 sw=4 et
|
|
%---------------------------------------------------------------------------%
|
|
|
|
:- module bad_include.
|
|
:- interface.
|
|
|
|
:- import_module io.
|
|
|
|
:- pred main(io::di, io::uo) is det.
|
|
|
|
%---------------------------------------------------------------------------%
|
|
%---------------------------------------------------------------------------%
|
|
|
|
:- implementation.
|
|
|
|
:- include_module 42.
|
|
:- include_module f([1, 2, 3]).
|
|
:- include_module bad_include.sub1.sub2.
|
|
:- include_module other_module.sub3.
|
|
|
|
%---------------------------------------------------------------------------%
|
|
|
|
main(!IO) :-
|
|
io.write_string("hello, world\n", !IO).
|
|
|
|
%---------------------------------------------------------------------------%
|
|
:- end_module bad_include.
|
|
%---------------------------------------------------------------------------%
|