ron-0.2: RON, RON-RDT, and RON-Schema

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 of atomic values

Constructors

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

Defined in RON.Data.ORSet

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

Defined in RON.Data.ORSet

newtype ObjectORSet a Source #

Type-directing wrapper for typed OR-Set of objects

Constructors

ObjectORSet [a] 

data ORSetRaw Source #

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

addNewRef :: forall a m. (ReplicatedAsObject a, ReplicaClock m, MonadError String m) => a -> StateT (Object (ObjectORSet a)) m () Source #

Encode an object and add a reference to it to the OR-Set

addRef :: (ReplicatedAsObject a, ReplicaClock m, MonadError String m) => Object a -> StateT (Object (ObjectORSet a)) m () Source #

Add a reference to the object to the OR-Set

addValue :: (ReplicatedAsPayload a, ReplicaClock m, MonadError String m) => a -> StateT (Object (ORSet a)) m () Source #

Add atomic value to the OR-Set

removeRef :: Object a -> StateT (Object (ORSet a)) m () Source #

Remove an object reference from the OR-Set

removeValue :: ReplicatedAsPayload a => a -> StateT (Object (ORSet a)) m () Source #

Remove an atomic value from the OR-Set