[mercury-users] mode decls are promises? What are promise decls?

Julien Fischer juliensf at csse.unimelb.edu.au
Mon Feb 12 14:03:18 AEDT 2007


On Sun, 11 Feb 2007 doug.auclair at logicaltypes.com wrote:

> P.S. A side issue is that I'm unclear as to what the 'promise' declaration
> does -- it seems to be a declaration that is skipped in the refman.

No, it's deliberately commented out in the reference manual.  (See the
reference manual sources).

> I
> see it in e.g. the list module and see it's descriptive (to the user)
> declarative value ... is it, at the same time, telling the compiler something,
> so that code that it may declare as erroneous it instead compiles on the
> grace of the promise?  What does ':- promise <foo>.' do? and where do
> I find its precise definition and usage?

The promise declarations are (currently) use by accumulator introduction
pass (which is itself apparently broken at the moment, but that's another
story ...).  They are described in the papers:

 	Making Mercury programs tail recursive by Peter Ross,
 	David Overton and Zoltan Somogyi.

and
 	State update transformation by Peter and Zoltan

both of which are on our papers page.

(Note: the version of lco in these papers is not the one currently 
implemented in the compiler.)

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