Safe Haskell | None |
---|---|
Language | Haskell98 |
Lambdabot.Plugin
- data Module st = Module {
- moduleSerialize :: !(Maybe (Serial st))
- moduleDefState :: !(LB st)
- moduleSticky :: !Bool
- moduleCmds :: !(ModuleT st LB [Command (ModuleT st LB)])
- moduleInit :: !(ModuleT st LB ())
- moduleExit :: !(ModuleT st LB ())
- contextual :: !(String -> Cmd (ModuleT st LB) ())
- data ModuleT st m a
- newModule :: Module st
- data LB a
- class (MonadIO m, MonadBaseControl IO m, MonadConfig m, MonadLogging m, Applicative m) => MonadLB m where
- lim80 :: Monad m => m String -> Cmd m ()
- ios80 :: MonadIO m => IO String -> Cmd m ()
- data ChanName
- mkCN :: Nick -> ChanName
- getCN :: ChanName -> Nick
- data Nick = Nick {}
- ircPrivmsg :: Nick -> String -> LB ()
- module Lambdabot.Config
- commandPrefixes :: Config [String]
- disabledCommands :: Config [String]
- editDistanceLimit :: Config Int
- enableInsults :: Config Bool
- onStartupCmds :: Config [String]
- outputDir :: Config FilePath
- dataDir :: Config FilePath
- lbVersion :: Config Version
- textWidth :: Config Int
- uncaughtExceptionHandler :: Config (SomeException -> IO ())
- replaceRootLogger :: Config Bool
- lbRootLoggerPath :: Config [String]
- consoleLogHandle :: Config Handle
- consoleLogLevel :: Config Priority
- consoleLogFormat :: Config String
- module Lambdabot.Command
- module Lambdabot.State
- module Lambdabot.File
- data Serial s = Serial {
- serialize :: s -> Maybe ByteString
- deserialize :: ByteString -> Maybe s
- stdSerial :: (Show s, Read s) => Serial s
- mapSerial :: (Ord k, Show k, Show v, Read k, Read v) => Serial (Map k v)
- mapPackedSerial :: Serial (Map ByteString ByteString)
- assocListPackedSerial :: Serial [(ByteString, ByteString)]
- mapListPackedSerial :: Serial (Map ByteString [ByteString])
- readM :: (Monad m, Read a) => String -> m a
- class Packable t where
- readOnly :: (ByteString -> b) -> Serial b
Documentation
The Module type class.
Constructors
Module | |
Fields
|
This transformer encodes the additional information a module might need to access its name or its state.
Instances
MonadBase b m => MonadBase b (ModuleT st m) Source # | |
MonadBaseControl b m => MonadBaseControl b (ModuleT st m) Source # | |
MonadTrans (ModuleT st) Source # | |
MonadTransControl (ModuleT st) Source # | |
Monad m => MonadReader (ModuleInfo st) (ModuleT st m) Source # | |
Monad m => Monad (ModuleT st m) Source # | |
Functor m => Functor (ModuleT st m) Source # | |
Applicative m => Applicative (ModuleT st m) Source # | |
MonadIO m => MonadIO (ModuleT st m) Source # | |
MonadException m => MonadException (ModuleT st m) Source # | |
MonadConfig m => MonadConfig (ModuleT st m) Source # | |
MonadLogging m => MonadLogging (ModuleT st m) Source # | |
MonadLB m => MonadLB (ModuleT st m) Source # | |
MonadLB m => MonadLBState (ModuleT st m) Source # | |
type StT (ModuleT st) a Source # | |
type LBState (ModuleT st m) Source # | |
type StM (ModuleT st m) a Source # | |
The IRC Monad. The reader transformer holds information about the connection to the IRC server.
instances Monad, Functor, MonadIO, MonadState, MonadError
Instances
class (MonadIO m, MonadBaseControl IO m, MonadConfig m, MonadLogging m, Applicative m) => MonadLB m where Source #
Minimal complete definition
ios80 :: MonadIO m => IO String -> Cmd m () Source #
convenience, similar to ios but also cut output to channel to 80 characters
usage: process _ _ to _ s = ios80 to (plugs s)
The type of nicknames isolated from a message.
Constructors
Nick | |
Send a message to a channel/user, applying all output filters
module Lambdabot.Config
commandPrefixes :: Config [String] Source #
disabledCommands :: Config [String] Source #
onStartupCmds :: Config [String] Source #
uncaughtExceptionHandler :: Config (SomeException -> IO ()) Source #
lbRootLoggerPath :: Config [String] Source #
module Lambdabot.Command
module Lambdabot.State
module Lambdabot.File
Constructors
Serial | |
Fields
|
mapSerial :: (Ord k, Show k, Show v, Read k, Read v) => Serial (Map k v) Source #
Serializes a Map
type if both the key and the value are instances
of Read and Show. The serialization is done by converting the map to
and from lists. Results are saved line-wise, for better editing and
revison control.
readM :: (Monad m, Read a) => String -> m a Source #
readM
behaves like read, but catches failure in a monad.
this allocates a 20-30 M on startup...
class Packable t where Source #
Minimal complete definition
Instances
Packable [(ByteString, ByteString)] Source # | |
Packable (Map ByteString [ByteString]) Source # | An instance for Map Packed [Packed] uses gzip compression |
Packable (Map ByteString (Bool, [(String, Int)])) Source # | |
Packable (Map ByteString ByteString) Source # | |
readOnly :: (ByteString -> b) -> Serial b Source #