I am in chapter 9.6 of the book Programming in Haskell, page 91. It is assumed that the function writeatshould write the given string at the given location on the command line, but this does not work for me.
type Pos = (Int, Int)
goto :: Pos -> IO ()
goto (x, y) = putStr ("\ESC[" ++ show y ++ ";" ++ show x ++ "H")
writeat :: Pos -> String -> IO ()
writeat p xs = do
goto p
putStr xs
But he does not do what the book says. Is it because I'm on Windows? If so, is there a workaround?
source
share