From d05aea2def7374b1d08c5d839cbabe3517c9210a Mon Sep 17 00:00:00 2001 From: Julien Dessaux Date: Sun, 10 Oct 2010 01:41:27 +0200 Subject: Regressed from parsec3 to parsec2 to solve a cabal install weird dependency problem. --- HsbotIrcBot/Hsbot/Irc/Message.hs | 12 ++++++------ HsbotIrcBot/hsbot-irc.cabal | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'HsbotIrcBot') 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. diff --git a/HsbotIrcBot/hsbot-irc.cabal b/HsbotIrcBot/hsbot-irc.cabal index c170d53..d1f98ee 100644 --- a/HsbotIrcBot/hsbot-irc.cabal +++ b/HsbotIrcBot/hsbot-irc.cabal @@ -29,7 +29,7 @@ Executable hsbot-irc MissingH, mtl, network, - parsec >= 3, + parsec, random, text, time, -- cgit v1.2.3