Safe Haskell | None |
---|---|
Language | Haskell2010 |
- data Buffer s = Buffer {
- bufferArray :: !(MutableByteArray# s)
- bufferUsedLength :: !Int
- bufferLength :: Int
- unsafeWriteChar :: MutableByteArray# s -> Int -> Char -> ST s Int
- unsafeNewBuffer :: ST s (Buffer s)
- bufferToText :: Buffer s -> ST s Text
- pushBuffer :: (Buffer s, Seq Text) -> ST s (Buffer s, Seq Text)
- snocVec :: Char -> (Buffer s, Seq Text) -> ST s (Buffer s, Seq Text)
- appendVec :: Text -> (Buffer s, Seq Text) -> ST s (Buffer s, Seq Text)
Documentation
Buffer used when evaluating builders
Buffer | |
|
Buffer length in Word16
s (ie bufferLength
Word16
s per buffer)
unsafeWriteChar :: MutableByteArray# s -> Int -> Char -> ST s Int Source
Write a character into the array at the given offset. Returns
the number of Word16
s written.
unsafeNewBuffer :: ST s (Buffer s) Source
Create a new buffer.
bufferToText :: Buffer s -> ST s Text Source
Create a strict text out of a buffer.
pushBuffer :: (Buffer s, Seq Text) -> ST s (Buffer s, Seq Text) Source
Convert the current buffer to a Text
and append it to the
end of the sequence. Create a new current buffer.