[mercury-users] Existential type constraints

Peter Hawkins peter at hawkins.emu.id.au
Fri Jul 29 09:33:28 AEST 2005


Hi...

Why is this legal mercury?

:- typeclass c(T).
:- pred foo(T::in) => (c(T)).

Shouldn't it be illegal to add an existential type class constraint on 
an non-existentially typed variable?

(I just spent an enjoyable 15 minutes tracking down a missing 'some [T]' 
on a predicate declaration, and I wasn't helped by a misleading error 
message).

Thanks,
Peter
--------------------------------------------------------------------------
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