Safe Haskell | None |
---|---|
Language | Haskell2010 |
contains the tools to build and run a RespondT app
- respondApp :: MonadIO m => FailureHandlers -> (forall a. m a -> IO a) -> RespondT m ResponseReceived -> Application
- respondAppDefault :: MonadIO m => (forall a. m a -> IO a) -> RespondT m ResponseReceived -> Application
- serveRespond :: MonadIO m => Port -> LoggerSet -> FailureHandlers -> (forall a. m a -> IO a) -> RespondT m ResponseReceived -> IO ()
- serveRespondDefault :: MonadIO m => Port -> LoggerSet -> (forall a. m a -> IO a) -> RespondT m ResponseReceived -> IO ()
- type RespondM a = RespondT IO a
- simpleRespondApp :: FailureHandlers -> RespondM ResponseReceived -> Application
- simpleRespondAppDefault :: RespondM ResponseReceived -> Application
- serveSimpleRespond :: Port -> LoggerSet -> FailureHandlers -> RespondM ResponseReceived -> IO ()
- serveSimpleRespondDefault :: Port -> LoggerSet -> RespondM ResponseReceived -> IO ()
using RespondT
:: MonadIO m | |
=> FailureHandlers | however you want failures handled |
-> (forall a. m a -> IO a) | how to unpeel your monad to |
-> RespondT m ResponseReceived | your api - must respond. |
-> Application | give this to warp or something |
build an Application
from a RespondT
router stack.
respondAppDefault :: MonadIO m => (forall a. m a -> IO a) -> RespondT m ResponseReceived -> Application Source
it's respondApp
with defaultHandlers
passed in.
serveRespond :: MonadIO m => Port -> LoggerSet -> FailureHandlers -> (forall a. m a -> IO a) -> RespondT m ResponseReceived -> IO () Source
serve a RespondT router app using runWaiApp
on respondApp
.
serveRespondDefault :: MonadIO m => Port -> LoggerSet -> (forall a. m a -> IO a) -> RespondT m ResponseReceived -> IO () Source
serve a RespondT router app using runWaiApp
on respondAppDefault
the simpler Respond
type RespondM a = RespondT IO a Source
RespondT stacked on top of IO; the simplest stack for handlers.
simpleRespondApp :: FailureHandlers -> RespondM ResponseReceived -> Application Source
build an Application out of a RespondM handler.
simpleRespondAppDefault :: RespondM ResponseReceived -> Application Source
build an Application out of a RespondM handler using the default error handlers
serveSimpleRespond :: Port -> LoggerSet -> FailureHandlers -> RespondM ResponseReceived -> IO () Source
serve a RespondM handler
serveSimpleRespondDefault :: Port -> LoggerSet -> RespondM ResponseReceived -> IO () Source
serve a RespondM handler using the default error handlers