| Safe Haskell | None |
|---|---|
| Language | Haskell98 |
Lambdabot.Monad
- data IRCRState
- initRoState :: [DSum Config Identity] -> IO IRCRState
- reportInitDone :: LB ()
- waitForInit :: MonadLB m => m ()
- waitForQuit :: MonadLB m => m ()
- type Callback st = IrcMessage -> ModuleT st LB ()
- type OutputFilter st = Nick -> [String] -> ModuleT st LB [String]
- type Server st = IrcMessage -> ModuleT st LB ()
- data IRCRWState = IRCRWState {
- ircServerMap :: Map String (DSum ModuleID ServerRef)
- ircPrivilegedUsers :: Set Nick
- ircIgnoredUsers :: Set Nick
- ircChannels :: Map ChanName String
- ircPersists :: Map String Bool
- ircModulesByName :: Map String (Some ModuleInfo)
- ircModulesByID :: DMap ModuleID ModuleInfo
- ircCallbacks :: Map String (DMap ModuleID CallbackRef)
- ircOutputFilters :: [DSum ModuleID OutputFilterRef]
- ircCommands :: Map String (DSum ModuleID CommandRef)
- initRwState :: IRCRWState
- data LB a
- runLB :: LB a -> (IRCRState, IORef IRCRWState) -> IO a
- class (MonadIO m, MonadBaseControl IO m, MonadConfig m, MonadLogging m, Applicative m) => MonadLB m where
- registerModule :: String -> Module st -> st -> LB (ModuleInfo st)
- registerCommands :: [Command (ModuleT st LB)] -> ModuleT st LB ()
- registerCallback :: String -> Callback st -> ModuleT st LB ()
- registerOutputFilter :: OutputFilter st -> ModuleT st LB ()
- unregisterModule :: String -> LB ()
- registerServer :: String -> Server st -> ModuleT st LB ()
- unregisterServer :: String -> ModuleT mod LB ()
- send :: IrcMessage -> LB ()
- received :: IrcMessage -> LB ()
- applyOutputFilters :: Nick -> String -> LB [String]
- inModuleNamed :: String -> LB a -> (forall st. ModuleT st LB a) -> LB a
- inModuleWithID :: ModuleID st -> LB a -> ModuleT st LB a -> LB a
- withCommand :: String -> LB a -> (forall st. Command (ModuleT st LB) -> ModuleT st LB a) -> LB a
- listModules :: LB [String]
- withAllModules :: (forall st. ModuleT st LB a) -> LB ()
Documentation
reportInitDone :: LB () #
waitForInit :: MonadLB m => m () #
waitForQuit :: MonadLB m => m () #
type Callback st = IrcMessage -> ModuleT st LB () #
type Server st = IrcMessage -> ModuleT st LB () #
data IRCRWState #
Global read/write state.
Constructors
| IRCRWState | |
Fields
| |
Instances
Default rw state
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 where #
Minimal complete definition
registerModule :: String -> Module st -> st -> LB (ModuleInfo st) #
registerOutputFilter :: OutputFilter st -> ModuleT st LB () #
unregisterModule :: String -> LB () #
unregisterServer :: String -> ModuleT mod LB () #
send :: IrcMessage -> LB () #
received :: IrcMessage -> LB () #
inModuleNamed :: String -> LB a -> (forall st. ModuleT st LB a) -> LB a #
Interpret an expression in the context of a module.
listModules :: LB [String] #
withAllModules :: (forall st. ModuleT st LB a) -> LB () #
Interpret a function in the context of all modules