Rope -package:core-text

A rope is a data strucure to efficiently store and manipulate long strings. Wikipedia provides a nice overview: https://en.wikipedia.org/wiki/Rope_(data_structure)
This module defines a rope data structure for use in Yi. This specific implementation uses a fingertree over Text. In contrast to our old implementation, we can now reap all the benefits of Text: automatic unicode handling and blazing fast implementation on underlying strings. This frees us from a lot of book-keeping. We don't lose out on not using ByteString directly because the old implementation encoded it into UTF8 anyway, making it unsuitable for storing anything but text.
Rope of Text chunks with logarithmic concatenation. This rope offers three interfaces: one based on code points, one based on UTF-16 code units, and one based on UTF-8 code units. This comes with a price of more bookkeeping and is less performant than Data.Text.Rope, Data.Text.Utf8.Rope, or Data.Text.Utf16.Rope.
Rope of Text chunks with logarithmic concatenation. This rope offers an interface, based on code points. Use Data.Text.Utf16.Rope, if you need UTF-16 code units, or Data.Text.Mixed.Rope, if you need both interfaces.
Rope of Text chunks with logarithmic concatenation. This rope offers an interface, based on UTF-16 code units. Use Data.Text.Rope, if you need code points, or Data.Text.Mixed.Rope, if you need both interfaces.
Rope of Text chunks with logarithmic concatenation. This rope offers an interface, based on UTF-8 code units. Use Data.Text.Rope, if you need code points, or Data.Text.Mixed.Rope, if you need both interfaces.
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
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
Not on Stackage, so not searched. Tools for manipulating fingertrees of bytestrings with optional annotations
Construct a Rope out of a single ByteString strand.
Ropes optimised for updating using UTF-16 code units and row/column pairs. Ropes optimised for updating using UTF-16 code units and row/column pairs. This implementation uses splay trees instead of the usual finger trees. According to my benchmarks, splay trees are faster in most situations.
The function properFraction takes a real fractional number x and returns a pair (n,f) such that x = n+f, and:
  • n is an integral number with the same sign as x; and
  • f is a fraction with the same type and sign as x, and with absolute value less than 1.
The default definitions of the ceiling, floor, truncate and round functions are in terms of properFraction.