I was hoping that hSetBuffering would turn off the line buffering for stdin, but it doesn't seem to work.
 
----
module Main where
import System.IO
 
main :: IO ()
main = do
    hSetBuffering stdin NoBuffering
    hSetBuffering stdout NoBuffering
   
    hPutChar stdout '>'
    c <- hGetChar stdin
    hPutChar stdout '<'
----
 
This program should terminate immediately after the first character is typed into the terminal, but it waits until I type a newline.  It also looks like it's using GNU readline (it handles the up & down arrow keys.)
 
How do I turn this off and use raw character-based IO?  I'm using GHC6.6 on Win32 if that makes a difference.
 
  -- ryan