[mercury-users] discriminated union question

Ralph Becket rbeck at microsoft.com
Thu Apr 12 18:58:50 AEST 2001


> From: Richard A. O'Keefe [mailto:ok at atlas.otago.ac.nz]
> Sent: 12 April 2001 01:11
> 
> 	:- type pair(T1, T2)
> 	        --->    T1 - T2.
> 
> 	What is the "-" sign doing here? What does it mean? It doesn't
mean subtraction does it?
> [...]
> 
> (-)/2 has been the standard pairing operator in Prolog ever since
> keysort/2 was added to DEC-10 Prolog >18 years ago.

I've been meaning to change the definition for pair to use {}/2 tuples
and replace -/2 over pairs with a function with the appropriate set of
modes.  pair/2 does crop up in several places in the library, but I'd
encourage people to move to the new tuple types where possible.

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