crdt-0.4: Conflict-free replicated data types
CRDT.PNCounter.Cm
Synopsis
data PNCounter a Source #
Positive-negative counter. Allows incrementing and decrementing.
Constructors
Instances
Methods
minBound :: PNCounter a #
maxBound :: PNCounter a #
succ :: PNCounter a -> PNCounter a #
pred :: PNCounter a -> PNCounter a #
toEnum :: Int -> PNCounter a #
fromEnum :: PNCounter a -> Int #
enumFrom :: PNCounter a -> [PNCounter a] #
enumFromThen :: PNCounter a -> PNCounter a -> [PNCounter a] #
enumFromTo :: PNCounter a -> PNCounter a -> [PNCounter a] #
enumFromThenTo :: PNCounter a -> PNCounter a -> PNCounter a -> [PNCounter a] #
showsPrec :: Int -> PNCounter a -> ShowS #
show :: PNCounter a -> String #
showList :: [PNCounter a] -> ShowS #
Associated Types
type State (PNCounter a) :: Type Source #
update :: PNCounter a -> State (PNCounter a) -> State (PNCounter a) Source #
initial :: Num a => a Source #
Initial state