[mercury-users] Inaccuracy in language definition ?

Holger Krug hkrug at rationalizer.com
Mon Jul 16 16:43:18 AEST 2001


"The Mercury Language Reference Manual", sec. 10.2, Instance declarations,
states:

"The types in an instance declaration must not be abstract types which
are elsewhere defined as equivalence types. ... These restrictions
ensure, that there are no overlapping instance declarations, i.e. for
each typeclass there is at most one instance declaration that may be
applied to any type (or sequence of types)."

I cannot imagine why the restriction cite should be necessary and how it
might be implemented.

In the case of abstract types, the compiler cannot check, how the type
is defined. Even more, it seems not necessary for the compiler to
recognize, how an abstract type might be defined, because for the
compiler the abstract type and the other type, it might be defined to
be equivalent with, are not interchangeable.

-- 
Holger Krug
hkrug at rationalizer.com
--------------------------------------------------------------------------
mercury-users mailing list
post:  mercury-users at cs.mu.oz.au
administrative address: owner-mercury-users at cs.mu.oz.au
unsubscribe: Address: mercury-users-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-users-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the users mailing list