mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-21 04:13:46 +00:00
tests/accumulator/*.m:
tests/analysis_*/*.m:
tests/benchmarks*/*.m:
tests/debugger*/*.{m,exp,inp}:
tests/declarative_debugger*/*.{m,exp,inp}:
tests/dppd*/*.m:
tests/exceptions*/*.m:
tests/general*/*.m:
tests/grade_subdirs*/*.m:
tests/hard_coded*/*.m:
Make these tests use four-space indentation, and ensure that
each module is imported on its own line. (I intend to use the latter
to figure out which subdirectories' tests can be executed in parallel.)
These changes usually move code to different lines. For the debugger tests,
specify the new line numbers in .inp files and expect them in .exp files.
47 lines
1.5 KiB
Mathematica
47 lines
1.5 KiB
Mathematica
%---------------------------------------------------------------------------%
|
|
% vim: ts=4 sw=4 et ft=mercury
|
|
%---------------------------------------------------------------------------%
|
|
%
|
|
% This is a regression test for Mantis bug 94. Versions of the compiler before
|
|
% 22 Sep 2009 used to generate a spurious mode error for init_message,
|
|
% because the term being returned, being in a from_ground_term_construct scope,
|
|
% was inferred to be ground, not unique.
|
|
|
|
:- module uo_regression1.
|
|
:- interface.
|
|
|
|
:- import_module io.
|
|
|
|
:- pred main(io::di, io::uo) is det.
|
|
|
|
%---------------------------------------------------------------------------%
|
|
%---------------------------------------------------------------------------%
|
|
|
|
:- implementation.
|
|
|
|
:- import_module maybe.
|
|
|
|
%---------------------------------------------------------------------------%
|
|
|
|
:- type status
|
|
---> status_ok
|
|
; status_error.
|
|
|
|
% Must have more fields than --from-ground-term-threshold.
|
|
:- type response
|
|
---> response(
|
|
response_status :: status,
|
|
response_error_message :: maybe(string),
|
|
response_sol_set :: maybe(string),
|
|
response_tbox_answer :: maybe(string),
|
|
response_custom_response :: maybe(string)
|
|
).
|
|
|
|
:- func init_message = (response::uo) is det.
|
|
|
|
init_message = response(status_ok, no, no, no, no).
|
|
|
|
main(!IO) :-
|
|
io.write(init_message, !IO),
|
|
io.nl(!IO).
|