niagra-0.2.0: CSS EDSL for Haskell

Safe HaskellNone
LanguageHaskell2010

Data.Niagra.Builder.Internal

Synopsis

Documentation

data Buffer s Source

Buffer used when evaluating builders

Constructors

Buffer 

Fields

bufferArray :: !(MutableByteArray# s)

contains Word16s

bufferUsedLength :: !Int

number of Word16s in the buffer

bufferLength :: Int Source

Buffer length in Word16s (ie bufferLength Word16s 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 Word16s 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.

snocVec :: Char -> (Buffer s, Seq Text) -> ST s (Buffer s, Seq Text) Source

Append a char to the end of a buffered sequence

appendVec :: Text -> (Buffer s, Seq Text) -> ST s (Buffer s, Seq Text) Source

Append a Text to the end of a buffered text sequence