Safe Haskell | Safe-Inferred |
---|---|
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 succeed, fail
(with the possibility to recover), or fail fatally.
DelayedIO | |
|
Instances
MonadIO DelayedIO Source # | |
Defined in Servant.Server.Internal.DelayedIO | |
Applicative DelayedIO Source # | |
Defined in Servant.Server.Internal.DelayedIO | |
Functor DelayedIO Source # | |
Monad DelayedIO Source # | |
MonadThrow DelayedIO Source # | |
Defined in Servant.Server.Internal.DelayedIO throwM :: (HasCallStack, Exception e) => e -> DelayedIO a # | |
MonadResource DelayedIO Source # | |
Defined in Servant.Server.Internal.DelayedIO liftResourceT :: ResourceT IO a -> DelayedIO a # | |
MonadBaseControl IO DelayedIO Source # | |
MonadReader Request DelayedIO Source # | |
MonadBase IO DelayedIO Source # | |
Defined in Servant.Server.Internal.DelayedIO | |
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.