-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | A small library for parsing IRC messages. -- -- A set of combinators and types for parsing IRC messages. @package irc @version 0.4.3 -- | Datatypes for representing IRC messages, as well as formatting them. module Network.IRC.Base type Parameter = String type ServerName = String type UserName = String type RealName = String type Command = String -- | The optional beginning of an IRC messages data Prefix -- | Server Prefix Server :: ServerName -> Prefix -- | Nickname Prefix NickName :: String -> (Maybe UserName) -> (Maybe ServerName) -> Prefix -- | IRC messages are parsed as: [ : prefix space ] command { -- space param } crlf data Message -- | IRC Message Message :: (Maybe Prefix) -> Command -> [Parameter] -> Message -- | Encode a message to its string representation encode :: Message -> String showMessage :: Message -> String showPrefix :: Prefix -> String showParameters :: [Parameter] -> String -- | Translate a reply into its text description. If no text is available, -- the argument is returned. translateReply :: Command -> String replyTable :: [(String, String)] -- | This is the deprecated version of encode render :: Message -> String instance Show Prefix instance Read Prefix instance Eq Prefix instance Show Message instance Read Message instance Eq Message module Network.IRC.Commands type Channel = String type Password = String nick :: UserName -> Message user :: UserName -> ServerName -> ServerName -> RealName -> Message joinChan :: Channel -> Message part :: Channel -> Message quit :: Maybe String -> Message privmsg :: String -> String -> Message -- | Parsec parsers and a general parsing interface for IRC messages module Network.IRC.Parser -- | Parse a String into a Message. decode :: String -> Maybe Message -- | Parse a Prefix prefix :: CharParser st Prefix -- | Parse a Server prefix serverPrefix :: CharParser st Prefix -- | Parse a NickName prefix nicknamePrefix :: CharParser st Prefix -- | Parse a command. Either a string of capital letters, or 3 digits. command :: CharParser st Command -- | Parse a command parameter. parameter :: CharParser st Parameter -- | Parse a Message message :: CharParser st Message -- | Parse a cr lf crlf :: CharParser st () -- | Consume only spaces tabs or the bell character spaces :: CharParser st () -- | Convert a parser that consumes all space after it tokenize :: CharParser st a -> CharParser st a -- | Take all tokens until one character from a given string is found takeUntil :: String -> CharParser st String -- | The deprecated version of decode parseMessage :: String -> Maybe Message -- | library for parsing IRC messages module Network.IRC