mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-25 14:24:11 +00:00
Estimated hours taken: 0.5 Branches: main Fix debugger test cases that have been failing due to the recent changes to std_util. tests/debugger/declarative/args.m: Disambiguate a call to semidet_fail. tests/debugger/declarative/condition_bug.m: Update the expected output as the line numbers in term_to_xml have changed. tests/debugger/declarative/lpe_example.m: Import solutions rather than std_util. Calling the (obsolete) version of solutions/2 in std_util results in different event numbers now. tests/debugger/declarative/typed_unify.m: Update the expected output as the line numbers in std_util have changed.
37 lines
459 B
Mathematica
37 lines
459 B
Mathematica
:- module lpe_example.
|
|
:- interface.
|
|
:- import_module io.
|
|
:- pred main(io__state::di, io__state::uo) is det.
|
|
:- implementation.
|
|
:- import_module solutions, int.
|
|
|
|
main -->
|
|
{ solutions(p(1), Ss) },
|
|
io__write(Ss),
|
|
io__nl.
|
|
|
|
|
|
:- pred p(int, int).
|
|
:- mode p(in, out) is nondet.
|
|
|
|
p(0, 0).
|
|
p(1, X) :-
|
|
q(A),
|
|
(
|
|
r(A, X)
|
|
;
|
|
X = A
|
|
).
|
|
|
|
:- pred q(int).
|
|
:- mode q(out) is det.
|
|
|
|
q(3).
|
|
|
|
:- pred r(int, int).
|
|
:- mode r(in, out) is multi.
|
|
|
|
r(X, X + 10).
|
|
r(X, X + 20).
|
|
|