Hoogle Search
Within LTS Haskell 24.4 (ghc-9.10.2)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
closeInternalState :: MonadIO m => InternalState -> m ()resourcet Control.Monad.Trans.Resource Close an internal state created by createInternalState. Since 0.4.9
createInternalState :: MonadIO m => m InternalStateresourcet Control.Monad.Trans.Resource Create a new internal state. This state must be closed with closeInternalState. It is your responsibility to ensure exception safety. Caveat emptor! Since 0.4.9
getInternalState :: forall (m :: Type -> Type) . Monad m => ResourceT m InternalStateresourcet Control.Monad.Trans.Resource Get the internal state of the current ResourceT. Since 0.4.6
runInternalState :: ResourceT m a -> InternalState -> m aresourcet Control.Monad.Trans.Resource Unwrap a ResourceT using the given InternalState. Since 0.4.6
withInternalState :: (InternalState -> m a) -> ResourceT m aresourcet Control.Monad.Trans.Resource Run an action in the underlying monad, providing it the InternalState. Since 0.4.6
class Monad m =>
MonadState s (m :: Type -> Type) | m -> sadjunctions Control.Monad.Representable.State Minimal definition is either both of get and put or just state
evalState :: forall (g :: Type -> Type) a . Representable g => State g a -> Rep g -> aadjunctions Control.Monad.Representable.State Evaluate a state computation with the given initial state and return the final value, discarding the final state.
-
adjunctions Control.Monad.Representable.State Evaluate a state computation with the given initial state and return the final value, discarding the final state.
evalStateT m s = liftM fst (runStateT m s)
execState :: forall (g :: Type -> Type) a . Representable g => State g a -> Rep g -> Rep gadjunctions Control.Monad.Representable.State Evaluate a state computation with the given initial state and return the final state, discarding the final value.
-
adjunctions Control.Monad.Representable.State Evaluate a state computation with the given initial state and return the final state, discarding the final value.
execStateT m s = liftM snd (runStateT m s)