#3009: ghci-6.10.1 has odd buffering behavior
--------------------+-------------------------------------------------------
Reporter: judahj | Owner:
Type: bug | Status: new
Priority: normal | Component: GHCi
Version: 6.10.1 | Severity: normal
Keywords: | Testcase:
Os: MacOS X | Architecture: x86
--------------------+-------------------------------------------------------
In ghci-6.10.1:
{{{
Prelude> :m +System.IO
Prelude System.IO> hGetBuffering stdin
NoBuffering
Prelude System.IO> getChar
asdf
'a'
Prelude System.IO> sdf
<interactive>:1:0: Not in scope: `sdf'
Prelude System.IO>
}}}
That is, even though stdin is supposed to be unbuffered, getChar doesn't
return until {{{'\n'}}} is entered.
The above works correctly in ghci-6.8.3.
Also, manually setting the buffering in ghci-6.10.1 works, but only for
the duration of one statement:
{{{
Prelude System.IO> hSetBuffering stdin NoBuffering >> getChar
a'a'
Prelude System.IO> getChar
asdf
'a'
Prelude System.IO> sdf
<interactive>:1:0: Not in scope: `sdf'
Prelude System.IO>
}}}
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/3009>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs