lambdabot-core-5.3: Lambdabot core functionality

Safe HaskellNone
LanguageHaskell98

Lambdabot.Command

Documentation

data Command m Source #

Constructors

Command 

Fields

runCommand :: (Monad m, Message a) => Command m -> a -> Nick -> String -> String -> m [String] Source #

data Cmd m a Source #

Instances
MonadTrans Cmd Source # 
Instance details

Defined in Lambdabot.Command

Methods

lift :: Monad m => m a -> Cmd m a #

MonadTransControl Cmd Source # 
Instance details

Defined in Lambdabot.Command

Associated Types

type StT Cmd a :: Type #

Methods

liftWith :: Monad m => (Run Cmd -> m a) -> Cmd m a #

restoreT :: Monad m => m (StT Cmd a) -> Cmd m a #

MonadBase b m => MonadBase b (Cmd m) Source # 
Instance details

Defined in Lambdabot.Command

Methods

liftBase :: b α -> Cmd m α #

MonadBaseControl b m => MonadBaseControl b (Cmd m) Source # 
Instance details

Defined in Lambdabot.Command

Associated Types

type StM (Cmd m) a :: Type #

Methods

liftBaseWith :: (RunInBase (Cmd m) b -> b a) -> Cmd m a #

restoreM :: StM (Cmd m) a -> Cmd m a #

Monad m => Monad (Cmd m) Source # 
Instance details

Defined in Lambdabot.Command

Methods

(>>=) :: Cmd m a -> (a -> Cmd m b) -> Cmd m b #

(>>) :: Cmd m a -> Cmd m b -> Cmd m b #

return :: a -> Cmd m a #

fail :: String -> Cmd m a #

Functor f => Functor (Cmd f) Source # 
Instance details

Defined in Lambdabot.Command

Methods

fmap :: (a -> b) -> Cmd f a -> Cmd f b #

(<$) :: a -> Cmd f b -> Cmd f a #

MonadFail m => MonadFail (Cmd m) Source # 
Instance details

Defined in Lambdabot.Command

Methods

fail :: String -> Cmd m a #

Applicative f => Applicative (Cmd f) Source # 
Instance details

Defined in Lambdabot.Command

Methods

pure :: a -> Cmd f a #

(<*>) :: Cmd f (a -> b) -> Cmd f a -> Cmd f b #

liftA2 :: (a -> b -> c) -> Cmd f a -> Cmd f b -> Cmd f c #

(*>) :: Cmd f a -> Cmd f b -> Cmd f b #

(<*) :: Cmd f a -> Cmd f b -> Cmd f a #

MonadIO m => MonadIO (Cmd m) Source # 
Instance details

Defined in Lambdabot.Command

Methods

liftIO :: IO a -> Cmd m a #

MonadConfig m => MonadConfig (Cmd m) Source # 
Instance details

Defined in Lambdabot.Command

Methods

getConfig :: Config a -> Cmd m a Source #

MonadLogging m => MonadLogging (Cmd m) Source # 
Instance details

Defined in Lambdabot.Command

MonadLB m => MonadLB (Cmd m) Source # 
Instance details

Defined in Lambdabot.Monad

Methods

lb :: LB a -> Cmd m a Source #

MonadLBState m => MonadLBState (Cmd m) Source # 
Instance details

Defined in Lambdabot.State

Associated Types

type LBState (Cmd m) :: Type Source #

Methods

withMS :: (LBState (Cmd m) -> (LBState (Cmd m) -> Cmd m ()) -> Cmd m a) -> Cmd m a Source #

type StT Cmd a Source # 
Instance details

Defined in Lambdabot.Command

type StT Cmd a = (a, [String])
type LBState (Cmd m) Source # 
Instance details

Defined in Lambdabot.State

type LBState (Cmd m) = LBState m
type StM (Cmd m) a Source # 
Instance details

Defined in Lambdabot.Command

type StM (Cmd m) a = ComposeSt Cmd m a

execCmd :: (Monad m, Message a) => Cmd m t -> a -> Nick -> String -> m [String] Source #

withMsg :: Monad m => (forall a. Message a => a -> Cmd m t) -> Cmd m t Source #

say :: Monad m => String -> Cmd m () Source #