Skip to content

Instantly share code, notes, and snippets.

@nnabeyang
Created January 13, 2014 07:13
Show Gist options
  • Select an option

  • Save nnabeyang/8395900 to your computer and use it in GitHub Desktop.

Select an option

Save nnabeyang/8395900 to your computer and use it in GitHub Desktop.
『プログラミングHaskell』の電卓をWindowsでも動くようにする ref: http://qiita.com/nnabeyang/items/994d4fcf44a10b72445e
> 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