This module defines the "MRef" abstraction, which is a set of
type-classes for things that behave like
See the documentation there for more info.
This interface may be subject to future expansion. Presently, rather
than providing something like
instances for "
Data.StateRef.Types.ReadRef sr m (
Maybe a)" are
Data.StateRef.Types.readReference the same type
tryTakeMRef would have if it existed. There is currently nothing like
Control.Concurrent.MVar.tryPutMVar, though. Perhaps there should be.
Or, perhaps this is the sort of thing the weird (to me) signature of
Data.IORef.atomicModifyIORef is for, and an argument for a similar
Data.StateRef.Types.modifyStateRef or the addition of
a new atomicModifyStateRef function.
I would like to resolve these questions in version 0.3 of this package.