Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- mapParsecT :: (Monad m, Monad n) => (m (Consumed (m (Reply s u a))) -> n (Consumed (n (Reply s u b)))) -> ParsecT s u m a -> ParsecT s u n b
- nat :: Monad m => ParsecT ByteString () m Integer
- botPrefix :: BotMonad m => ParsecT ByteString () m ()
- parsecPart :: BotMonad m => ParsecT ByteString () m a -> m a
- reportError :: BotMonad m => ByteString -> ParseError -> m ()
- showErrorMessages :: String -> String -> String -> String -> String -> [Message] -> [String]
Documentation
mapParsecT :: (Monad m, Monad n) => (m (Consumed (m (Reply s u a))) -> n (Consumed (n (Reply s u b)))) -> ParsecT s u m a -> ParsecT s u n b Source #
parsecPart :: BotMonad m => ParsecT ByteString () m a -> m a Source #
create a bot part by using Parsec to parse the command
The argument to parsecPart
is a parser function.
The argument to that parsec function is the target
that the response should be sent to.
The parser will receive the msg
from the PrivMsg
.
see dicePart
for an example usage.
reportError :: BotMonad m => ByteString -> ParseError -> m () Source #
showErrorMessages :: String -> String -> String -> String -> String -> [Message] -> [String] Source #
Orphan instances
(BotMonad m, Monad m) => BotMonad (ParsecT s u m) Source # | |
askBotEnv :: ParsecT s u m BotEnv Source # askMessage :: ParsecT s u m Message Source # askOutChan :: ParsecT s u m (Chan Message) Source # localMessage :: (Message -> Message) -> ParsecT s u m a -> ParsecT s u m a Source # sendMessage :: Message -> ParsecT s u m () Source # logM :: LogLevel -> ByteString -> ParsecT s u m () Source # whoami :: ParsecT s u m ByteString Source # |