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.
34 lines
889 B
Mathematica
34 lines
889 B
Mathematica
%---------------------------------------------------------------------------%
|
|
% vim: ts=4 sw=4 et ft=mercury
|
|
%---------------------------------------------------------------------------%
|
|
%
|
|
% This test case exposes a bug in the interaction of solver types and
|
|
% submodules in rotd-2005-09-06 and before. The problem was that the submodules
|
|
% were reading in the solver type declarations from the .int0 files
|
|
% and adding the foreign_procs for the representation and intialisation
|
|
% functions.
|
|
% (The test case is from Peter Hawkins.)
|
|
|
|
:- module ts.
|
|
:- interface.
|
|
|
|
:- include_module ts_helper_1.
|
|
:- import_module io.
|
|
|
|
:- pred main(io::di, io::uo) is det.
|
|
|
|
:- implementation.
|
|
|
|
:- import_module exception.
|
|
:- import_module int.
|
|
|
|
:- solver type st where representation is int.
|
|
|
|
:- pred init_int(st::oa) is erroneous.
|
|
|
|
init_int(_A) :-
|
|
throw("stop").
|
|
|
|
main(!IO) :-
|
|
print("hello\n", !IO).
|