text-2.1.3: An efficient packed Unicode text type.
LicenseBSD-style (see LICENSE)
Stabilityexperimental
Safe HaskellNone
LanguageHaskell2010

Data.Text.Internal.StrictBuilder

Contents

Description

Warning: this is an internal module, and does not have a stable API or name. Functions in this module may not check or enforce preconditions expected by public modules. Use at your own risk!

Since: text-2.0.2

Synopsis

Documentation

data StrictTextBuilder #

A delayed representation of strict Text.

Since: text-2.1.2

Constructors

StrictTextBuilder 

Fields

Instances

Instances details
Monoid StrictTextBuilder # 
Instance details

Defined in Data.Text.Internal.StrictBuilder

Semigroup StrictTextBuilder #

Concatenation of StrictBuilder is right-biased: the right builder will be run first. This allows a builder to run tail-recursively when it was accumulated left-to-right.

Instance details

Defined in Data.Text.Internal.StrictBuilder

type StrictBuilder = StrictTextBuilder #

Deprecated: Use StrictTextBuilder instead

A delayed representation of strict Text.

Since: text-2.0.2

toText :: StrictTextBuilder -> Text #

Use StrictBuilder to build Text.

Since: text-2.0.2

fromChar :: Char -> StrictTextBuilder #

Since: text-2.0.2

fromText :: Text -> StrictTextBuilder #

Copy Text in a StrictBuilder

Since: text-2.0.2

Unsafe

For internal purposes, we abuse StrictBuilder as a delayed Array rather than Text: it may not actually be valid Text.

unsafeFromByteString :: ByteString -> StrictTextBuilder #

Copy a ByteString.

Unsafe: This may not be valid UTF-8 text.

Since: text-2.0.2

unsafeFromWord8 :: Word8 -> StrictTextBuilder #

Unsafe: This may not be valid UTF-8 text.

Since: text-2.0.2