Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
- class ToDatagram a where
- toDatagram :: a -> Datagram
- newtype Datagram = Datagram Builder
- renderDatagram :: ToDatagram a => a -> ByteString
- fromDouble :: Double -> Text
- prefixed :: Char -> Text -> Builder
- mprefixed :: Char -> Maybe Text -> Builder
- tags :: [(Text, Text)] -> Builder
Extensible serialization class.
class ToDatagram a where Source
toDatagram :: a -> Datagram Source
renderDatagram :: ToDatagram a => a -> ByteString Source
Collect builder data and prepare it to be sent on a wire.
Some helpers.
fromDouble :: Double -> Text Source