Copyright | (c) 2015 Athan Clark |
---|---|
License | BSD-style |
Maintainer | athan.clark@gmail.com |
Stability | experimental |
Portability | GHC |
Safe Haskell | None |
Language | Haskell2010 |
Simple utilities for embedding a monad transformer stack in an Application
or Middleware
- with MiddlewareT
, your transformer stack is shared
across all attached middlewares until run. You can also lift existing Middleware
to MiddlewareT
, given some extraction function.
Documentation
type ApplicationT m = Request -> (Response -> IO ResponseReceived) -> m ResponseReceived Source
type MiddlewareT m = ApplicationT m -> ApplicationT m Source
liftApplication :: MonadIO m => Application -> ApplicationT m Source
liftMiddleware :: MonadIO m => (ApplicationT m -> Application) -> Middleware -> MiddlewareT m Source