[m-dev.] cc_multi bug

Ian MacLarty maclarty at cs.mu.OZ.AU
Tue Jan 18 15:44:41 AEDT 2005


When I try to compile the following program I get the error:
cc.m:030: Error: call to predicate `p/1' with determinism `cc_multi' occurs in
cc.m:030:   a context which requires all solutions.

:- module cc.

:- interface.

:- import_module io.

:- pred main(io::di, io::uo) is det.

:- implementation.

:- import_module int.

main(!IO) :-
		q(0, _)
		io.write_string("yes\n", !IO)
		io.write_string("no\n", !IO)

:- pred p(int::out) is cc_multi.


:- pred q(int::in, int::out) is cc_nondet.

q(X, Y) :-
	X > 0.

However if I swap the goals in the conjunction in the body of q/2 around
it compiles fine.

Is this a known issue or should I log a bug?

mercury-developers mailing list
Post messages to:       mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions:          mercury-developers-request at cs.mu.oz.au

More information about the developers mailing list