calamity-0.3.0.0: A library for writing discord bots in haskell
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 #

Default (BoundedStore a) Source # 
Instance details

Defined in Calamity.Internal.BoundedStore

Methods

def :: BoundedStore a #

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

Defined in Calamity.Internal.BoundedStore

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

Defined in Calamity.Internal.BoundedStore

type Rep (BoundedStore a) Source # 
Instance details

Defined in Calamity.Internal.BoundedStore

type Rep (BoundedStore a) = D1 ('MetaData "BoundedStore" "Calamity.Internal.BoundedStore" "calamity-0.3.0.0-inplace" 'False) (C1 ('MetaCons "BoundedStore" 'PrefixI 'True) ((S1 ('MetaSel ('Just "itemQueue") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Deque (Snowflake a))) :*: S1 ('MetaSel ('Just "items") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (HashMap (Snowflake a) a))) :*: (S1 ('MetaSel ('Just "limit") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int) :*: S1 ('MetaSel ('Just "size") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int))))
type Index (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