[mercury-users] Tuple type class instances

Fergus Henderson fjh at cs.mu.OZ.AU
Thu Jun 21 11:21:02 AEST 2001


On 20-Jun-2001, Michael Day <mikeday at corplink.com.au> wrote:
> 
> Is it or will it ever be possible to declare a type class instance that
> applies to all tuples?

This was discussed in detail on the mercury-developers list a while back,
when we were discussing the proposal to add support for tuples.
I suggest you check the mailing list archives.

> I seem to recall this syntax...
> 
> :- instance something({A | B}) ...
> 
> where A is the first element of the tuple and B is the n-1 size remaining
> tuple.

That syntax was suggested in the discussion referred to above,
but it was not included in the support for tuples in the current
Mercury compiler.

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
The University of Melbourne         |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
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