mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-17 18:33:58 +00:00
28 lines
532 B
Mathematica
28 lines
532 B
Mathematica
%---------------------------------------------------------------------------%
|
|
% vim: ts=4 sw=4 et ft=mercury
|
|
%---------------------------------------------------------------------------%
|
|
|
|
:- module failure_unify.
|
|
|
|
:- interface.
|
|
|
|
:- import_module io.
|
|
|
|
:- pred main(io::di, io::uo) is det.
|
|
|
|
:- implementation.
|
|
|
|
:- type f
|
|
---> f(int).
|
|
|
|
main(!IO) :-
|
|
( if
|
|
X = f(1),
|
|
Y = f(2),
|
|
X = Y
|
|
then
|
|
io.write_string("test failed\n", !IO)
|
|
else
|
|
io.write_string("test succeeded\n", !IO)
|
|
).
|