[mercury-users] Event handling in mercury
Fergus Henderson
fjh at cs.mu.OZ.AU
Mon Jul 23 22:22:03 AEST 2001
On 17-Jul-2001, Ralph Becket <rbeck at microsoft.com> wrote:
> I think Fergus idea of adding a `:- global' directive to the language is
> a good one (I assume access to globals could only occur in contexts
> where the io__state is available?)
Yes.
My idea was that the values stored in globals would only be accessible
via io_store__get_mutvar, which requires an io__state pair:
:- pred io_store__get_mutvar(mutvar(T, io_store), T, io__state, io__state).
:- mode io_store__get_mutvar(in, out, di, uo) is det.
If we use a type class based approach, as Holger Krug has proposed, then the
details would be different, but your assumption would remain correct.
--
Fergus Henderson <fjh at cs.mu.oz.au> | "I have always known that the pursuit
The University of Melbourne | of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh> | -- the last words of T. S. Garp.
--------------------------------------------------------------------------
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