Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data Read a
- data Status a
- = FinishedStatus !(Ptr Word8) a
- | UnfinishedStatus (Read a)
- runOnPtr :: Read a -> Ptr Word8 -> Ptr Word8 -> IO (Status a)
- runOnByteString :: Read a -> ByteString -> Either (Read a) (a, ByteString)
- runOnByteStringFinishing :: Read a -> ByteString -> Maybe a
- skip :: Int -> Read ()
- skipWhile :: (Word8 -> Bool) -> Read ()
- byteString :: Int -> Read ByteString
- byteStringWhile :: (Word8 -> Bool) -> Read ByteString
- foldlWhile' :: (Word8 -> Bool) -> (acc -> Word8 -> acc) -> acc -> Read acc
- word8 :: Read Word8
- int16InBe :: Read Int16
- int32InBe :: Read Int32
- int64InBe :: Read Int64
- nullTerminatedByteString :: Read ByteString
- asciiIntegral :: Integral a => Read a
Documentation
Deserializer highly optimized for reading from pointers.
Parsing ByteString is just a special case.
Result of a single iteration.
Errors can be achieved by using Either for output.
FinishedStatus !(Ptr Word8) a | |
UnfinishedStatus (Read a) |
runOnByteString :: Read a -> ByteString -> Either (Read a) (a, ByteString) Source #
runOnByteStringFinishing :: Read a -> ByteString -> Maybe a Source #
:: Int | Size of the bytestring. Warning: It is your responsibility to ensure that it is not negative. |
-> Read ByteString |
byteStringWhile :: (Word8 -> Bool) -> Read ByteString Source #
asciiIntegral :: Integral a => Read a Source #
Integral number encoded in ASCII.