crdt-9.0: Conflict-free replicated data types

Safe HaskellNone
LanguageHaskell2010

CRDT.Cm.Counter

Documentation

data Counter a Source #

Constructors

Increment 
Decrement 

Instances

Bounded (Counter a) Source # 
Enum (Counter a) Source # 

Methods

succ :: Counter a -> Counter a #

pred :: Counter a -> Counter a #

toEnum :: Int -> Counter a #

fromEnum :: Counter a -> Int #

enumFrom :: Counter a -> [Counter a] #

enumFromThen :: Counter a -> Counter a -> [Counter a] #

enumFromTo :: Counter a -> Counter a -> [Counter a] #

enumFromThenTo :: Counter a -> Counter a -> Counter a -> [Counter a] #

Eq (Counter a) Source # 

Methods

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

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

Show (Counter a) Source # 

Methods

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

show :: Counter a -> String #

showList :: [Counter a] -> ShowS #

(Num a, Eq a) => CmRDT (Counter a) Source # 

Associated Types

type Intent (Counter a) :: * Source #

type Payload (Counter a) :: * Source #

CausalOrd (Counter a) Source #

Empty order, allowing arbitrary reordering

Methods

precedes :: Counter a -> Counter a -> Bool Source #

type Intent (Counter a) Source # 
type Intent (Counter a) = Counter a
type Payload (Counter a) Source # 
type Payload (Counter a) = a