This package is a work-in-progress exploration of the
(aka Piece Chain) data structure, suitable as a backend for text
editors. It was created mostly to teach me this simple but effective
data structure, and to see how well it performs on Haskell.
The implementation tries to follow:
More sophisticated implementations could be achieved (example using
a RB-tree to store the pieces), but I suspect that in practice using
Data.Sequence is enough, as it's using Finger Trees under
- Loading content via
- Partial mapping of files into memory with a
- Efficient storage of buffers via
- Insertions (single and multiple)
- Debug rendering
- Get rid of
- Efficiently render only piece of text with a
- Efficient updates
- Come up with a good story for text encoding (or lack thereof?)
- Efficiently "commits" of the table into memory (aka saving you work).
# Build the project. stack build # Run the test suite. stack test # Run the benchmarks. stack bench # Generate documentation. stack haddock
Thanks again, and happy hacking!