Safe Haskell | None |
---|---|
Language | Haskell2010 |
- optsToApplication :: WhebOptions g s m -> (forall a. m a -> IO a) -> Application
- runWhebHandler :: Monad m => WhebOptions g s m -> WhebHandlerT g s m -> InternalState s -> HandlerData g s m -> m EResponse
- runDebugHandler :: Monad m => WhebOptions g s m -> WhebT g s m a -> HandlerData g s m -> m (Either WhebError a)
- runMiddlewares :: Monad m => WhebOptions g s m -> [WhebMiddleware g s m] -> HandlerData g s m -> m (Maybe Response, InternalState s)
- runWhebMiddleware :: Monad m => WhebOptions g s m -> InternalState s -> HandlerData g s m -> WhebMiddleware g s m -> m (Maybe Response, InternalState s)
Converting to WAI application
optsToApplication :: WhebOptions g s m -> (forall a. m a -> IO a) -> Application Source
Convert WhebOptions
to Application
Running Handlers
runWhebHandler :: Monad m => WhebOptions g s m -> WhebHandlerT g s m -> InternalState s -> HandlerData g s m -> m EResponse Source
Run all inner wheb monads to the top level.
runDebugHandler :: Monad m => WhebOptions g s m -> WhebT g s m a -> HandlerData g s m -> m (Either WhebError a) Source
Same as above but returns arbitrary type for debugging.
Running Middlewares
runMiddlewares :: Monad m => WhebOptions g s m -> [WhebMiddleware g s m] -> HandlerData g s m -> m (Maybe Response, InternalState s) Source
Runs middlewares in order, stopping if one returns a response
runWhebMiddleware :: Monad m => WhebOptions g s m -> InternalState s -> HandlerData g s m -> WhebMiddleware g s m -> m (Maybe Response, InternalState s) Source