-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | A small library for parsing IRC messages -- -- A small library for parsing IRC messages @package irc @version 0.1 -- | library for parsing IRC messages module Network.IRC 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 -- | Parse a String into a Message. parseMessage :: String -> Maybe Message -- | Message formatting formatMessage :: Message -> String -- | Translate a reply into the text version of the reply. If no text -- version is available, the argument is returned. translateReply :: Command -> String -- | Parse a Prefix prefix :: CharParser st Prefix -- | Parse a Server prefix server :: CharParser st Prefix -- | Parse a NickName prefix nickname :: 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 into an optional one that returns a Maybe maybeP :: GenParser tok st a -> GenParser tok st (Maybe a) -- | 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 instance Show Prefix instance Show Message