Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- runGetA :: (HasCallStack, Monad m) => (Int -> m ByteString) -> (ByteString -> m ()) -> Get a -> m (Either BinaryGetError a)
- data BinaryGetError = BinaryGetError {}
- runPutA :: HasCallStack => (ByteString -> m ()) -> Put -> m ()
- putFloatbe :: Float -> Put
- putFloatle :: Float -> Put
- putFloathost :: Float -> Put
- putDoublebe :: Double -> Put
- putDoublele :: Double -> Put
- putDoublehost :: Double -> Put
- putLength16beByteString :: HasCallStack => ByteString -> Put
- putLength32beByteString :: HasCallStack => ByteString -> Put
- putWithLength16be :: HasCallStack => Put -> Put
- putWithLength32be :: HasCallStack => Put -> Put
- putChar8 :: HasCallStack => Char -> Put
- getChar8 :: HasCallStack => Get Char
- getFloatbe :: Get Float
- getFloatle :: Get Float
- getFloathost :: Get Float
- getDoublebe :: Get Double
- getDoublele :: Get Double
- getDoublehost :: Get Double
- getLength8ByteString :: HasCallStack => Get ByteString
- getLength16beByteString :: HasCallStack => Get ByteString
- getLength32beByteString :: HasCallStack => Get ByteString
- getWithLength16be :: HasCallStack => Get a -> Get (a, Word16)
- matchWord8 :: HasCallStack => Word8 -> Get ()
- matchChar8 :: HasCallStack => Char -> Get ()
Documentation
runGetA :: (HasCallStack, Monad m) => (Int -> m ByteString) -> (ByteString -> m ()) -> Get a -> m (Either BinaryGetError a) Source #
data BinaryGetError Source #
Instances
Show BinaryGetError Source # | |
Defined in Util.Binary showsPrec :: Int -> BinaryGetError -> ShowS # show :: BinaryGetError -> String # showList :: [BinaryGetError] -> ShowS # | |
Exception BinaryGetError Source # | |
Defined in Util.Binary |
runPutA :: HasCallStack => (ByteString -> m ()) -> Put -> m () Source #
putFloatbe :: Float -> Put #
Write a Float
in big endian IEEE-754 format.
putFloatle :: Float -> Put #
Write a Float
in little endian IEEE-754 format.
putFloathost :: Float -> Put #
Write a Float
in native in IEEE-754 format and host endian.
putDoublebe :: Double -> Put #
Write a Double
in big endian IEEE-754 format.
putDoublele :: Double -> Put #
Write a Double
in little endian IEEE-754 format.
putDoublehost :: Double -> Put #
Write a Double
in native in IEEE-754 format and host endian.
putLength16beByteString :: HasCallStack => ByteString -> Put Source #
putLength32beByteString :: HasCallStack => ByteString -> Put Source #
putWithLength16be :: HasCallStack => Put -> Put Source #
putWithLength32be :: HasCallStack => Put -> Put Source #
getFloatbe :: Get Float #
Read a Float
in big endian IEEE-754 format.
getFloatle :: Get Float #
Read a Float
in little endian IEEE-754 format.
getFloathost :: Get Float #
Read a Float
in IEEE-754 format and host endian.
getDoublebe :: Get Double #
Read a Double
in big endian IEEE-754 format.
getDoublele :: Get Double #
Read a Double
in little endian IEEE-754 format.
getDoublehost :: Get Double #
Read a Double
in IEEE-754 format and host endian.
getWithLength16be :: HasCallStack => Get a -> Get (a, Word16) Source #
matchWord8 :: HasCallStack => Word8 -> Get () Source #
matchChar8 :: HasCallStack => Char -> Get () Source #