Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- type Decode = Get
- type DecodeBits = BitGet
- decodeWhen :: (Applicative m, Alternative f) => Bool -> m a -> m (f a)
- getByteStringBits :: Int -> DecodeBits ByteString
- getWord8Bits :: Int -> DecodeBits Word8
- runDecode :: Decode a -> ByteString -> Either String a
- runDecodeBits :: DecodeBits a -> ByteString -> Either String a
- toBits :: Decode a -> Int -> DecodeBits a
- getFloatle :: Get Float
- getByteString :: Int -> Get ByteString
- getInt8 :: Get Int8
- getInt32le :: Get Int32
- getInt64le :: Get Int64
- getWord8 :: Get Word8
- getWord32le :: Get Word32
- getWord64le :: Get Word64
- getBool :: BitGet Bool
- getWord16be :: Int -> BitGet Word16
- getWord32be :: Int -> BitGet Word32
Documentation
type DecodeBits = BitGet Source #
decodeWhen :: (Applicative m, Alternative f) => Bool -> m a -> m (f a) Source #
getWord8Bits :: Int -> DecodeBits Word8 Source #
runDecodeBits :: DecodeBits a -> ByteString -> Either String a Source #
getFloatle :: Get Float #
Read a Float
in little endian IEEE-754 format.
getByteString :: Int -> Get ByteString #
An efficient get method for strict ByteStrings. Fails if fewer than n
bytes are left in the input. If n <= 0
then the empty string is returned.
getInt32le :: Get Int32 #
Read an Int32 in little endian format.
getInt64le :: Get Int64 #
Read an Int64 in little endian format.
getWord32le :: Get Word32 #
Read a Word32 in little endian format
getWord64le :: Get Word64 #
Read a Word64 in little endian format