Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- class Interpret a where
- interpret :: MonadError PackStreamError m => ByteString -> m a
- class Serialize a where
- serialize :: a -> ByteString
- inDepth :: Integral a => Int -> a -> Bool
Documentation
class Interpret a where Source #
The data types that can be intepreted from ByteString
Nothing
interpret :: MonadError PackStreamError m => ByteString -> m a Source #
Interpret a ByteString
as a specific type of raise PackStreamError
default interpret :: (MonadError PackStreamError m, Binary a) => ByteString -> m a Source #
Instances
class Serialize a where Source #
The data types that can be serialized into ByteString
Nothing
serialize :: a -> ByteString Source #
Serialize a specific data type into a ByteString
default serialize :: Binary a => a -> ByteString Source #