Safe Haskell | None |
---|---|
Language | Haskell2010 |
Strict Decoder
- strictDecoder :: Get a -> ByteString -> Either DecodeException a
- strictDecoderPart :: Get a -> ByteString -> Either DecodeException a
- type Decoded a = Either DecodeException a
- data DecodeException
- data Get a
- dByteString :: Get ByteString
- dLazyByteString :: Get ByteString
- dShortByteString :: Get ShortByteString
- dShortByteString_ :: Get ShortByteString
- dUTF16 :: Get Text
- dUTF8 :: Get Text
- decodeArrayWith :: Get a -> Get [a]
- decodeListWith :: Get a -> Get [a]
- dFloat :: Get Float
- dDouble :: Get Double
- dInteger :: Get Integer
- dNatural :: Get Natural
- dChar :: Get Char
- dBool :: Get Bool
- dWord8 :: Get Word8
- dWord16 :: Get Word16
- dWord32 :: Get Word32
- dWord64 :: Get Word64
- dWord :: Get Word
- dInt8 :: Get Int8
- dInt16 :: Get Int16
- dInt32 :: Get Int32
- dInt64 :: Get Int64
- dInt :: Get Int
- dBE8 :: Get Word8
- dBE16 :: Get Word16
- dBE32 :: Get Word32
- dBE64 :: Get Word64
- dBEBits8 :: Int -> Get Word8
- dBEBits16 :: Int -> Get Word16
- dBEBits32 :: Int -> Get Word32
- dBEBits64 :: Int -> Get Word64
- dropBits :: Int -> Get ()
Documentation
strictDecoder :: Get a -> ByteString -> Either DecodeException a Source #
strictDecoderPart :: Get a -> ByteString -> Either DecodeException a Source #
type Decoded a = Either DecodeException a Source #
A decoded value
data DecodeException Source #
An exception during decoding
Decoder monad
decodeArrayWith :: Get a -> Get [a] Source #
decodeListWith :: Get a -> Get [a] Source #
dBEBits8 :: Int -> Get Word8 Source #
Return the n most significant bits (up to maximum of 8)
The bits are returned right shifted:
unflatWith (dBEBits8 3) [128+64+32+1::Word8] == Right 7
dBEBits16 :: Int -> Get Word16 Source #
Return the n most significant bits (up to maximum of 16) The bits are returned right shifted.
dBEBits32 :: Int -> Get Word32 Source #
Return the n most significant bits (up to maximum of 8) The bits are returned right shifted.