[m-dev.] trace goal `state' parameters

Ralph Becket rafe at csse.unimelb.edu.au
Fri Mar 16 09:46:41 AEDT 2007


Julien Fischer, Friday, 16 March 2007:
> 
> In fact state parameters aren't really as useful as they might seem since
> they are implicitly subject to the same visibility restrictions that
> mutables are.  For mutables these restrictions are what we want** but it
> doesn't really make sense for state parameters.  The logging example in the
> reference manual is a case in point; I would like to be able to refer to the
> logging level in many modules - it is truly global, however mutables are
> (intentionally) module local.  Currently the only way to "export" a mutable
> it to manually introduce access predicates for it in the interface of a
> module.  (This won't work with trace goals since the transformation that
> handles state parameters knows nothing of the manually introduced
> predicates.)

I've always assumed the IO state was the natural place to put global
mutable data.
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at csse.unimelb.edu.au
Administrative Queries: owner-mercury-developers at csse.unimelb.edu.au
Subscriptions:          mercury-developers-request at csse.unimelb.edu.au
--------------------------------------------------------------------------



More information about the developers mailing list