crdt-1.0: Conflict-free replicated data types

Safe HaskellNone
LanguageHaskell2010

CRDT.Cm.TPSet

Description

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

Synopsis

Documentation

newtype TPSet a Source #

Constructors

TPSet 

Fields

Instances

Show a => Show (TPSet a) Source # 

Methods

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

show :: TPSet a -> String #

showList :: [TPSet a] -> ShowS #

Observe (TPSet a) Source # 

Associated Types

type Observed (TPSet a) :: Type Source #

Methods

observe :: TPSet a -> Observed (TPSet a) Source #

Ord a => CmRDT (TPSet a) (TPSetOp a) (TPSetOp a) Source # 
type Observed (TPSet a) Source # 
type Observed (TPSet a) = Set a

data TPSetOp a Source #

Constructors

Add a 
Remove a 

Instances

Eq a => Eq (TPSetOp a) Source # 

Methods

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

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

Show a => Show (TPSetOp a) Source # 

Methods

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

show :: TPSetOp a -> String #

showList :: [TPSetOp a] -> ShowS #

Eq a => PartialOrd (TPSetOp a) Source # 

Methods

leq :: TPSetOp a -> TPSetOp a -> Bool #

comparable :: TPSetOp a -> TPSetOp a -> Bool #

Ord a => CmRDT (TPSet a) (TPSetOp a) (TPSetOp a) Source # 

lookup :: Ord a => a -> TPSet a -> Bool Source #

query lookup

updateAtSource :: (CmRDT payload op update, Clock m) => op -> m update 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 payload op update => update -> payload -> payload Source #

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