Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell98 |
Documentation
class OTOperation op where Source
transform :: op -> op -> Either String (op, op) Source
Transforms two concurrent operations a and b, producing a' and b'
such that b' ∘ a == a' ∘ b
.
OTOperation AugmentedTextOperation | |
OTOperation TextOperation | |
OTOperation op => OTOperation [op] | |
(OTOperation a, OTOperation b) => OTOperation (a, b) | |
(OTOperation a, OTOperation b, OTOperation c) => OTOperation (a, b, c) | |
(OTOperation a, OTOperation b, OTOperation c, OTOperation d) => OTOperation (a, b, c, d) | |
(OTOperation a, OTOperation b, OTOperation c, OTOperation d, OTOperation e) => OTOperation (a, b, c, d, e) |
class OTOperation op => OTComposableOperation op where Source
compose :: op -> op -> Either String op Source
Composes two operations a and b, producing c, such that c has the same effect when applied to a document as applying a and b one after another.
OTComposableOperation AugmentedTextOperation | |
OTComposableOperation TextOperation | |
OTOperation op => OTComposableOperation [op] | |
(OTComposableOperation a, OTComposableOperation b) => OTComposableOperation (a, b) | |
(OTComposableOperation a, OTComposableOperation b, OTComposableOperation c) => OTComposableOperation (a, b, c) | |
(OTComposableOperation a, OTComposableOperation b, OTComposableOperation c, OTComposableOperation d) => OTComposableOperation (a, b, c, d) | |
(OTComposableOperation a, OTComposableOperation b, OTComposableOperation c, OTComposableOperation d, OTComposableOperation e) => OTComposableOperation (a, b, c, d, e) |
class OTOperation op => OTSystem doc op where Source
apply :: op -> doc -> Either String doc Source
Apply an operation to a document, producing a new document.
OTSystem doc TextOperation => OTSystem doc AugmentedTextOperation | |
OTSystem Text TextOperation | |
OTSystem doc op => OTSystem doc [op] | |
(OTSystem doca a, OTSystem docb b) => OTSystem (doca, docb) (a, b) | |
(OTSystem doca a, OTSystem docb b, OTSystem docc c) => OTSystem (doca, docb, docc) (a, b, c) | |
(OTSystem doca a, OTSystem docb b, OTSystem docc c, OTSystem docd d) => OTSystem (doca, docb, docc, docd) (a, b, c, d) | |
(OTSystem doca a, OTSystem docb b, OTSystem docc c, OTSystem docd d, OTSystem doce e) => OTSystem (doca, docb, docc, docd, doce) (a, b, c, d, e) |