mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-18 19:03:45 +00:00
29 lines
539 B
Mathematica
29 lines
539 B
Mathematica
%---------------------------------------------------------------------------%
|
|
% vim: ts=4 sw=4 et ft=mercury
|
|
%---------------------------------------------------------------------------%
|
|
|
|
:- module impossible_unify.
|
|
:- interface.
|
|
|
|
:- import_module io.
|
|
|
|
:- pred main(io::di, io::uo) is det.
|
|
|
|
:- implementation.
|
|
:- import_module bool.
|
|
|
|
main(!IO) :-
|
|
not bar(42),
|
|
print("ok", !IO),
|
|
nl(!IO).
|
|
|
|
:- pred bar(int::in) is failure.
|
|
|
|
bar(X) :-
|
|
foo(X, yes).
|
|
|
|
:- pred foo(int, bool).
|
|
:- mode foo(in, out(bound(no))) is det.
|
|
|
|
foo(_, no).
|