calamity-0.1.14.3: A library for writing discord bots
Safe HaskellNone
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 #

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

Defined in Calamity.Internal.BoundedStore

Generic (BoundedStore a) Source # 
Instance details

Defined in Calamity.Internal.BoundedStore

Associated Types

type Rep (BoundedStore a) :: Type -> Type #

Methods

from :: BoundedStore a -> Rep (BoundedStore a) x #

to :: Rep (BoundedStore a) x -> BoundedStore a #

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

Defined in Calamity.Internal.BoundedStore

Methods

at :: Index (BoundedStore a) -> Lens' (BoundedStore a) (Maybe (IxValue (BoundedStore a)))

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

Defined in Calamity.Internal.BoundedStore

Methods

ix :: Index (BoundedStore a) -> Traversal' (BoundedStore a) (IxValue (BoundedStore a))

Default (BoundedStore a) Source # 
Instance details

Defined in Calamity.Internal.BoundedStore

Methods

def :: BoundedStore a

type Rep (BoundedStore a) Source # 
Instance details

Defined in Calamity.Internal.BoundedStore

type Rep (BoundedStore a) = D1 ('MetaData "BoundedStore" "Calamity.Internal.BoundedStore" "calamity-0.1.14.3-inplace" 'False) (C1 ('MetaCons "BoundedStore" 'PrefixI 'True) ((S1 ('MetaSel ('Just "itemQueue") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Deque (Snowflake a))) :*: S1 ('MetaSel ('Just "items") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (HashMap (Snowflake a) a))) :*: (S1 ('MetaSel ('Just "limit") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int) :*: S1 ('MetaSel ('Just "size") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int))))
type Index (BoundedStore a) Source # 
Instance details

Defined in Calamity.Internal.BoundedStore

type Index (BoundedStore a) = Snowflake a
type IxValue (BoundedStore a) Source # 
Instance details

Defined in Calamity.Internal.BoundedStore

type IxValue (BoundedStore a) = a