crdt-10.7: Conflict-free replicated data types
Safe HaskellSafe-Inferred
LanguageHaskell2010

CRDT.Cv.GCounter

Contents

Synopsis

Documentation

newtype GCounter a Source #

Grow-only counter.

Constructors

GCounter (IntMap a) 

Instances

Instances details
Eq a => Eq (GCounter a) Source # 
Instance details

Defined in CRDT.Cv.GCounter

Methods

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

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

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

Defined in CRDT.Cv.GCounter

Methods

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

show :: GCounter a -> String #

showList :: [GCounter a] -> ShowS #

Ord a => Semigroup (GCounter a) Source # 
Instance details

Defined in CRDT.Cv.GCounter

Methods

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

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

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

Ord a => Semilattice (GCounter a) Source #

See CvRDT

Instance details

Defined in CRDT.Cv.GCounter

initial :: GCounter a Source #

Initial state

query :: Num a => GCounter a -> a Source #

Get value from the state

Operation

increment Source #

Arguments

:: Num a 
=> Word

replica id

-> GCounter a 
-> GCounter a 

Increment counter