crdt-2.0: Conflict-free replicated data types

Safe HaskellSafe
LanguageHaskell2010

CRDT.Cm.TPSet

Description

TODO(cblp, 2017-09-29) USet?

Synopsis

Documentation

data TPSet a Source #

Constructors

Add a 
Remove a 

Instances

Eq a => Eq (TPSet a) Source # 

Methods

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

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

Show a => Show (TPSet a) Source # 

Methods

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

show :: TPSet a -> String #

showList :: [TPSet a] -> ShowS #

Ord a => CmRDT (TPSet a) Source # 

Associated Types

type Op (TPSet a) :: * Source #

type Payload (TPSet a) :: * Source #

type View (TPSet a) :: * Source #

Eq a => CausalOrd (TPSet a) Source # 

Methods

before :: TPSet a -> TPSet a -> Bool Source #

type Op (TPSet a) Source # 
type Op (TPSet a) = TPSet a
type Payload (TPSet a) Source # 
type Payload (TPSet a) = Set a
type View (TPSet a) Source # 
type View (TPSet a) = Payload (TPSet a)

updateAtSource :: (CmRDT u, Clock m) => Op u -> m u Source #

Generate an update to the local and remote replicas. Doesn't have sense if updateAtSourcePre is false.

May or may not use clock.

updateDownstream :: CmRDT u => u -> Payload u -> Payload u Source #

Apply an update to the payload. An invalid update must be ignored.