I've just stumbled upon a thing I don't understand.
If I am using GHCi and use getLine
I get the following
Prelude> a <- getLine
Test<Backspace>oo<CR> -- the Backspace action results in a '^?'
Prelude> a
"Test\DELoo"
If I write the same in a Haskell file
module Main where
main :: IO ()
main = do a <- getLine
putStrLn a
and run the script with runhaskell and enter the same input, the backspace deletes the 't' as expected.
Why is there a difference?