repositories
/
cloogle-irc.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
add nickserv and a cli. Fix #2
[cloogle-irc.git]
/
test.icl
diff --git
a/test.icl
b/test.icl
index
f402f99
..
4347744
100644
(file)
--- a/
test.icl
+++ b/
test.icl
@@
-1,12
+1,20
@@
module test
module test
-
-import gast
+import Gast
import IRC
import IRC
+import GenBimap
+import Data.Func
+import Data.Either
+
+import Text
-derive ggen IRCMessage
+derive ggen IRCMessage, Either, IRCUser, IRCCommand, Maybe, CSepList, IRCNumReply, IRCReplies
+derive genShow IRCMessage, Either, IRCUser, IRCCommand, Maybe, CSepList, IRCNumReply, IRCReplies
-Start = Test [] pParsePrint
+//Doesn't work, generates illegal irc commands with spaces in recipients
+Start = concat $ Test [] pParsePrint
pParsePrint :: IRCMessage -> Bool
pParsePrint :: IRCMessage -> Bool
-pParsePrint a = toString (parseIRCMessage (toString a)) == toString a
+pParsePrint a
+# str = toString a
+= either (const False) ((==)str o toString) $ parseIRCMessage str