
23 Oct
2006
23 Oct
'06
9:14 p.m.
Donald Bruce Stewart wrote:
briqueabraque:
Hi,
How can I read a single character from standard output? I would like the user to press a single key and the reading function return imediately after that key is pressed.
so you want a function of type: IO Char
asking Hoogle (http://haskell.org/hoogle) we get: Prelude. getChar :: IO Char IO. hGetChar :: Handle -> IO Char
-- Don
getChar doesn't return until I press Enter. I need something that returns immediately after I press any key. Thanks, Maurício