summaryrefslogtreecommitdiff
path: root/HsbotIrcBot/Hsbot/Irc
diff options
context:
space:
mode:
authorJulien Dessaux2010-10-10 01:41:27 +0200
committerJulien Dessaux2010-10-10 01:42:18 +0200
commitd05aea2def7374b1d08c5d839cbabe3517c9210a (patch)
treee37373ce0986ed8bfad1051b930ef766aab3b91b /HsbotIrcBot/Hsbot/Irc
parentFixed the plugin loading process. (diff)
downloadhsbot-d05aea2def7374b1d08c5d839cbabe3517c9210a.tar.gz
hsbot-d05aea2def7374b1d08c5d839cbabe3517c9210a.tar.bz2
hsbot-d05aea2def7374b1d08c5d839cbabe3517c9210a.zip
Regressed from parsec3 to parsec2 to solve a cabal install weird dependency problem.
Diffstat (limited to 'HsbotIrcBot/Hsbot/Irc')
-rw-r--r--HsbotIrcBot/Hsbot/Irc/Message.hs12
1 files changed, 6 insertions, 6 deletions
diff --git a/HsbotIrcBot/Hsbot/Irc/Message.hs b/HsbotIrcBot/Hsbot/Irc/Message.hs
index 8ab23d8..4c14b4a 100644
--- a/HsbotIrcBot/Hsbot/Irc/Message.hs
+++ b/HsbotIrcBot/Hsbot/Irc/Message.hs
@@ -8,7 +8,7 @@ module Hsbot.Irc.Message
) where
import Control.Monad.Identity
-import Text.Parsec
+import Text.ParserCombinators.Parsec
-- | An IRC message
data IrcMsg = IrcMsg
@@ -35,7 +35,7 @@ data IrcBotMsg = InIrcMsg IrcMsg | OutIrcMsg IrcMsg | IntIrcCmd IrcCmd deriving
parseIrcMsg :: String -> Either ParseError IrcMsg
parseIrcMsg line = parse pMsg "" line
-pMsg :: ParsecT String u Identity IrcMsg
+--pMsg :: Parser String u Identity IrcMsg
pMsg = do
pfx <- optionMaybe pPrefix
cmd <- pCommand
@@ -44,20 +44,20 @@ pMsg = do
eof
return $ IrcMsg pfx cmd params
-pPrefix :: ParsecT String u Identity [Char]
+--pPrefix :: Parser String u Identity [Char]
pPrefix = do
_ <- char ':'
pfx <- many1 (noneOf " ")
_ <- space
return pfx
-pCommand :: ParsecT String u Identity [Char]
+--pCommand :: Parser String u Identity [Char]
pCommand = count 3 digit <|> many1 upper
-pLongParam :: ParsecT String u Identity [Char]
+--pLongParam :: Parser String u Identity [Char]
pLongParam = char ':' >> (many1 (noneOf "\r"))
-pShortParam :: ParsecT String u Identity [Char]
+--pShortParam :: Parser String u Identity [Char]
pShortParam = many1 (noneOf " \r")
-- | Serialize an IRC message to a string.