ron-rdt-0.7: Replicated Data Types (RON-RDT)

Safe HaskellNone
LanguageHaskell2010

RON.Data.ORSet

Description

Observed-Remove Set (OR-Set)

Synopsis

Documentation

newtype ORSet a Source #

Type-directing wrapper for typed OR-Set

Constructors

ORSet [a] 
Instances
Eq a => Eq (ORSet a) Source # 
Instance details

Defined in RON.Data.ORSet

Methods

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

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

Show a => Show (ORSet a) Source # 
Instance details

Defined in RON.Data.ORSet

Methods

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

show :: ORSet a -> String #

showList :: [ORSet a] -> ShowS #

Replicated a => ReplicatedAsObject (ORSet a) Source # 
Instance details

Defined in RON.Data.ORSet

Replicated a => Replicated (ORSet a) Source # 
Instance details

Defined in RON.Data.ORSet

Methods

encoding :: Encoding (ORSet a) Source #

newtype ORSetItem a Source #

Reference to an item inside an ORSet.

Constructors

ORSetItem UUID 
Instances
Show (ORSetItem a) Source # 
Instance details

Defined in RON.Data.ORSet

type ORSetMap k v = ORSet (k, v) Source #

data ORSetRep Source #

Untyped OR-Set. Implementation: a map from the last change (creation or deletion) to the original op.

Instances
Eq ORSetRep Source # 
Instance details

Defined in RON.Data.ORSet

Show ORSetRep Source # 
Instance details

Defined in RON.Data.ORSet

Semigroup ORSetRep Source # 
Instance details

Defined in RON.Data.ORSet

Monoid ORSetRep Source # 
Instance details

Defined in RON.Data.ORSet

Reducible ORSetRep Source # 
Instance details

Defined in RON.Data.ORSet

addValue :: (Replicated a, ReplicaClock m, MonadE m, MonadObjectState (ORSet a) m) => a -> m () Source #

Encode a value and add a it to the OR-Set

findAnyAlive :: (MonadE m, MonadObjectState (ORSet item) m) => m (Maybe (ORSetItem item)) Source #

Find any alive item. If no alive item found, return Nothing.

findAnyAlive' :: (MonadE m, MonadObjectState (ORSet item) m) => m (ORSetItem item) Source #

Find any alive item. If no alive item found, report an error.

removeRef :: (MonadE m, ReplicaClock m, MonadObjectState (ORSet a) m) => Object a -> m () Source #

Remove an object reference from the OR-Set

removeValue :: (ReplicatedAsPayload a, MonadE m, ReplicaClock m, MonadObjectState (ORSet a) m) => a -> m () Source #

Remove an atomic value from the OR-Set

zoom :: MonadE m => ORSetItem item -> ObjectStateT item m a -> ObjectStateT (ORSet item) m a Source #

Go from modification of the whole set to the modification of an item object.