[m-dev.] dummy types and user defined equality

Julien Fischer juliensf at cs.mu.OZ.AU
Mon Mar 6 17:01:38 AEDT 2006


On Mon, 6 Mar 2006, Zoltan Somogyi wrote:

> On 06-Mar-2006, Julien Fischer <juliensf at cs.mu.OZ.AU> wrote:
> > Do we consider dummy types, defined as below to be discriminated unions,
> > or are dummy types not allowed to have user-define equality?
>
> We haven't explicitly considered the issue. However, I am strongly included
> to view that (a) any type that has user-defined equality shouldn't be
> considered by the compiler to have a dummy type; and (b) any user who
> adds user-defined equality to a type with only one value should have
> their head examined.
>

In that case we should get the compiler to emit an error message telling
them to get their head examined :-)

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