Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- writeToByteString :: Write -> ByteString
- data Write = Write {}
- concat :: Foldable f => f Write -> Write
- word8 :: Word8 -> Write
- lWord16 :: Word16 -> Write
- bWord16 :: Word16 -> Write
- lWord32 :: Word32 -> Write
- bWord32 :: Word32 -> Write
- lWord64 :: Word64 -> Write
- bWord64 :: Word64 -> Write
- lInt16 :: Int16 -> Write
- bInt16 :: Int16 -> Write
- lInt32 :: Int32 -> Write
- bInt32 :: Int32 -> Write
- lInt64 :: Int64 -> Write
- bInt64 :: Int64 -> Write
- word64AsciiDec :: Word64 -> Write
- wordAsciiDec :: Word -> Write
- int64AsciiDec :: Int64 -> Write
- intAsciiDec :: Int -> Write
- doubleAsciiDec :: Double -> Write
- zeroNonRealDoubleAsciiDec :: Double -> Write
- scientificAsciiDec :: Scientific -> Write
- byteString :: ByteString -> Write
- textUtf8 :: Text -> Write
Documentation
writeToByteString :: Write -> ByteString Source #
Execute Write, producing strict ByteString.
Specification of how many bytes to allocate and how to populate them.
Useful for creating strict bytestrings and tasks like that.
word64AsciiDec :: Word64 -> Write Source #
Render Word64 in ASCII decimal.
wordAsciiDec :: Word -> Write Source #
Render Word in ASCII decimal.
int64AsciiDec :: Int64 -> Write Source #
Render Int64 in ASCII decimal.
intAsciiDec :: Int -> Write Source #
Render Int in ASCII decimal.
doubleAsciiDec :: Double -> Write Source #
Render double interpreting non-real values,
such as NaN
, Infinity
, -Infinity
,
as is.
zeroNonRealDoubleAsciiDec :: Double -> Write Source #
Render double interpreting non real values,
such as NaN
, Infinity
, -Infinity
,
as zero.
scientificAsciiDec :: Scientific -> Write Source #
Render Scientific in ASCII decimal.
byteString :: ByteString -> Write Source #
Efficiently copy the contents of ByteString using memcpy
.
textUtf8 :: Text -> Write Source #
Render Text in UTF8.
Does pretty much the same as encodeUtf8
,
while allowing you to avoid redundant memcpy
compared to (
.byteString
. encodeUtf8
)