crdt-0.3: Conflict-free replicated data types

Safe HaskellSafe
LanguageHaskell2010

CRDT.PNCounter.Cv.Internal

Synopsis

Documentation

data PNCounter a Source #

Positive-negative counter. Allows incrementing and decrementing. Nice example of combining of existing CvRDT (GCounter in this case) to create another CvRDT.

Constructors

PNCounter 

Fields

Instances

Eq a => Eq (PNCounter a) Source # 

Methods

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

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

Show a => Show (PNCounter a) Source # 
Ord a => Semigroup (PNCounter a) Source # 

Methods

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

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

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

Ord a => Semilattice (PNCounter a) Source #