crdt-0.4: Conflict-free replicated data types

Safe HaskellSafe
LanguageHaskell2010

CRDT.GCounter.Cv

Contents

Synopsis

Documentation

data GCounter a Source #

Grow-only counter.

Instances

Eq a => Eq (GCounter a) Source # 

Methods

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

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

Show a => Show (GCounter a) Source # 

Methods

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

show :: GCounter a -> String #

showList :: [GCounter a] -> ShowS #

Ord a => Semigroup (GCounter a) Source # 

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 # 

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