Generic parsing and printing
[cloogle-irc.git] / GenIRC.dcl
diff --git a/GenIRC.dcl b/GenIRC.dcl
new file mode 100644 (file)
index 0000000..896362d
--- /dev/null
@@ -0,0 +1,12 @@
+definition module GenIRC
+
+from IRC import :: IRCCommand, :: CSepList
+from Data.Either import :: Either
+from Data.Maybe import :: Maybe
+from Text.Parsers.Simple.Core import :: Error
+
+generic gIRCParse a :: [String] -> (Either Error a, [String])
+generic gIRCPrint a :: a -> [String]
+
+derive gIRCParse IRCCommand, String, Int, Maybe, (,), [], CSepList
+derive gIRCPrint IRCCommand, String, Int, Maybe, (,), [], CSepList