Hoogle Search
Within LTS Haskell 24.15 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
-
conduino Data.Conduino.Internal Turn a Pipe that runs over StateT into a "state-modifying Pipe", that returns the final state when it terminates. The main usage of this is to "isolate" the state from other pipes in the same chain. For example, of p, q, and r are all pipes under StateT, then:
p .| q .| r
will all share underlying state, and each can modify the state that they all three share. We essentially have global state. However, if you use runStateP, you can all have them use different encapsulated states.void (runStateP s0 p) .| void (runStateP s1 q) .| runStateP s2 r
In this case, each of those three chained pipes will use their own internal states, without sharing. This is also useful if you want to chain a pipe over StateT with pipes that don't use state at all: for example if a and b are "non-stateful" pipes (not over StateT), you can do:a .| void (runStateP s1 q) .| b
And a and b will be none the wiser to the fact that q uses StateT internally. Note to avoid the usage of void, evalStateP might be more useful. -
conduino Data.Conduino.Internal runStateP, but for Control.Monad.Trans.State.Strict.
-
conduino Data.Conduino.Lift Turn a Pipe that runs over StateT into a "state-modifying Pipe", that returns the final state when it terminates. The main usage of this is to "isolate" the state from other pipes in the same chain. For example, of p, q, and r are all pipes under StateT, then:
p .| q .| r
will all share underlying state, and each can modify the state that they all three share. We essentially have global state. However, if you use runStateP, you can all have them use different encapsulated states.void (runStateP s0 p) .| void (runStateP s1 q) .| runStateP s2 r
In this case, each of those three chained pipes will use their own internal states, without sharing. This is also useful if you want to chain a pipe over StateT with pipes that don't use state at all: for example if a and b are "non-stateful" pipes (not over StateT), you can do:a .| void (runStateP s1 q) .| b
And a and b will be none the wiser to the fact that q uses StateT internally. Note to avoid the usage of void, evalStateP might be more useful. -
conduino Data.Conduino.Lift runStateP, but for Control.Monad.Trans.State.Strict.
-
dunai Control.Monad.Trans.MSF.State Build an MSF that takes a state as an extra input from one on the State monad. This is the opposite of stateS.
-
dunai Control.Monad.Trans.MSF.State Build an MSF function that takes a fixed state as additional input, from an MSF in the State monad, and outputs the new state with every transformation step.
-
dunai Control.Monad.Trans.MSF.State Build an MSF function that takes a fixed state as additional input, from an MSF in the State monad.
runStateT :: StateT s (m :: Type -> Type) a -> s -> m (a, s)dunai Control.Monad.Trans.MSF.State No documentation available.
runStateT :: StateT s (m :: Type -> Type) a -> s -> m (a, s)has-transformers Control.Monad.Trans.Has.State No documentation available.
-
heftia-effects Control.Monad.Hefty.State A naive but somewhat slower version of runState that does not use ad-hoc optimizations.