HORIZON HASKELLDocslts/ghc-9.14.x7a6c33e2026-10-12Search packagesCtrl K
Theme: |

GHC 9.14.1 · lts/ghc-9.14.x · 7a6c33e · 2026-10-12

Modulerope-utf16-splay-0.4.0.0Haskell2010

Data.Rope.UTF16

Contents
  1. Queries
  2. Conversions
  3. Transformations
  4. Chunking
  5. UTF-16 code unit indexing
  6. Breaking by predicate
  7. Folds
  8. Special folds
Synopsis
newtypenewtype Rope

A SplayTree of Text values optimised for being indexed by and modified at UTF-16 code units and row/column (RowColumn) positions. Internal invariant: No empty Chunks in the SplayTree

Instances7Eq, Ord, Show, IsString, Semigroup, Monoid, …
  • Eq RopeDefined in rope-utf16-splay-0.4.0.0 · Data.Rope.UTF16.Internal
  • Ord RopeDefined in rope-utf16-splay-0.4.0.0 · Data.Rope.UTF16.Internal
  • Show RopeDefined in rope-utf16-splay-0.4.0.0 · Data.Rope.UTF16.Internal
  • IsString RopeDefined in rope-utf16-splay-0.4.0.0 · Data.Rope.UTF16.Internal
  • Semigroup RopeDefined in rope-utf16-splay-0.4.0.0 · Data.Rope.UTF16.Internal

    Append joins adjacent chunks if that can be done while staying below chunkLength.

  • Monoid RopeDefined in rope-utf16-splay-0.4.0.0 · Data.Rope.UTF16.Internal
  • Measured Position RopeDefined in rope-utf16-splay-0.4.0.0 · Data.Rope.UTF16.Internal

Queries

valuecolumns :: Rope -> Int

The number of UTF-16 code units (not characters) since the last newline or the start of the rope

Conversions

Transformations

Chunking

UTF-16 code unit indexing

datadata RowColumn
#

Constructors

  • RowColumn
    • row :: !Int

      Number of newlines before this position

    • column :: !Int

      Number of UTF-16 code units since last newline or start of string

Instances5Eq, Ord, Show, Semigroup, Monoid
  • Eq RowColumnDefined in rope-utf16-splay-0.4.0.0 · Data.Rope.UTF16.Internal.Position
  • Ord RowColumnDefined in rope-utf16-splay-0.4.0.0 · Data.Rope.UTF16.Internal.Position
  • Show RowColumnDefined in rope-utf16-splay-0.4.0.0 · Data.Rope.UTF16.Internal.Position
  • Semigroup RowColumnDefined in rope-utf16-splay-0.4.0.0 · Data.Rope.UTF16.Internal.Position
  • Monoid RowColumnDefined in rope-utf16-splay-0.4.0.0 · Data.Rope.UTF16.Internal.Position

Breaking by predicate

Folds

Special folds