[Haskell-cafe] Character I/O

Judah Jacobson judah.jacobson at gmail.com
Tue Mar 31 16:42:57 EDT 2009

On Tue, Mar 31, 2009 at 12:53 PM, Andrew Coppin
<andrewcoppin at btinternet.com> wrote:
> 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:


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:


Not sure if it will help, but you could take a look at what I did in Haskeline:



More information about the Haskell-Cafe mailing list