Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Branch: redesign
Fetching contributors…

Cannot retrieve contributors at this time

27 lines (20 sloc) 0.613 kB
module Tools where
import Char (toUpper, toLower)
import System.IO (hFlush, stdout, IO(..))
import Control.Monad.State (liftIO, MonadIO(..))
import Types
upString :: String -> String
upString = map toUpper
capitalize :: String -> String
capitalize = unwords . map capitalize' . words
where capitalize' (x:xs) = (toUpper x) : map toLower xs
inputStrCommand :: IO String
inputStrCommand = do
putStr "> " -- Êîä âçÿò èç Advgame.
hFlush stdout
line <- getLine
return (line)
ioOutMsgGS :: String -> GS ()
ioOutMsgGS = liftIO . putStrLn
ioInMsgGS :: GS String
ioInMsgGS = liftIO inputStrCommand
Jump to Line
Something went wrong with that request. Please try again.