reading in ghci-6-4-branch
Bernard Pope
bjpop at cs.mu.OZ.AU
Wed Jun 22 03:34:31 EDT 2005
On Wed, 2005-06-22 at 11:04 +0400, Serge D. Mechveliani wrote:
> Who knows, please, how to work with the program of
>
>
> main = interact (\ s -> shows (read s :: Bool) "\n")
>
> Is this a GHC bug?
>
> Regards,
Hi Serge,
Generally speaking differences that you see between the interactive
behaviour of ghci and ghc are due to buffering. By default ghci uses no
buffering on stdin and ghc uses line buffering.
To get what you want, use hSetBuffering stdin LineBuffering
Cheers,
Bernie.
More information about the Glasgow-haskell-bugs
mailing list