[m-dev.] Foreign type compare and unification

Michael Day mikeday at bigpond.net.au
Wed May 22 13:42:48 AEST 2002


> enough.  So if someone else declares string to be in the comparable
> class using ordinary comparison, I could define
> case_insensitive_string to be an alias for string, but I could declare
> it to be an instance of comparable using case insensitive comparison.

This sounds rather like a proposal I made last year in which the user
could specify which instance declaration to use for a given variable, for
much the same reasons. However this has much trickier and harder to define
semantics than the existing typeclass system and only helps for this case.

Perhaps your proposal involving equivalence types would depend somewhat on
whether they were private or publically exported?

Michael

--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions:          mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------



More information about the developers mailing list