HORIZON HASKELLDocslts/ghc-10.0.x8fef28d2026-11-02Search packagesCtrl K
Theme: |

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 8fef28d · 2026-11-02

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.

Synopsis
newtypenewtype SIO s a

State + IO

Constructors

Instances10MonadState, Monad, Functor, MonadFail, Applicative, MonadIO, …
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.