mirror of
https://github.com/Mercury-Language/mercury.git
synced 2025-12-19 07:45:09 +00:00
Estimated hours taken: 2 Branches: main Replace deprecated mode and inst syntax in most of the test suite. TODO: Alter valid/mode_syntax.m when we start issuing warnings about the deprecated syntax. tests/*/*.m: Replace deprecated mode and inst syntax. Replace some uses of `:' as the module qualifier.
37 lines
550 B
Mathematica
37 lines
550 B
Mathematica
% regression test - Mercury 0.7 failed this test
|
|
|
|
:- module reorder_di.
|
|
|
|
:- interface.
|
|
|
|
:- import_module io.
|
|
|
|
:- pred main(io__state::di, io__state::uo) is det.
|
|
|
|
:- implementation.
|
|
|
|
:- import_module require.
|
|
|
|
main -->
|
|
{ r(Y) },
|
|
{ q(X) },
|
|
io__write_string(Str),
|
|
( { Y = 1 } ->
|
|
io__write_string(Str),
|
|
io__write_string("quux\n")
|
|
;
|
|
{ error("qux") }
|
|
),
|
|
io__write_string("bar\n"),
|
|
{ X = 1, Str = "foo\n"
|
|
; X = 2, Str = "baz\n"
|
|
}.
|
|
|
|
:- pred q(int::(free >> bound(1 ; 2))) is det.
|
|
|
|
q(1).
|
|
|
|
:- pred r(int::(free >> bound(1 ; 2))) is det.
|
|
|
|
r(1).
|