Safe Haskell | None |
---|---|
Language | Haskell2010 |
- data Peek output = Peek !Int !(Ptr Word8 -> IO output)
- word8 :: Peek Word8
- beWord16 :: Peek Word16
- beWord32 :: Peek Word32
- beWord64 :: Peek Word64
- bytes :: Int -> Peek ByteString
- shortByteString :: Int -> Peek ShortByteString
- pokeAndPeek :: PokeAndPeek input output -> Peek output
- parse :: Int -> Parse a -> (Int -> a) -> (Text -> a) -> Peek a
- parseUnbound :: Int -> ParseUnbound a -> (Int -> a) -> (Text -> a) -> Peek a
- peekAmountAndParse :: Peek Int -> Parse a -> (Int -> a) -> (Text -> a) -> Peek (Peek a)
Documentation
shortByteString :: Int -> Peek ShortByteString Source #
pokeAndPeek :: PokeAndPeek input output -> Peek output Source #
parse :: Int -> Parse a -> (Int -> a) -> (Text -> a) -> Peek a Source #
Given the length of the data and a specification of its sequential consumption, produces Peek, which results in Just the successfully taken value, or Nothing, if the specified length of data wasn't enough.
parseUnbound :: Int -> ParseUnbound a -> (Int -> a) -> (Text -> a) -> Peek a Source #
Given the length of the data and a specification of its sequential consumption, produces Peek, which results in Just the successfully taken value, or Nothing, if the specified length of data wasn't enough.