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

Modulerope-utf16-splay-0.4.0.0Haskell2010

Data.Rope.UTF16.Internal

  • 2 types
  • 31 values
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
valuechunkLength :: Int
#

The maximum length, in UTF-8 code units, of a chunk

Queries

4 declarations
valuelength :: Rope -> Int
#

Length in UTF-16 code units (not characters)

valuerows :: Rope -> Int
#

The number of newlines in the rope

valuecolumns :: Rope -> Int
#

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

Conversions

5 declarations

Transformations

2 declarations
valueintercalate :: Rope -> [Rope] -> Rope
#

Concatenate the interspersion of a rope between the elements of a list of ropes

Chunking

3 declarations

UTF-16 code unit indexing

5 declarations
valuetake :: Int -> Rope -> Rope
#

Take the first n UTF-16 code units (not characters)

valuedrop :: Int -> Rope -> Rope
#

Drop the first n UTF-16 code units (not characters)

Lines

1 declaration

Breaking by predicate

4 declarations

Folds

3 declarations

Special folds

2 declarations
valueany :: (Char -> Bool) -> Rope -> Bool
#

Do any characters in the rope satisfy the predicate?

valueall :: (Char -> Bool) -> Rope -> Bool
#

Do all characters in the rope satisfy the predicate?