[m-dev.] user-defined equality on equivalence types

Zoltan Somogyi zs at cs.mu.OZ.AU
Thu Mar 2 14:08:06 AEDT 2000


At the moment, we allow user-defined equality only on discriminated union
types, but not on equivalence types. This is a pain in defining ADTs such
as sets as unsorted lists, since it requires you to wrap a functor around
the list, even though there is no runtime efficiency penalty for using a
notag type versus an equivalence type.

The reason for that restriction was that equivalence types were unfolded
early. After Rob's proposed change, that reason will no longer apply, and
I think we should then lift that restriction. The rtti changes required
will be fairly trivial.

Comments?

Zoltan.
--------------------------------------------------------------------------
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