aboutsummaryrefslogtreecommitdiffstats
path: root/src/Reaktor/Parser.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Reaktor/Parser.hs')
-rw-r--r--src/Reaktor/Parser.hs9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/Reaktor/Parser.hs b/src/Reaktor/Parser.hs
index f226ad5..6fbcce9 100644
--- a/src/Reaktor/Parser.hs
+++ b/src/Reaktor/Parser.hs
@@ -1,11 +1,13 @@
{-# LANGUAGE OverloadedStrings #-}
module Reaktor.Parser where
-import Prelude.Extended
import Control.Applicative
import Data.Attoparsec.Text
import qualified Data.Char
+import Data.String.Conversions (convertString)
import qualified Data.Text.Extended as T
+import Prelude.Extended
+import Reaktor.IRC
import Reaktor.Internal
@@ -13,8 +15,9 @@ prefix :: Parser Text
prefix = T.pack <$> many (satisfy Data.Char.isAlphaNum <|>
satisfy (flip elem (":.-@/!~[]\\`_^{|}" :: String)))
-command :: Parser Text
-command = T.pack <$> many1 (satisfy Data.Char.isAlphaNum)
+command :: Parser Command
+command =
+ convertString . T.pack <$> many1 (satisfy Data.Char.isAlphaNum)
nospcrlfcl :: Parser Char
nospcrlfcl =