HORIZON HASKELLDocslts/ghc-10.0.xfc4e5982026-10-11Search names, modules, packages, or :: a typeCtrl K

GHC 10.0.0.20260917 · lts/ghc-10.0.x · fc4e598 · 2026-10-11

Moduleyesod-test-1.7.0.3Haskell2010

Yesod.Test.Internal.SIO

The SIO type is used by Yesod.Test to provide exception-safe environment between requests and assertions.

This module is internal. Breaking changes to this module will not be reflected in the major version of this package.

  • 1 type
  • 6 values
newtypenewtype SIO s a
#

State + IO

Constructors

Instances10MonadState, Monad, Functor, MonadFail, Applicative, MonadIO, …
valuegetSIO :: SIO s s
#

Retrieve the current state in the SIO type.

Equivalent to get

valueputSIO :: s -> SIO s ()
#

Put the given s into the SIO state for later retrieval.

Equivalent to put, but the value is evaluated to weak head normal form.

valuemodifySIO :: (s -> s) -> SIO s ()
#

Modify the underlying s state.

This is strict in the function used, and is equivalent to modify'.

valueevalSIO :: SIO s a -> s -> IO a
#

Run an SIO action with the intial state s provided, returning the result, and discard the final state.

valueexecSIO :: SIO s () -> s -> IO s
#

Run an SIO action with the initial state s provided, returning the final state, and discarding the result.

valuerunSIO :: SIO s a -> s -> IO (s, a)
#

Run an SIO action with the initial state provided, returning both the result of the computation as well as the final state.