[mercury-users] boolean expressions from semidet predicates

Nicholas Nethercote njn at csse.unimelb.edu.au
Fri Apr 21 11:02:34 AEST 2006


Hi,

I want to write something like this:

   require((0 < X) and (X < 10))

But I can't work out if it's possible to combine semidet operations in this 
way.  'and' doesn't work, '/\' doesn't work (I'm not even sure what 'and' 
and '/\' are, since the reference manual seems to only list the operators 
without explaining what they do), and ',' doesn't work because you can't 
have a goal inside require/1.

Is this possible, or should I just do this:

   require(0 < X),
   require(X < 10)

Thanks.

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