gameServer/Utils.hs
changeset 4921 2efad3acbb74
parent 4904 0eab727d4717
child 4932 f11d80bac7ed
equal deleted inserted replaced
4920:bc3c077e15a2 4921:2efad3acbb74
   105             (34, "0.9.15-dev"),
   105             (34, "0.9.15-dev"),
   106             (35, "0.9.14.1"),
   106             (35, "0.9.14.1"),
   107             (37, "0.9.15"),
   107             (37, "0.9.15"),
   108             (38, "0.9.16-dev")]
   108             (38, "0.9.16-dev")]
   109 
   109 
   110 askFromConsole :: String -> IO String
   110 askFromConsole :: B.ByteString -> IO B.ByteString
   111 askFromConsole msg = do
   111 askFromConsole msg = do
   112     putStr msg
   112     B.putStr msg
   113     hFlush stdout
   113     hFlush stdout
   114     getLine
   114     B.getLine
   115 
   115 
   116 
   116 
   117 unfoldrE :: (b -> Either b (a, b)) -> b -> ([a], b)
   117 unfoldrE :: (b -> Either b (a, b)) -> b -> ([a], b)
   118 unfoldrE f b  =
   118 unfoldrE f b  =
   119     case f b of
   119     case f b of