| Safe Haskell | None |
|---|
Data.Chatty.Atoms
Description
Provides a variable-storing monad and functions for access
Documentation
Phantom type for atom IDs
newtype AtomStoreT m a Source
The storage monad
Instances
| MonadTrans AtomStoreT | |
| Monad m => Monad (AtomStoreT m) | |
| Functor m => Functor (AtomStoreT m) | |
| MonadIO m => MonadIO (AtomStoreT m) | |
| ChCounter m => ChCounter (AtomStoreT m) | |
| (Functor m, ChCounter m) => ChAtoms (AtomStoreT m) |
class ChCounter m => ChAtoms m whereSource
Typeclass for all atom-storing monads.
Methods
newAtom :: Typeable v => m (Atom v)Source
Reserve a new atom.
putAtom :: Typeable v => Atom v -> v -> m ()Source
Save a value for the given atom.
getAtom :: Typeable v => Atom v -> m vSource
Get the value from a given atom.
dispAtom :: Atom v -> m ()Source
Dispose the given atom.
cloneAtom :: Typeable v => Atom v -> m (Atom v)Source
Clone the given atom.
Instances
| (Functor m, ChCounter m) => ChAtoms (AtomStoreT m) |