Text +Data -package
A time and space-efficient implementation of Unicode text. Suitable for performance critical use, both in terms of large data quantities and high speed.
Note: Read below the synopsis for important notes on the use of this module.
This module is intended to be imported qualified, to avoid name clashes with Prelude functions, e.g.
> import qualified Data.Text as T
To use an extended and very rich family of functions for working with Unicode text (including normalization, regular expressions, non-standard encodings, text breaking, and locales), see the text-icu package: http://hackage.haskell.org/package/text-icu
A space efficient, packed, unboxed Unicode text type.
Construct a Text without invisibly pinning its byte array in memory if its length has dwindled to zero.
Links to the Node, the Node itself, a label, links from the Node.
Find the context for the given Node. Causes an error if the Node is not present in the Graph.
Summarise all nodes in top-down, left-to-right order, carrying some state down the tree during the computation, but not left-to-right to siblings.
O(1). A Builder taking a lazy Text, satisfying
* (fromLazyText t) =
A useful show-like function for debugging purposes.
O(n). Extract a lazy Text from a Builder with a default buffer size. The construction work takes place if and when the relevant part of the lazy Text is demanded.
O(n). Extract a lazy Text from a Builder, using the given size for the initial buffer. The construction work takes place if and when the relevant part of the lazy Text is demanded.
If the initial buffer is too small to hold all data, subsequent buffers will be the default buffer size.