[m-rev.] Add `:- mutable' declaration to the language.
Ian MacLarty
maclarty at cs.mu.OZ.AU
Thu Sep 1 14:29:37 AEST 2005
On Thu, 1 Sep 2005, Ralph Becket wrote:
> Estimated hours taken: 24
> Branches: main
>
> Add `:- mutable' directives to the language, providing modules with private
> mutable variables. A directives
>
> :- mutable(x, int, 0, ground, [thread_safe]).
>
> leads to the compiler generating the following:
>
> :- semipure pred get_x(int::out(ground)) is det.
> :- impure pred set_x(int::in(ground)) is det.
> :- pred initialise_mutable_x(io::di, io::uo) is det.
Can we have pure versions of get_x and set_x which take the I/O state?
Ian.
--------------------------------------------------------------------------
mercury-reviews mailing list
post: mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------
More information about the reviews
mailing list