Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell98 |
- data LayerState i = LayerState {}
- data Action
- runAction :: Action -> IO ()
- data Result i a
- = Error Action
- | Exit (LayerState i) Action
- | Result (LayerState i) a Action
- type Exit i r = LayerState i -> Action -> Result i r
- type Failure i r = Action -> Result i r
- type Success a i r = a -> LayerState i -> Action -> Result i r
- newtype Layer i a = Layer {}
- runLayer :: LayerState i -> Layer i a -> Result i a
- loopLayer :: String -> i -> IO msg -> (msg -> Layer i ()) -> IO ()
- finish :: Layer i a
- dropPacket :: Layer i a
- time :: Layer i POSIXTime
- output :: IO () -> Layer i ()
- liftRight :: Either String b -> Layer i b
- type Handlers k a = Map k a
- emptyHandlers :: Handlers k a
- class ProvidesHandlers i k a | i -> k a where
- getHandlers :: i -> Handlers k a
- setHandlers :: Handlers k a -> i -> i
- getHandler :: (Ord k, ProvidesHandlers i k a) => k -> Layer i a
- addHandler :: (Ord k, ProvidesHandlers i k a) => k -> a -> Layer i ()
- removeHandler :: (Ord k, ProvidesHandlers i k a) => k -> Layer i ()
Documentation
data LayerState i Source
Error Action | |
Exit (LayerState i) Action | |
Result (LayerState i) a Action |
type Exit i r = LayerState i -> Action -> Result i r Source
Early exit continuation
type Success a i r = a -> LayerState i -> Action -> Result i r Source
Success continuation
runLayer :: LayerState i -> Layer i a -> Result i a Source
dropPacket :: Layer i a Source
emptyHandlers :: Handlers k a Source
class ProvidesHandlers i k a | i -> k a where Source
getHandlers :: i -> Handlers k a Source
setHandlers :: Handlers k a -> i -> i Source
getHandler :: (Ord k, ProvidesHandlers i k a) => k -> Layer i a Source
addHandler :: (Ord k, ProvidesHandlers i k a) => k -> a -> Layer i () Source
removeHandler :: (Ord k, ProvidesHandlers i k a) => k -> Layer i () Source