Created
January 13, 2014 07:13
-
-
Save nnabeyang/8395900 to your computer and use it in GitHub Desktop.
『プログラミングHaskell』の電卓をWindowsでも動くようにする ref: http://qiita.com/nnabeyang/items/994d4fcf44a10b72445e
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| > import System.Console.ANSI | |
| > | |
| > cls :: IO () | |
| > -- cls = putStr "\ESC[2J" | |
| > cls = clearScreen | |
| > | |
| > type Pos = (Int,Int) | |
| > | |
| > goto :: Pos -> IO () | |
| > --goto (x,y) = putStr ("\ESC[" ++ show y ++ ";" ++ show x ++ "H") | |
| > goto (x, y) = setCursorPosition y x |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment