Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- newtype DelayedIO a = DelayedIO {
- runDelayedIO' :: ReaderT Request (ResourceT (RouteResultT IO)) a
- liftRouteResult :: RouteResult a -> DelayedIO a
- runDelayedIO :: DelayedIO a -> Request -> ResourceT IO (RouteResult a)
- delayedFail :: ServerError -> DelayedIO a
- delayedFailFatal :: ServerError -> DelayedIO a
- withRequest :: (Request -> DelayedIO a) -> DelayedIO a
Documentation
Computations used in a Delayed
can depend on the
incoming Request
, may perform IO
, and result in a
RouteResult
, meaning they can either suceed, fail
(with the possibility to recover), or fail fatally.
DelayedIO | |
|
Instances
Monad DelayedIO Source # | |
Functor DelayedIO Source # | |
Applicative DelayedIO Source # | |
Defined in Servant.Server.Internal.DelayedIO | |
MonadIO DelayedIO Source # | |
Defined in Servant.Server.Internal.DelayedIO | |
MonadThrow DelayedIO Source # | |
Defined in Servant.Server.Internal.DelayedIO | |
MonadResource DelayedIO Source # | |
Defined in Servant.Server.Internal.DelayedIO liftResourceT :: ResourceT IO a -> DelayedIO a # | |
MonadBase IO DelayedIO Source # | |
Defined in Servant.Server.Internal.DelayedIO | |
MonadBaseControl IO DelayedIO Source # | |
MonadReader Request DelayedIO Source # | |
type StM DelayedIO a Source # | |
Defined in Servant.Server.Internal.DelayedIO |
liftRouteResult :: RouteResult a -> DelayedIO a Source #
runDelayedIO :: DelayedIO a -> Request -> ResourceT IO (RouteResult a) Source #
delayedFail :: ServerError -> DelayedIO a Source #
Fail with the option to recover.
delayedFailFatal :: ServerError -> DelayedIO a Source #
Fail fatally, i.e., without any option to recover.