jepalomar23:
> Hi,
> I am newbie in Haskell and do not understand why the interpreted mode
> differs from the compiled program.
> I run this code
> main = do
> putStr "line1"
> x<-getLine
> putStr "line2"
> y<-getLine
> return (x++y)
>
> either un
The problem is most likely that line-buffered (or possibly
block-buffered) IO is turned on, which means that buffers will only
automatically be flushed to the display at the ends of lines. You can
fix it by importing System.IO, and either calling (hFlush stdout)
explicitly, or by calling (hSetBuff
Hi,
I am newbie in Haskell and do not understand why the interpreted mode
differs from the compiled program.
I run this code
main = do
putStr "line1"
x<-getLine
putStr "line2"
y<-getLine
return (x++y)
either under runhugs or runghc or in a console