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
Atom Int | |
forall b. FunAtom Int (Atom b) (b -> a) (b -> a -> b) | |
forall b c. FunAtom2 Int (Atom b) (Atom c) ((b, c) -> a) ((b, c) -> a -> (b, c)) |
newtype AtomStoreT m a Source #
The storage monad
Instances
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.
Instances
ChCounter m => ChAtoms (AtomStoreT m) Source # | |
Defined in Data.Chatty.Atoms newAtom :: AtomStoreT m (Atom v) Source # funAtom :: Atom b -> (b -> a) -> (b -> a -> b) -> AtomStoreT m (Atom a) Source # funAtom2 :: Atom b -> Atom c -> ((b, c) -> a) -> ((b, c) -> a -> (b, c)) -> AtomStoreT m (Atom a) Source # putAtom :: Atom v -> v -> AtomStoreT m () Source # getAtom :: Atom v -> AtomStoreT m v Source # dispAtom :: Atom v -> AtomStoreT m () Source # |
newtype Redundant m a b Source #
Arrow type operating on atoms. Works by cloning the educt, then overwriting the clone. You shouldn't use this inside long-term environments, as massive usage blows up the memory.
Redundant | |
|