Safe Haskell | None |
---|---|
Language | Haskell2010 |
- data Hans a
- runHans :: Hans () -> IO ()
- runHansOnce :: Hans a -> IO (Maybe a)
- setEscape :: Hans () -> Hans ()
- escape :: Hans a
- dropPacket :: DeviceStats -> Hans a
- callCC :: ((b -> Hans a) -> Hans b) -> Hans b
- io :: IO a -> Hans a
- decode :: DeviceStats -> Get a -> ByteString -> Hans a
- decode' :: DeviceStats -> Get a -> ByteString -> Hans (a, ByteString)
Documentation
setEscape :: Hans () -> Hans () Source #
Set the escape continuation to the current position, within the operation given, so that control flow always restores back through this point.
dropPacket :: DeviceStats -> Hans a Source #
Synonym for escape
that also updates device statistics.
callCC :: ((b -> Hans a) -> Hans b) -> Hans b Source #
Call-cc. NOTE: the continuation will inherit the escape point of the calling context.
decode :: DeviceStats -> Get a -> ByteString -> Hans a Source #
Run a Get action in the context of the Hans monad,
decode' :: DeviceStats -> Get a -> ByteString -> Hans (a, ByteString) Source #
Run a Get action in the context of the Hans monad, returning any unconsumed input.