[mercury-users] random quantification suggestion

Michael Day mikeday at bigpond.net.au
Tue Jun 4 17:27:44 AEST 2002


> > :- pred foo(T) for some [T] => store(T).
> 
> Ugh.  Here you have the scoping construct not at the start or at the end,
> but in the middle, which is horrible, IMHO.

Heh good point!

I read it in my head rather like "foo returning T for some T that
satisfies store"; but that's fairly nasty.

:- pred foo(T) => store(T) for some [T].

More consistent with the examples I gave earlier, in that the
quantification is tacked on at the end. And yes, it doesn't fit with what
we have, and it sucks for the reasons that you gave. Nonetheless, every
time I use existential quantification it nags at me...

:- some [T] ...

This far into the declaration and I can't even see what it's talking about
yet! Maybe what I need is support for the "exists" unicode character? Or
to be forced to write "all [T]" in front of every other predicate, to
bring balance to the force.

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