[mercury-users] "some" and existential types

Michael Day mikeday at corplink.com.au
Fri Oct 1 19:44:42 AEST 1999


Hi,

when declaring a predicate that outputs an instance of a particular
typeclass as follows:

:- some [T] pred get_object(T) => object(T).

why is the "some [T]" necessary? I would have thought that the typeclass
constraint would be sufficient in this case; what role does the "some"
fill?

Thank you,

Michael

--------------------------------------------------------------------------
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