[mercury-users] type class bug?
Nicholas Nethercote
njn at csse.unimelb.edu.au
Thu Jun 22 18:44:49 AEST 2006
On Thu, 22 Jun 2006, Mark Brown wrote:
> It's a known limitation in the typeclass system when using equivalence
> types. Unfortunately, Julien's suggestion won't work because of another
> limitation: the arguments of instances must be of the form foo(A, B, ...).
>
> Try defining the above types as:
>
> :- type type_expr ---> raw_type_expr - src_locn.
> :- type expr ---> raw_expr - src_locn.
>
> Or something similar using a better constructor than '-'/2.
Hmm, that's frustrating. I'd rather not have to change my data structures
to workaround compiler shortcomings. How fundamental is the shortcoming --
how hard would it be to implement? I'm just curious.
Nick
--------------------------------------------------------------------------
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