| Safe Haskell | None |
|---|---|
| Language | GHC2021 |
Data.PackStream.Get.Internal
Description
Internal module. Not part of the public API.
Synopsis
- getNull :: Get ()
- tryNull :: Word8 -> (() -> a) -> Get a -> Get a
- getBoolean :: Get Bool
- tryBoolean :: Word8 -> (Bool -> a) -> Get a -> Get a
- getFloat :: Get Double
- tryFloat :: Word8 -> (Double -> a) -> Get a -> Get a
- getString :: Get Text
- tryString :: Word8 -> (Text -> a) -> Get a -> Get a
- getBytes :: Get ByteString
- tryBytes :: Word8 -> (ByteString -> a) -> Get a -> Get a
- getList :: Get a -> Get (Vector a)
- tryList :: Get b -> Word8 -> (Vector b -> a) -> Get a -> Get a
- getDictionary :: Hashable a => Get a -> Get b -> Get (HashMap a b)
- tryDictionary :: Hashable k => Get k -> Get v -> Word8 -> (HashMap k v -> a) -> Get a -> Get a
- tryStructure :: Get b -> Word8 -> ((Word8, Vector b) -> a) -> Get a -> Get a
Documentation
tryNull :: Word8 -> (() -> a) -> Get a -> Get a Source #
Try to decode null given a tag byte; apply f on success or fall through to the continuation.
getBoolean :: Get Bool Source #
Decode a PackStream boolean value.
tryBoolean :: Word8 -> (Bool -> a) -> Get a -> Get a Source #
Try to decode a boolean given a tag byte; apply f on success or fall through to the continuation.
tryFloat :: Word8 -> (Double -> a) -> Get a -> Get a Source #
Try to decode a float given a tag byte; apply f on success or fall through to the continuation.
tryString :: Word8 -> (Text -> a) -> Get a -> Get a Source #
Try to decode a string given a tag byte; apply f on success or fall through to the continuation.
getBytes :: Get ByteString Source #
Decode a PackStream byte array.
tryBytes :: Word8 -> (ByteString -> a) -> Get a -> Get a Source #
Try to decode a byte array given a tag byte; apply f on success or fall through to the continuation.
getList :: Get a -> Get (Vector a) Source #
Decode a PackStream list using the given element decoder.
tryList :: Get b -> Word8 -> (Vector b -> a) -> Get a -> Get a Source #
Try to decode a list given a tag byte; apply f on success or fall through to the continuation.
getDictionary :: Hashable a => Get a -> Get b -> Get (HashMap a b) Source #
Decode a PackStream dictionary using the given key and value decoders.