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

Safe Haskell | None
Language | Haskell2010

Servant.Server.Internal.Handler

# Documentation

newtype Handler a #

Constructors

Handler |
Fields runHandler' :: ExceptT ServantErr IO a

Instances

Monad Handler # |
Methods (>>=) :: Handler a -> (a -> Handler b) -> Handler b # (>>) :: Handler a -> Handler b -> Handler b # return :: a -> Handler a # fail :: String -> Handler a #
Functor Handler # |
Methods fmap :: (a -> b) -> Handler a -> Handler b # (<$) :: a -> Handler b -> Handler a #
Applicative Handler # |
Methods pure :: a -> Handler a # (<*>) :: Handler (a -> b) -> Handler a -> Handler b # (*>) :: Handler a -> Handler b -> Handler b # (<*) :: Handler a -> Handler b -> Handler a #
MonadIO Handler # |
Methods liftIO :: IO a -> Handler a #
MonadThrow Handler # |
Methods throwM :: Exception e => e -> Handler a #
MonadCatch Handler # |
Methods catch :: Exception e => Handler a -> (e -> Handler a) -> Handler a #
MonadBase IO Handler # |
Methods liftBase :: IO α -> Handler α #
MonadBaseControl IO Handler # |
Associated Types type StM (Handler :: * -> *) a :: * # Methods liftBaseWith :: (RunInBase Handler IO -> IO a) -> Handler a # restoreM :: StM Handler a -> Handler a #
MonadError ServantErr Handler # |
Methods throwError :: ServantErr -> Handler a # catchError :: Handler a -> (ServantErr -> Handler a) -> Handler a #
Generic (Handler a) # |
Associated Types type Rep (Handler a) :: * -> * # Methods from :: Handler a -> Rep (Handler a) x # to :: Rep (Handler a) x -> Handler a #
type StM Handler a # |
type StM Handler a = Either ServantErr a
type Rep (Handler a) # |
type Rep (Handler a) = D1 (MetaData "Handler" "Servant.Server.Internal.Handler" "servant-server-0.11-IADlUM83Uj7GUOFTlU9US9" True) (C1 (MetaCons "Handler" PrefixI True) (S1 (MetaSel (Just Symbol "runHandler'") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (ExceptT ServantErr IO a))))

runHandler :: Handler a -> IO (Either ServantErr a) #