servant-server-0.20: A family of combinators for defining webservices APIs and serving them
Safe HaskellSafe-Inferred
LanguageHaskell2010

Servant.Server.Internal.DelayedIO

Synopsis

Documentation

newtype DelayedIO a Source #

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.

Instances

Instances details
MonadIO DelayedIO Source # 
Instance details

Defined in Servant.Server.Internal.DelayedIO

Methods

liftIO :: IO a -> DelayedIO a #

Applicative DelayedIO Source # 
Instance details

Defined in Servant.Server.Internal.DelayedIO

Methods

pure :: a -> DelayedIO a #

(<*>) :: DelayedIO (a -> b) -> DelayedIO a -> DelayedIO b #

liftA2 :: (a -> b -> c) -> DelayedIO a -> DelayedIO b -> DelayedIO c #

(*>) :: DelayedIO a -> DelayedIO b -> DelayedIO b #

(<*) :: DelayedIO a -> DelayedIO b -> DelayedIO a #

Functor DelayedIO Source # 
Instance details

Defined in Servant.Server.Internal.DelayedIO

Methods

fmap :: (a -> b) -> DelayedIO a -> DelayedIO b #

(<$) :: a -> DelayedIO b -> DelayedIO a #

Monad DelayedIO Source # 
Instance details

Defined in Servant.Server.Internal.DelayedIO

Methods

(>>=) :: DelayedIO a -> (a -> DelayedIO b) -> DelayedIO b #

(>>) :: DelayedIO a -> DelayedIO b -> DelayedIO b #

return :: a -> DelayedIO a #

MonadThrow DelayedIO Source # 
Instance details

Defined in Servant.Server.Internal.DelayedIO

Methods

throwM :: Exception e => e -> DelayedIO a #

MonadResource DelayedIO Source # 
Instance details

Defined in Servant.Server.Internal.DelayedIO

MonadBaseControl IO DelayedIO Source # 
Instance details

Defined in Servant.Server.Internal.DelayedIO

Associated Types

type StM DelayedIO a #

MonadReader Request DelayedIO Source # 
Instance details

Defined in Servant.Server.Internal.DelayedIO

Methods

ask :: DelayedIO Request #

local :: (Request -> Request) -> DelayedIO a -> DelayedIO a #

reader :: (Request -> a) -> DelayedIO a #

MonadBase IO DelayedIO Source # 
Instance details

Defined in Servant.Server.Internal.DelayedIO

Methods

liftBase :: IO α -> DelayedIO α #

type StM DelayedIO a Source # 
Instance details

Defined in Servant.Server.Internal.DelayedIO

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.

withRequest :: (Request -> DelayedIO a) -> DelayedIO a Source #

Gain access to the incoming request.