crdt-0.3: 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

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