WAGS.Control.MemoizedState
- Package
- purescript-wags
- Repository
- mikesol/purescript-wags
#MemoizedStateT Source
newtype MemoizedStateT (proof :: Type) s m aMemoizedStateT combines the StateT monad and the Env comonad. It is similar to StateT s (m (Env a)). It is useful when a state combines elements that are known and unknown. The proof term allows producers to lock an initial state in place.
Constructors
MemoizedStateT (Tuple (First s) (StateT s m a))
Instances
(Monad m) => Functor (MemoizedStateT proof s m)(Monad m) => Apply (MemoizedStateT proof s m)(Monad m) => Applicative (MemoizedStateT proof s m)(Monad m) => Bind (MemoizedStateT proof s m)(Monad m) => Monad (MemoizedStateT proof s m)(Monad m) => MonadState s (MemoizedStateT proof s m)MonadTrans (MemoizedStateT proof s)
#MemoizedState Source
type MemoizedState (proof :: Type) s a = MemoizedStateT proof s Identity a#runMemoizedStateT' Source
runMemoizedStateT' :: forall proof s m a. Monad m => MemoizedStateT proof s m a -> proof -> (s -> s) -> s -> m (Tuple a s)Run a MemoizedStateT'. The proof term should be the same one used to create the initial MemoizedStateT. s -> s is a transformer of the initial state provided when makeMemoizedStateT was called. The s value is discarded unless no initial state was provided via a proof term.
#runMemoizedState' Source
runMemoizedState' :: forall proof s a. MemoizedState proof s a -> proof -> (s -> s) -> s -> Tuple a srunMemoizedStateT' for the Identity monad.
#runMemoizedStateT Source
runMemoizedStateT :: forall proof s m a. Monad m => MemoizedStateT proof s m a -> proof -> s -> m (Tuple a s)runMemoizedStateT' without a transformer for the initial state.
#runMemoizedState Source
runMemoizedState :: forall proof s a. MemoizedState proof s a -> proof -> s -> Tuple a srunMemoizedStateT' without a transformer for the initial state & for the Identity monad.
#makeMemoizedStateT Source
makeMemoizedStateT :: forall proof s m a. Monad m => proof -> s -> a -> MemoizedStateT proof s m aGiven proof, create a MemoizedStateT with an initial state.
#makeMemoizedState Source
makeMemoizedState :: forall proof s a. proof -> s -> a -> MemoizedState proof s aGiven proof, create a MemoizedState with an initial state.
- Modules
- FRP.
Event. MIDI - WAGS.
Change - WAGS.
Connect - WAGS.
Control. Functions - WAGS.
Control. MemoizedState - WAGS.
Control. Qualified - WAGS.
Control. Thunkable - WAGS.
Control. Types - WAGS.
Create - WAGS.
Cursor - WAGS.
Debug - WAGS.
Destroy - WAGS.
Disconnect - WAGS.
Graph. Constructors - WAGS.
Graph. Decorators - WAGS.
Graph. Getter - WAGS.
Graph. Optionals - WAGS.
Graph. Parameter - WAGS.
Interpret - WAGS.
Move - WAGS.
MoveNode - WAGS.
Rebase - WAGS.
Rendered - WAGS.
Run - WAGS.
Universe. AudioUnit - WAGS.
Universe. Bin - WAGS.
Universe. BinN - WAGS.
Universe. EdgeProfile - WAGS.
Universe. Graph - WAGS.
Universe. Node - WAGS.
Universe. Skolems - WAGS.
Universe. Universe - WAGS.
Util - WAGS.
Validation