mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-28 15:54:18 +00:00
Author: dougl Estimated hours taken: 25 (mostly hand checking the test results) Fix a bug in the front end which was causing some questions to be missed. Reorganize the expected test results, as suggested after the last commit. browser/declarative_debugger.m: Fix a bug in missing answer children/4. tests/debugger/declarative/Mmakefile: tests/debugger/declarative/aadebug.m: tests/debugger/declarative/aadebug.inp: tests/debugger/declarative/aadebug.exp: New test case. tests/debugger/declarative/family.m: tests/debugger/declarative/higher_order.m: tests/debugger/declarative/ite_2.m: tests/debugger/declarative/solutions.m: New test cases for unimplemented features. These tests are not yet enabled. tests/debugger/declarative/*.exp: tests/debugger/declarative/*.exp2: Swap the .exp files for the .exp2 files. This is to be consistent with the other test directories, where the .exp files contain normal output and the .exp2 files contain output in debug grades. tests/debugger/declarative/*.inp: tests/debugger/declarative/*.exp: tests/debugger/declarative/*.exp2: Use `register --quiet' to make the output of the test cases more predictable. tests/debugger/declarative/gcf.exp2: tests/debugger/declarative/neg_conj.exp2: tests/debugger/declarative/negation.exp2: tests/debugger/declarative/oracle_db.exp2: tests/debugger/declarative/queens.exp2: tests/debugger/declarative/small.exp2: Remove these expected results, since using `register --quiet' makes them the same as the .exp versions.
27 lines
385 B
Mathematica
27 lines
385 B
Mathematica
:- module solutions.
|
|
:- interface.
|
|
:- import_module io.
|
|
:- pred main(io__state::di, io__state::uo) is det.
|
|
:- implementation.
|
|
:- import_module std_util, list.
|
|
|
|
main -->
|
|
{ p(1, Ss) },
|
|
io__write(Ss),
|
|
io__nl.
|
|
|
|
:- pred p(int::in, list(int)::out) is det.
|
|
|
|
p(N, Ss) :-
|
|
solutions(q(N), Ss).
|
|
|
|
:- pred q(int::in, int::out) is nondet.
|
|
|
|
q(0, 0).
|
|
q(1, 1).
|
|
q(1, 2).
|
|
q(1, 3).
|
|
q(2, 2).
|
|
q(2, 4).
|
|
|