[m-dev.] dummy types with user-defined equality/comparison
Ralph Becket
rafe at cs.mu.OZ.AU
Tue May 30 09:54:58 AEST 2006
Julien Fischer, Monday, 29 May 2006:
>
> Currently the compiler will abort when confronted with a dummy type that has
> user-defined equality or comparison. Below are two proposals for fixing
> this. Which do people prefer?
>
> (1) Change the reference manual to say that discriminated union types
> whose body consists of a single zero-arity constructor may not have
> user-defined equality or comparison defined upon them. (Plus change
> the compiler to emit the appropriate error mesages.)
>
> (2) Change the compiler so that it does not treat discriminated union types
> whose body consists of a single zero-arity constructor as dummy types.
I'd argue for (1): dummy-types is a useful optimization and this
situation is so rare that I can't see the restriction affecting anyone.
--------------------------------------------------------------------------
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