Safe Haskell | Trustworthy |
---|---|
Language | Haskell2010 |
Provides a variable-storing monad and functions for access. Not recommended. Use IORef, STRef or the like. Really.
Documentation
Phantom type for atom IDs
newtype AtomStoreT m a Source #
The storage monad
MonadTrans AtomStoreT Source # | |
Monad m => Monad (AtomStoreT m) Source # | |
Functor m => Functor (AtomStoreT m) Source # | |
(Functor m, Monad m) => Applicative (AtomStoreT m) Source # | |
MonadIO m => MonadIO (AtomStoreT m) Source # | |
ChCounter m => ChCounter (AtomStoreT m) Source # | |
ChCounter m => ChAtoms (AtomStoreT m) Source # | |
class ChCounter m => ChAtoms m where Source #
Typeclass for all atom-storing monads.
newAtom :: m (Atom v) Source #
Reserve a new atom.
funAtom :: Atom b -> (b -> a) -> (b -> a -> b) -> m (Atom a) Source #
Construct a new functional atom.
funAtom2 :: Atom b -> Atom c -> ((b, c) -> a) -> ((b, c) -> a -> (b, c)) -> m (Atom a) Source #
Construct a new doubly-source functional atom
putAtom :: Atom v -> v -> m () Source #
Save a value for the given atom.
getAtom :: Atom v -> m v Source #
Get the value from a given atom.
dispAtom :: Atom v -> m () Source #
Dispose the given atom.
cloneAtom :: Atom v -> m (Atom v) Source #
Clone the given atom.
ChCounter m => ChAtoms (AtomStoreT m) Source # | |