| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
RON.Data.ORSet
Description
Observed-Remove Set (OR-Set)
Synopsis
- newtype ORSet a = ORSet [a]
- newtype ORSetItem a = ORSetItem UUID
- type ORSetMap k v = ORSet (k, v)
- data ORSetRep
- addRef :: (ReplicaClock m, MonadE m, MonadObjectState (ORSet a) m) => Object a -> m ()
- addValue :: (Replicated a, ReplicaClock m, MonadE m, MonadObjectState (ORSet a) m) => a -> m ()
- findAnyAlive :: (MonadE m, MonadObjectState (ORSet item) m) => m (Maybe (ORSetItem item))
- findAnyAlive' :: (MonadE m, MonadObjectState (ORSet item) m) => m (ORSetItem item)
- removeRef :: (MonadE m, ReplicaClock m, MonadObjectState (ORSet a) m) => Object a -> m ()
- removeValue :: (ReplicatedAsPayload a, MonadE m, ReplicaClock m, MonadObjectState (ORSet a) m) => a -> m ()
- zoom :: MonadE m => ORSetItem item -> ObjectStateT item m a -> ObjectStateT (ORSet item) m a
Documentation
Type-directing wrapper for typed OR-Set
Constructors
| ORSet [a] |
Instances
| Eq a => Eq (ORSet a) Source # | |
| Show a => Show (ORSet a) Source # | |
| Replicated a => ReplicatedAsObject (ORSet a) Source # | |
Defined in RON.Data.ORSet Methods objectOpType :: UUID Source # newObject :: (ReplicaClock m, MonadState StateFrame m) => ORSet a -> m (Object (ORSet a)) Source # getObject :: (MonadE m, MonadObjectState (ORSet a) m) => m (ORSet a) Source # | |
| Replicated a => Replicated (ORSet a) Source # | |
Defined in RON.Data.ORSet | |
Reference to an item inside an ORSet.
Untyped OR-Set. Implementation: a map from the last change (creation or deletion) to the original op.
Instances
| Eq ORSetRep Source # | |
| Show ORSetRep Source # | |
| Semigroup ORSetRep Source # | |
| Monoid ORSetRep Source # | |
| Reducible ORSetRep Source # | |
Defined in RON.Data.ORSet Methods reducibleOpType :: UUID Source # stateFromChunk :: [Op] -> ORSetRep Source # stateToChunk :: ORSetRep -> StateChunk Source # applyPatches :: ORSetRep -> Unapplied -> (ORSetRep, Unapplied) Source # reduceUnappliedPatches :: Unapplied -> Unapplied Source # | |
addRef :: (ReplicaClock m, MonadE m, MonadObjectState (ORSet a) m) => Object a -> m () Source #
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.