[mercury-users] higher order modes

Michael Day mcda at students.cs.mu.oz.au
Sun Sep 10 22:32:59 AEDT 2000


If I try to return a det predicate where a semidet one is expected I get a
nasty and rather unobvious mode error. This can be avoided by promoting
(or demoting?) the predicate explicitly with a lambda expression:

	SemiThing = (pred(...) :- DetThing)

Is there any reason the compiler can't do this by itself?

Michael

--------------------------------------------------------------------------
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