Safe Haskell | None |
---|---|
Language | Haskell98 |
- 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 () Source
waitForInit :: MonadLB m => m () Source
waitForQuit :: MonadLB m => m () Source
type Callback st = IrcMessage -> ModuleT st LB () Source
type Server st = IrcMessage -> ModuleT st LB () Source
data IRCRWState Source
Global read/write state.
IRCRWState | |
|
initRwState :: IRCRWState Source
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 Source
registerModule :: String -> Module st -> st -> LB (ModuleInfo st) Source
registerOutputFilter :: OutputFilter st -> ModuleT st LB () Source
unregisterModule :: String -> LB () Source
unregisterServer :: String -> ModuleT mod LB () Source
send :: IrcMessage -> LB () Source
received :: IrcMessage -> LB () Source
inModuleNamed :: String -> LB a -> (forall st. ModuleT st LB a) -> LB a Source
Interpret an expression in the context of a module.
withCommand :: String -> LB a -> (forall st. Command (ModuleT st LB) -> ModuleT st LB a) -> LB a Source
listModules :: LB [String] Source
withAllModules :: (forall st. ModuleT st LB a) -> LB () Source
Interpret a function in the context of all modules