[mercury-users] Can this be done better?

Julien Fischer juliensf at csse.unimelb.edu.au
Tue Jan 31 01:12:18 AEDT 2012


On Mon, 30 Jan 2012, Michael Richter wrote:

> *Issue #2*
>
> In looking through the Library Reference, I keep seeing the :-
> promisestatement used.  For example:
>
> :- promise all [A, B, C, ABC]
>    (
>        ( some [AB] (list.append(A, B, AB), list.append(AB, C, ABC)) )
>    <=>
>        ( some [BC] (list.append(B, C, BC), list.append(A, BC, ABC)) )
>    ).
>
> The language reference only mentions this (and other declarations) in
> passing<http://www.mercury.csse.unimelb.edu.au/information/doc-release/mercury_ref/Declarations.html#Declarations>,
> however, and then never talks about them again.  Specifically section 2.6
> says that :- promise should be documented in the Modules
> section<http://www.mercury.csse.unimelb.edu.au/information/doc-release/mercury_ref/Modules.html#Modules>,
> but I can't find that there.

Section 2.6 is wrong, they are not supposed to be documented in the
Modules section.   Were the documentation for them to be uncommented
(which is why it doesn't show up at the moment), it would be in a
separate section.  As it is, they are a relatively incomplete feature.
(I suspect :- promise is listed there, just so that people are aware
that is a declaration name.)

> So how do I decode such :- promise declarations, and where, if anywhere,
> are they documented?

They are described in the "State update transformation" paper.
<http://www.mercury.csse.unimelb.edu.au/information/papers.html#update>

Julien.
--------------------------------------------------------------------------
mercury-users mailing list
Post messages to:       mercury-users at csse.unimelb.edu.au
Administrative Queries: owner-mercury-users at csse.unimelb.edu.au
Subscriptions:          mercury-users-request at csse.unimelb.edu.au
--------------------------------------------------------------------------



More information about the users mailing list