Wheb-0.2.0.0: The frictionless WAI Framework

Safe HaskellNone
LanguageHaskell2010

Web.Wheb.Internal

Contents

Synopsis

Converting to WAI application

optsToApplication :: WhebOptions g s m -> (forall a. m a -> IO a) -> Application Source

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