-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Fast Internet Relay Chat (IRC) library -- -- Fast Internet Relay Chat (IRC) library. @package fastirc @version 0.1.1 -- | Utility functions for parsing IRC messages. module Network.FastIRC.Utils -- | Character predicate for IRC commands. isCommandChar :: Char -> Bool -- | Character predicate for IRC user hostnames. In the string -- x!y@z the substring z is the user's hostname. isHostChar :: Char -> Bool -- | Character predicate for IRC end of line characters. isIRCEOLChar :: Char -> Bool -- | Character predicate for IRC tokens. isIRCTokChar :: Char -> Bool -- | Character predicate for IRC messages. isMessageChar :: Char -> Bool -- | Character predicate for IRC nicknames. This function considers high -- bytes (0x80 to 0xFF) and most nonstandard ASCII bytes as valid, -- because most modern IRC daemons allow nonstandard nicknames. isNickChar :: Char -> Bool -- | Character predicate for IRC servers. isServerChar :: Char -> Bool -- | Character predicate for IRC usernames. In the string x!y@z -- the substring y is the user's username. isUserChar :: Char -> Bool -- | Run a parser completely. parseComplete :: Parser a -> ByteString -> Maybe a -- | Functions for dealing with sets of IRC servers. Note that servers are -- compared case-insensitively. module Network.FastIRC.ServerSet -- | A set of servers. This data type uses Set internally, but the -- strings are handled case-insensitively. data ServerSet -- | Add a server to a ServerSet. addServer :: ByteString -> ServerSet -> ServerSet -- | Remove a server from a ServerSet. delServer :: ByteString -> ServerSet -> ServerSet -- | Empty set of servers. emptyServers :: ServerSet -- | Check whether specified server is in the set. isServer :: ByteString -> ServerSet -> Bool -- | Convert to list. serverList :: ServerSet -> [ByteString] -- | Build from list. serversFromList :: [ByteString] -> ServerSet -- | This module includes parsers for IRC users. module Network.FastIRC.Users -- | IRC user or server. data UserSpec -- | Nickname. Nick :: ByteString -> UserSpec -- | Nickname, username and hostname. User :: ByteString -> ByteString -> ByteString -> UserSpec -- | IRC server. Server :: ByteString -> UserSpec -- | A Parser for IRC users and servers. userParser :: ServerSet -> Parser UserSpec instance Eq UserSpec instance Read UserSpec instance Show UserSpec -- | This module implements the IRC monad, which you can use to -- write IRC applications. -- -- This module is completely useless for now. module Network.FastIRC.Session -- | Session configuration. data Config Config :: ServerSet -> Config cfgServers :: Config -> ServerSet -- | Monad for IRC sessions. type IRC = StateT Config IO -- | Parser for IRC messages. module Network.FastIRC.Messages -- | Data type for IRC messages. data Message Message :: !Maybe UserSpec -> !Command -> Message -- | Message origin (user/server). msgOrigin :: Message -> !Maybe UserSpec -- | Message command or numeric. msgCommand :: Message -> !Command -- | Parser for IRC messages. messageParser :: ServerSet -> Parser Message -- | Data type for IRC commands. data Command -- | Arbitrary string command. StringCmd :: ByteString -> [ByteString] -> Command -- | Arbitrary numeric command. NumericCmd :: Integer -> [ByteString] -> Command -- | Parser for IRC commands and their arguments. commandParser :: Parser Command instance Eq Command instance Show Command instance Eq Message instance Show Message -- | Fast IRC parsing and connection library. module Network.FastIRC