[mercury-users] "some" and existential types

Michael Day mikeday at corplink.com.au
Fri Oct 1 22:56:07 AEST 1999


<huge snip of informative post>

hmm that makes sense, but I don't quite understand, why the some is
necessary at all. It seems that these two declarations are symmetrical:

:- pred take_object(T) <= object(T).
:- mode take_object(in).

:- pred give_object(T) => object(T).
:- mode give_object(out).

In fact now that I look at it, why even are two different arrows <= and =>
required? They do not seem to convey any information that the compiler
does not already have, if they are used purely to distinguish input and
output arguments.

Is this syntax set in stone, or is it still under development with the
rest of the existential types implementation? Apologies if I'm missing
something obvious, I can't claim to be hugely familiar with the type
system of Mercury yet.

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