patches-vector

Patches (diffs) on vectors: composable, mergeable, and invertible.

https://github.com/liamoc/patches-vector

Version on this page:0.1.1.0
LTS Haskell 6.35:0.1.5.4
Stackage Nightly 2016-05-25:0.1.5.2
Latest on Hackage:0.1.5.4

See all snapshots patches-vector appears in

BSD-3-Clause licensed by Liam O'Connor
Maintained by [email protected]
This version can be pinned in stack with:patches-vector-0.1.1.0@sha256:b57e7e808edf9f5b45d3712d0147d049562c2e9fefedee25fad34173b83c1075,2181

Module documentation for 0.1.1.0

A patch is a collection of modifications (edits) to be made to a sequence of elements. Commonly found in version control systems, patches are also a simple example of a group, supporting composition and inversion.

This library provides a pleasant interface for working with patches to vectors with any type of element. It includes patch composition, inversion, and application, as well as a way to compute a patch between two vectors using the Wagner-Fischer algorithm.

It also includes a simple implementation of the Operational Transform (OT) function to resolve diverging patches from the same document. This allows for reasonably painless implementation of merge functions, as well as many applications in distributed editing of documents.