basement-0.0.16: Foundation scrap box of array & string

License | BSD-style
Maintainer | Foundation
Safe Haskell | None
Language | Haskell2010

Basement.String.Builder

Contents

- Emit functions
- unsafe

Description

String builder

Synopsis

- data Builder
- run :: PrimMonad prim => Builder -> prim (String, Maybe ValidationFailure, UArray Word8)
- runUnsafe :: PrimMonad prim => Builder -> prim String
- emit :: String -> Builder
- emitChar :: Char -> Builder
- unsafeStringBuilder :: Builder -> Builder

# Documentation

data Builder Source #

#### Instances

Instances details

Monoid Builder Source # |
Instance details Defined in Basement.String.Builder Methods mempty :: Builder Source # mappend :: Builder -> Builder -> Builder Source # mconcat :: [Builder] -> Builder Source #
Semigroup Builder Source # |
Instance details Defined in Basement.String.Builder Methods (<>) :: Builder -> Builder -> Builder Source # sconcat :: NonEmpty Builder -> Builder Source # stimes :: Integral b => b -> Builder -> Builder Source #

run :: PrimMonad prim => Builder -> prim (String, Maybe ValidationFailure, UArray Word8) Source #

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

run the given builder and return the generated String

prefer `run`

# Emit functions

emit :: String -> Builder Source #

add a string in the builder

emitChar :: Char -> Builder Source #

emit a UTF8 char in the builder

# unsafe

unsafeStringBuilder :: Builder -> Builder Source #