[Haskell-cafe] getChar (NoBuffering) not working on Windows
fa-ml at ariis.it
Tue Jul 18 18:29:27 UTC 2017
I am writing a small console application.
Today I was bitten by #2189  ("hSetBuffering stdin NoBuffering doesn't
work on Windows"). To reproduce:
main :: IO ()
main = hSetBuffering stdin NoBuffering >>
getChar >>= putChar
-- on linux you just need to press, say, 'c', on Win you
-- need to press <Enter> too.
Is there any sensible (cross-platform) way of working around this?
More information about the Haskell-Cafe