calamity-0.8.0.0: A library for writing discord bots in haskell
Safe HaskellSafe-Inferred
LanguageHaskell2010

Calamity.Internal.BoundedStore

Description

A thing for storing the last N things with IDs

Documentation

data BoundedStore a Source #

Instances

Instances details
Foldable BoundedStore Source # 
Instance details

Defined in Calamity.Internal.BoundedStore

Methods

fold :: Monoid m => BoundedStore m -> m #

foldMap :: Monoid m => (a -> m) -> BoundedStore a -> m #

foldMap' :: Monoid m => (a -> m) -> BoundedStore a -> m #

foldr :: (a -> b -> b) -> b -> BoundedStore a -> b #

foldr' :: (a -> b -> b) -> b -> BoundedStore a -> b #

foldl :: (b -> a -> b) -> b -> BoundedStore a -> b #

foldl' :: (b -> a -> b) -> b -> BoundedStore a -> b #

foldr1 :: (a -> a -> a) -> BoundedStore a -> a #

foldl1 :: (a -> a -> a) -> BoundedStore a -> a #

toList :: BoundedStore a -> [a] #

null :: BoundedStore a -> Bool #

length :: BoundedStore a -> Int #

elem :: Eq a => a -> BoundedStore a -> Bool #

maximum :: Ord a => BoundedStore a -> a #

minimum :: Ord a => BoundedStore a -> a #

sum :: Num a => BoundedStore a -> a #

product :: Num a => BoundedStore a -> a #

(k ~ A_Lens, a1 ~ Deque (Snowflake a2), b ~ Deque (Snowflake a2)) => LabelOptic "itemQueue" k (BoundedStore a2) (BoundedStore a2) a1 b Source # 
Instance details

Defined in Calamity.Internal.BoundedStore

Methods

labelOptic :: Optic k NoIx (BoundedStore a2) (BoundedStore a2) a1 b #

(k ~ A_Lens, a1 ~ HashMap (Snowflake a2) a2, b ~ HashMap (Snowflake a2) a2) => LabelOptic "items" k (BoundedStore a2) (BoundedStore a2) a1 b Source # 
Instance details

Defined in Calamity.Internal.BoundedStore

Methods

labelOptic :: Optic k NoIx (BoundedStore a2) (BoundedStore a2) a1 b #

(k ~ A_Lens, a1 ~ Int, b ~ Int) => LabelOptic "limit" k (BoundedStore a2) (BoundedStore a2) a1 b Source # 
Instance details

Defined in Calamity.Internal.BoundedStore

Methods

labelOptic :: Optic k NoIx (BoundedStore a2) (BoundedStore a2) a1 b #

(k ~ A_Lens, a1 ~ Int, b ~ Int) => LabelOptic "size" k (BoundedStore a2) (BoundedStore a2) a1 b Source # 
Instance details

Defined in Calamity.Internal.BoundedStore

Methods

labelOptic :: Optic k NoIx (BoundedStore a2) (BoundedStore a2) a1 b #

Show a => Show (BoundedStore a) Source # 
Instance details

Defined in Calamity.Internal.BoundedStore

Default (BoundedStore a) Source # 
Instance details

Defined in Calamity.Internal.BoundedStore

Methods

def :: BoundedStore a #

HasID' a => At (BoundedStore a) Source # 
Instance details

Defined in Calamity.Internal.BoundedStore

HasID' a => Ixed (BoundedStore a) Source # 
Instance details

Defined in Calamity.Internal.BoundedStore

Associated Types

type IxKind (BoundedStore a) #

type Index (BoundedStore a) Source # 
Instance details

Defined in Calamity.Internal.BoundedStore

type IxKind (BoundedStore a) Source # 
Instance details

Defined in Calamity.Internal.BoundedStore

type IxValue (BoundedStore a) Source # 
Instance details

Defined in Calamity.Internal.BoundedStore

type IxValue (BoundedStore a) = a