module Main where
import Text.PrettyPrint.HughesPJ
import Data.Tree
data HWProtocol = Command String [CmdParam]
data CmdParam = Skip
| SS
| LS
| IntP
| Many [CmdParam]
data ClientStates = NotConnected
| JustConnected
| ServerAuth
| Lobby
cmd = Command
cmd1 s p = Command s [p]
cmd2 s p1 p2 = Command s [p1, p2]
commands = [
cmd "CONNECTED" [Skip, IntP]
, cmd1 "NICK" SS
, cmd1 "PROTO" IntP
, cmd1 "ASKPASSWORD" SS
, cmd1 "SERVER_AUTH" SS
, cmd1 "LOBBY:JOINED" $ Many [SS]
]
pas =
main = putStrLn $ render pas