basement-0.0.15: Foundation scrap box of array & string
License BSD-style
Maintainer Foundation
Safe Haskell None
Language Haskell2010

Basement.Block.Builder

Description

Block builder

Synopsis

Documentation

run :: PrimMonad prim => Builder -> prim ( Block Word8 ) Source #

run the given builder and return the generated block

Emit functions

emit :: Block a -> Builder Source #

add a Block in the builder

emitString :: String -> Builder Source #

add a string in the builder

emitUTF8Char :: Char -> Builder Source #

emit a UTF8 char in the builder

this function may be replaced by `emit :: Encoding -> Char -> Builder`

unsafe

unsafeRunString :: PrimMonad prim => Builder -> prim String Source #

run the given builder and return a UTF8String

this action is unsafe as there is no guarantee upon the validity of the content of the built block.