[mercury-users] uniqueness

Julien Fischer juliensf at cs.mu.OZ.AU
Tue Jun 13 14:56:18 AEST 2006



On Tue, 13 Jun 2006, Mark Brown wrote:

> > %  (
> > %    in_bounds(B1, X, Y),
> > %    format("(%d, %d) -> %d\n", [i(X), i(Y), i(B1 ^ elem(X, Y))], !IO) %
> > problem 2
> > %  ),

...

> > 2/ The commented out portion is rejected as well. I suspect this is
> > because nondeterministic predicates are not allowed to perform IO, but the
> > error message doesn't state it clearly.
>
> I guess that in_bounds/3 is nondet, and the error message you will get
> would be along the lines of "main/2 is declared det, inferred nondet"
> which pretty much covers the problem in its general form.
>

in_bounds/3 is semidet - it's counterpart bounds/3 is det.

Julien.

--------------------------------------------------------------------------
mercury-users mailing list
post:  mercury-users at cs.mu.oz.au
administrative address: owner-mercury-users at cs.mu.oz.au
unsubscribe: Address: mercury-users-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-users-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the users mailing list