[mercury-users] Type class usage question

peter at hawkins.emu.id.au peter at hawkins.emu.id.au
Mon Apr 5 16:28:25 AEST 2004


Hi...
On Mon, Apr 05, 2004 at 02:11:53PM +1000, Ralph Becket wrote:
> Peter Hawkins, Monday,  5 April 2004:

> The problem with `instance foo(set(int))' is that somewhere else someone
> might declare `instance foo(set(T))' making it impossible for the
> compiler to resolve which foo method calls should be made for set(int).

Arguably that should only be an error if someone actually makes such a
declaration...

What's the recommended workaround? Wrap it in a discriminated union
type?

=)
Peter
--------------------------------------------------------------------------
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