servant-server-0.17: A family of combinators for defining webservices APIs and serving them

Safe HaskellNone
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 suceed, fail (with the possibility to recover), or fail fatally.

Instances
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 #

fail :: String -> 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 #

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 #

MonadIO DelayedIO Source # 
Instance details

Defined in Servant.Server.Internal.DelayedIO

Methods

liftIO :: IO 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

MonadBase IO DelayedIO Source # 
Instance details

Defined in Servant.Server.Internal.DelayedIO

Methods

liftBase :: IO α -> DelayedIO α #

MonadBaseControl IO DelayedIO Source # 
Instance details

Defined in Servant.Server.Internal.DelayedIO

Associated Types

type StM DelayedIO a :: Type #

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 #

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.