module test
-from Data.Func import $
-import Data.Either
-import Data.Maybe
-import StdEnv
+
+import gast
import IRC
-from Text import class Text(concat), instance Text String
+derive ggen IRCMessage
+
+Start = Test [] pParsePrint
-Start = concat $ map toString
- [NICK "clooglebot" Nothing
- ,USER "cloogle" "0" "cloogle" "Cloogle bot"
- ,JOIN (CSepList ["#cloogle"]) Nothing
- ,PRIVMSG (CSepList ["#cloogle"]) "Hello world"
- ,QUIT Nothing
- ]
+pParsePrint :: IRCMessage -> Bool
+pParsePrint a = toString (parseIRCMessage (toString a)) == toString a