
31 Mar
2009
31 Mar
'09
4:42 p.m.
On Tue, Mar 31, 2009 at 12:53 PM, Andrew Coppin
Edward Kmett wrote:
You want to use:
main = do hSetBuffering stdin NoBuffering; c <- getChar
Already tried that. It appears to make no difference.
Sounds like you're on Windows, so it's probably this bug: http://hackage.haskell.org/trac/ghc/ticket/2189 Although: if you're trying to get at the arrow keys from the Windows cmd console, it's not possible by reading stdin; rather, you need to access the lower-level Win32 console APIs: http://msdn.microsoft.com/en-us/library/ms682073(VS.85).aspx Not sure if it will help, but you could take a look at what I did in Haskeline: http://code.haskell.org/haskeline/System/Console/Haskeline/Backend/Win32.hsc -Judah