Files
mercury/tests/valid/tricky_ite.m
Zoltan Somogyi c03b11ca48 Update the style of more test cases.
And updated expected outputs for changed line numbers.
2021-07-27 19:29:21 +10:00

28 lines
562 B
Mathematica

%---------------------------------------------------------------------------%
% vim: ts=4 sw=4 et ft=mercury
%---------------------------------------------------------------------------%
:- module tricky_ite.
:- interface.
:- import_module io.
:- pred main(io::di, io::uo) is det.
:- implementation.
:- import_module int.
:- import_module require.
main(!IO) :-
( if p(42, X) then
error("blah"),
io.write(X, !IO)
else
io.write_string("No.\n", !IO)
).
:- pred p(int::in, int::out) is nondet.
p(42, 1).
p(42, 2).
p(42, 3).