calamity-0.1.14.6: A library for writing discord bots in haskell
Safe HaskellNone
LanguageHaskell2010

Calamity.Internal.Utils

Description

Internal utilities and instances

Documentation

whenJust :: Applicative m => Maybe a -> (a -> m ()) -> m () Source #

whenM :: Monad m => m Bool -> m () -> m () Source #

unlessM :: Monad m => m Bool -> m () -> m () Source #

(<<$>>) :: (Functor f, Functor g) => (a -> b) -> f (g a) -> f (g b) infixl 4 Source #

(<<*>>) :: (Applicative f, Applicative g) => f (g (a -> b)) -> f (g a) -> f (g b) infixl 4 Source #

(<.>) :: Functor f => (a -> b) -> (c -> f a) -> c -> f b infixl 4 Source #

debug :: Member LogEff r => Text -> Sem r () Source #

info :: Member LogEff r => Text -> Sem r () Source #

error :: Member LogEff r => Text -> Sem r () Source #

swap :: (a, b) -> (b, a) Source #

Orphan instances

TextShow UTCTime Source # 
Instance details

(TextShow a, Unbox a) => TextShow (Vector a) Source # 
Instance details

Methods

showbPrec :: Int -> Vector a -> Builder

showb :: Vector a -> Builder

showbList :: [Vector a] -> Builder

showtPrec :: Int -> Vector a -> Text

showt :: Vector a -> Text

showtList :: [Vector a] -> Text

showtlPrec :: Int -> Vector a -> Text

showtl :: Vector a -> Text

showtlList :: [Vector a] -> Text

(Show a, Fractional a) => TextShow (Colour a) Source # 
Instance details

Methods

showbPrec :: Int -> Colour a -> Builder

showb :: Colour a -> Builder

showbList :: [Colour a] -> Builder

showtPrec :: Int -> Colour a -> Text

showt :: Colour a -> Text

showtList :: [Colour a] -> Text

showtlPrec :: Int -> Colour a -> Text

showtl :: Colour a -> Text

showtlList :: [Colour a] -> Text

(Show k, Show v) => TextShow (Map k v) Source # 
Instance details

Methods

showbPrec :: Int -> Map k v -> Builder

showb :: Map k v -> Builder

showbList :: [Map k v] -> Builder

showtPrec :: Int -> Map k v -> Text

showt :: Map k v -> Text

showtList :: [Map k v] -> Text

showtlPrec :: Int -> Map k v -> Text

showtl :: Map k v -> Text

showtlList :: [Map k v] -> Text

(Show k, Show v) => TextShow (HashMap k v) Source # 
Instance details

Methods

showbPrec :: Int -> HashMap k v -> Builder

showb :: HashMap k v -> Builder

showbList :: [HashMap k v] -> Builder

showtPrec :: Int -> HashMap k v -> Text

showt :: HashMap k v -> Text

showtList :: [HashMap k v] -> Text

showtlPrec :: Int -> HashMap k v -> Text

showtl :: HashMap k v -> Text

showtlList :: [HashMap k v] -> Text

Default (Map k v) Source # 
Instance details

Methods

def :: Map k v