Copyright | (c) Marat Khafizov 2018 |
---|---|
License | BSD-3 |
Maintainer | xafizoff@gmail.com |
Stability | experimental |
Portability | not portable |
Safe Haskell | Safe |
Language | Haskell2010 |
Basic types
Synopsis
- type Header = (ByteString, ByteString)
- data Req = Req {
- reqPath :: ByteString
- reqMeth :: ByteString
- reqVers :: ByteString
- reqHead :: [Header]
- data Context (f :: * -> *) a = Context {
- cxHandler :: Event a -> N2O f a (Result a)
- cxReq :: Req
- cxMiddleware :: [Context f a -> Context f a]
- cxProtos :: [Proto f a]
- cxDePickle :: ByteString -> Maybe a
- cxPickle :: a -> ByteString
- cxState :: Map ByteString ByteString
- data Result a
- newtype Proto f a = Proto {}
- data Event a
- type State f a = IORef (Context f a)
- type N2O f a = N2OT (State f a) IO
- newtype N2OT state m a = N2OT {
- runN2O :: state -> m a
Documentation
type Header = (ByteString, ByteString) Source #
An HTTP header
An HTTP request
Req | |
|
data Context (f :: * -> *) a Source #
The N2O context data type
This is the key data type of the N2O. (f :: * -> *)
- type constructor
for the protocol handler's input type. (a :: *)
- base type for the
event handler's input type. I.e. (f a)
gives input type for the
protocol handler. (Event a)
gives input type for the event handler.
Context | |
|
Result of the message processing