[m-dev.] dummy types with user-defined equality/comparison

Julien Fischer juliensf at cs.mu.OZ.AU
Mon May 29 17:09:09 AEST 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.

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