lambdabot- Lambdabot is a development tool and advanced IRC bot

Safe HaskellNone




data IRCRState Source

Global read-only state.

initRoState :: [DSum Config] -> IO IRCRStateSource

Default ro state

data ModuleRef Source


forall st . ModuleRef (Module st) (MVar st) String 

data CommandRef Source


forall st . CommandRef (Module st) (MVar st) String (Command (ModuleT st LB)) 

data IRCRWState Source

Global read/write state.

initRwState :: IRCRWStateSource

Default rw state

newtype LB a Source

The IRC Monad. The reader transformer holds information about the connection to the IRC server.

instances Monad, Functor, MonadIO, MonadState, MonadError



class (MonadIO m, MonadBaseControl IO m, MonadConfig m, MonadLogging m, Applicative m) => MonadLB m whereSource


lb :: LB a -> m aSource


MonadLB LB 
MonadLB m => MonadLB (Cmd m) 
MonadLB m => MonadLB (ModuleT st m) 

evalLB :: LB a -> IRCRState -> IRCRWState -> IO aSource

run a computation in the LB monad

addServer :: String -> (IrcMessage -> LB ()) -> ModuleT mod LB ()Source

withModule :: String -> LB a -> (forall st. Module st -> ModuleT st LB a) -> LB aSource

Interpret an expression in the context of a module. Arguments are which map to use (ircModules and ircCommands are the only sensible arguments here), the name of the module/command, action for the case that the lookup fails, action if the lookup succeeds.

withCommand :: String -> LB a -> (forall st. Module st -> Command (ModuleT st LB) -> ModuleT st LB a) -> LB aSource

withAllModules :: (forall st. Module st -> ModuleT st LB a) -> LB ()Source

Interpret a function in the context of all modules