servant-server-0.16.2: A family of combinators for defining webservices APIs and serving them
Servant.Server.Internal.Handler
newtype Handler a Source #
Constructors
Fields
Defined in Servant.Server.Internal.Handler
Methods
(>>=) :: Handler a -> (a -> Handler b) -> Handler b #
(>>) :: Handler a -> Handler b -> Handler b #
return :: a -> Handler a #
fail :: String -> Handler a #
fmap :: (a -> b) -> Handler a -> Handler b #
(<$) :: a -> Handler b -> Handler a #
pure :: a -> Handler a #
(<*>) :: Handler (a -> b) -> Handler a -> Handler b #
liftA2 :: (a -> b -> c) -> Handler a -> Handler b -> Handler c #
(*>) :: Handler a -> Handler b -> Handler b #
(<*) :: Handler a -> Handler b -> Handler a #
liftIO :: IO a -> Handler a #
throwM :: Exception e => e -> Handler a #
catch :: Exception e => Handler a -> (e -> Handler a) -> Handler a #
mask :: ((forall a. Handler a -> Handler a) -> Handler b) -> Handler b #
uninterruptibleMask :: ((forall a. Handler a -> Handler a) -> Handler b) -> Handler b #
generalBracket :: Handler a -> (a -> ExitCase b -> Handler c) -> (a -> Handler b) -> Handler (b, c) #
liftBase :: IO α -> Handler α #
Associated Types
type StM Handler a :: Type #
liftBaseWith :: (RunInBase Handler IO -> IO a) -> Handler a #
restoreM :: StM Handler a -> Handler a #
throwError :: ServerError -> Handler a #
catchError :: Handler a -> (ServerError -> Handler a) -> Handler a #
type Rep (Handler a) :: Type -> Type #
from :: Handler a -> Rep (Handler a) x #
to :: Rep (Handler a) x -> Handler a #
runHandler :: Handler a -> IO (Either ServerError a) Source #