ot-0.1.1.1: Real-time collaborative editing with Operational Transformation

Safe HaskellSafe-Inferred

Control.OperationalTransformation

Documentation

class OTOperation op whereSource

Methods

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.

class OTOperation op => OTComposableOperation op whereSource

Methods

compose :: op -> op -> Either String opSource

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.

class OTOperation op => OTSystem doc op whereSource

Methods

apply :: op -> doc -> Either String docSource

Apply an operation to a document, producing a new document.

Instances

OTSystem Text TextOperation 
(OTOperation [op], OTSystem doc op) => OTSystem doc [op] 
(OTOperation (a, b), OTSystem doca a, OTSystem docb b) => OTSystem (doca, docb) (a, b) 
(OTOperation (a, b, c), OTSystem doca a, OTSystem docb b, OTSystem docc c) => OTSystem (doca, docb, docc) (a, b, c) 
(OTOperation (a, b, c, d), OTSystem doca a, OTSystem docb b, OTSystem docc c, OTSystem docd d) => OTSystem (doca, docb, docc, docd) (a, b, c, d) 
(OTOperation (a, b, c, d, e), 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)