[mercury-users] determinism of /
Stefan Karrmann
sk at mathematik.uni-ulm.de
Fri Jun 1 18:15:34 AEST 2001
Why is has division the mode det in the module int?
div(5,0) cannot succeed.
Okay, this is erroneous, but can't this be described
more explicitly?
Is it possible to define an instance, like this:
:- inst nonZero == bound (X), X /= 0.
:- inst isZero == bound (X), X = 0.
:- mode nonZero == nonZero >> nonZero.
:- mode isZero == isZero >> isZero.
:- mode div (in, nonZero) = out is det.
:- mode div (in, isZero) = out is failure.
--
Stefan Karrmann
--------------------------------------------------------------------------
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