crdt-0.4: Conflict-free replicated data types

Safe HaskellSafe
LanguageHaskell2010

CRDT.GCounter.Cm

Synopsis

Documentation

data GCounter a Source #

Grow-only counter.

Commutativity: Increment obviously commutes with itself.

Constructors

Increment 

Instances

Show (GCounter a) Source # 

Methods

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

show :: GCounter a -> String #

showList :: [GCounter a] -> ShowS #

Num a => CmRDT (GCounter a) Source # 

Associated Types

type State (GCounter a) :: Type Source #

Methods

update :: GCounter a -> State (GCounter a) -> State (GCounter a) Source #

type State (GCounter a) Source # 
type State (GCounter a) = a

initial :: Num a => a Source #

Initial state