logo       

Re: reading in ghci-6-4-branch: msg#00055

lang.haskell.glasgow.bugs

Subject: Re: reading in ghci-6-4-branch

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.


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise