crdt-1.0: Conflict-free replicated data types

Safe HaskellNone
LanguageHaskell2010

CRDT.Cm.LWW

Contents

Synopsis

Documentation

data LWW a Source #

Last write wins. Assuming timestamp is unique.

Constructors

LWW 

Fields

Instances

Eq (LWW a) Source # 

Methods

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

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

Ord (LWW a) Source # 

Methods

compare :: LWW a -> LWW a -> Ordering #

(<) :: LWW a -> LWW a -> Bool #

(<=) :: LWW a -> LWW a -> Bool #

(>) :: LWW a -> LWW a -> Bool #

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

max :: LWW a -> LWW a -> LWW a #

min :: LWW a -> LWW a -> LWW a #

Show a => Show (LWW a) Source # 

Methods

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

show :: LWW a -> String #

showList :: [LWW a] -> ShowS #

Semigroup (LWW a) Source #

Merge by choosing more recent timestamp.

Methods

(<>) :: LWW a -> LWW a -> LWW a #

sconcat :: NonEmpty (LWW a) -> LWW a #

stimes :: Integral b => b -> LWW a -> LWW a #

Semilattice (LWW a) Source # 
type Observed (LWW a) Source # 
type Observed (LWW a) = a

newtype Assign a Source #

Constructors

Assign a 

Instances

Eq a => Eq (Assign a) Source # 

Methods

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

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

Show a => Show (Assign a) Source # 

Methods

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

show :: Assign a -> String #

showList :: [Assign a] -> ShowS #

Orphan instances

PartialOrd (LWW a) Source # 

Methods

leq :: LWW a -> LWW a -> Bool #

comparable :: LWW a -> LWW a -> Bool #

Observe (LWW a) Source # 

Associated Types

type Observed (LWW a) :: Type Source #

Methods

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

Eq a => CmRDT (LWW a) (Assign a) (LWW a) Source #