HORIZON HASKELLDocslts/ghc-9.10.xc74966e2026-09-27Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · c74966e · 2026-09-27

Moduletext-2.1.3Haskell2010

Data.Text.Internal.Lazy

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!

A module containing private Text internals. This exposes the Text representation and low level construction functions. Modules which extend the Text system may need to use this module.

  • 2 types
  • 11 values
  • Packagetext-2.1.3
  • Exports13
  • LanguageHaskell2010
  • LicenceBSD-2-Clause
  • SourceLazy.hs
datadata Text
#

Constructors

Instances14IsList, Eq, Data, Ord, Read, Show, …
  • IsList TextDefined in text-2.1.3 · Data.Text.Lazy · orphan

    Performs replacement on invalid scalar values:

    Example2 expressions
    :set -XOverloadedLists['\55555'] :: Data.Text.Lazy.Text"\65533"
  • Eq TextDefined in text-2.1.3 · Data.Text.Lazy · orphan
  • Data TextDefined in text-2.1.3 · Data.Text.Lazy · orphan

    This instance preserves data abstraction at the cost of inefficiency. We omit reflection services for the sake of data abstraction.

    This instance was created by copying the updated behavior of Data.Text.Text

  • Ord TextDefined in text-2.1.3 · Data.Text.Lazy · orphan
  • Read TextDefined in text-2.1.3 · Data.Text.Lazy · orphan
  • Show TextDefined in text-2.1.3 · Data.Text.Lazy · orphan
  • IsString TextDefined in text-2.1.3 · Data.Text.Lazy · orphan

    Performs replacement on invalid scalar values:

    Example2 expressions
    :set -XOverloadedStrings"\55555" :: Data.Text.Lazy.Text"\65533"
  • Semigroup TextDefined in text-2.1.3 · Data.Text.Lazy · orphan
  • Monoid TextDefined in text-2.1.3 · Data.Text.Lazy · orphan
  • PrintfArg TextDefined in text-2.1.3 · Data.Text.Lazy · orphan
  • NFData TextDefined in text-2.1.3 · Data.Text.Lazy · orphan
  • Binary TextDefined in text-2.1.3 · Data.Text.Lazy · orphan
  • Lift TextDefined in text-2.1.3 · Data.Text.Lazy · orphan
  • type Item Text = CharDefined in text-2.1.3 · Data.Text.Lazy · orphan
valuefoldrChunks :: (Text -> a -> a) -> a -> Text -> a
#

Consume the chunks of a lazy Text with a natural right fold.

valuefoldlChunks :: (a -> Text -> a) -> a -> Text -> a
#

Consume the chunks of a lazy Text with a strict, tail-recursive, accumulating left fold.

Data type invariant and abstraction functions

3 declarations

The data type invariant for lazy Text: Every Text is either Empty or consists of non-null Texts. All functions must preserve this, and the QC properties must check this.

Chunk allocation sizes

4 declarations
valuesmallChunkSize :: Int
#

Currently set to 128 bytes, less the memory management overhead.

valuechunkOverhead :: Int
#

The memory management overhead. Currently this is tuned for GHC only.