crdt-10.0: Conflict-free replicated data types

Safe HaskellNone
LanguageHaskell2010

CRDT.Cv.RGA

Contents

Synopsis

Documentation

newtype RGA a Source #

TODO(cblp, 2018-02-06) Vector.Unboxed

Constructors

RGA [(VertexId, a)] 

Instances

Eq a => Eq (RGA a) Source # 

Methods

(==) :: RGA a -> RGA a -> Bool #

(/=) :: RGA a -> RGA a -> Bool #

Show a => Show (RGA a) Source # 

Methods

showsPrec :: Int -> RGA a -> ShowS #

show :: RGA a -> String #

showList :: [RGA a] -> ShowS #

(Eq a, AsEmpty a) => Semigroup (RGA a) Source # 

Methods

(<>) :: RGA a -> RGA a -> RGA a #

sconcat :: NonEmpty (RGA a) -> RGA a #

stimes :: Integral b => b -> RGA a -> RGA a #

(Eq a, AsEmpty a) => Monoid (RGA a) Source # 

Methods

mempty :: RGA a #

mappend :: RGA a -> RGA a -> RGA a #

mconcat :: [RGA a] -> RGA a #

(Eq a, AsEmpty a) => Semilattice (RGA a) Source # 

fromList :: Clock m => [a] -> m (RGA a) Source #

toList :: AsEmpty a => RGA a -> [a] Source #

edit :: (Eq a, AsEmpty a, Clock m) => [a] -> RGA a -> m (RGA a) Source #

Replace content with specified, applying changed found by the diff algorithm

Packed representation

type RgaPacked a = [(VertexId, [a])] Source #

Compact version of RGA. For each VertexId, the corresponding sequence of vetices has the same Pid and sequentially growing LocalTime, starting with the specified one.