Servant.Server.Internal.Handler
newtype Handler a Source #
Constructors
Fields
Defined in Servant.Server.Internal.Handler
Methods
fail :: String -> Handler a #
liftIO :: IO a -> 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 #
fmap :: (a -> b) -> Handler a -> Handler b #
(<$) :: a -> Handler b -> Handler a #
(>>=) :: Handler a -> (a -> Handler b) -> Handler b #
(>>) :: Handler a -> Handler b -> Handler b #
return :: a -> Handler a #
catch :: (HasCallStack, Exception e) => Handler a -> (e -> Handler a) -> Handler a #
mask :: HasCallStack => ((forall a. Handler a -> Handler a) -> Handler b) -> Handler b #
uninterruptibleMask :: HasCallStack => ((forall a. Handler a -> Handler a) -> Handler b) -> Handler b #
generalBracket :: HasCallStack => Handler a -> (a -> ExitCase b -> Handler c) -> (a -> Handler b) -> Handler (b, c) #
throwM :: (HasCallStack, Exception e) => e -> Handler a #
Associated Types
type StM Handler a Source #
liftBaseWith :: (RunInBase Handler IO -> IO a) -> Handler a Source #
restoreM :: StM Handler a -> Handler a Source #
throwError :: ServerError -> Handler a #
catchError :: Handler a -> (ServerError -> Handler a) -> Handler a #
liftBase :: IO α -> Handler α Source #
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 #