Why are these characters printing at the start of putStrLn
I am trying to understand the Tic Tac Toe game code from Programming In Haskell by G. Hutton. The code is in the file tictactoe.hs. On Windows it generates these characters (←[2J←[1;1H) at the beginning of displaying the game grid. It doesn't happen on Ubuntu.
←[2J←[1;1H | |
| |
| |
-----------
| |
| |
| |
-----------
| |
| |
| |
It seems to occur in this function
putGrid :: Grid -> IO ()
putGrid =
putStrLn . unlines . concat . interleave bar . map showRow
where bar = [replicate ((size*4)-1) '-']
Full code for the game is available here https://www.cs.nott.ac.uk/~pszgmh/pih.html