> "A.J. Bonnema" <[EMAIL PROTECTED]> writes:
> 
> > Why doesn't kdevelop generate code, that executes the statements in
> > order? Or should I be looking at ghc? Or is it an option I am missing?
> 
> GHCi behaves like Hugs.  My guess would be that kdevelop attaches
> pipes for standard input and output, and GHC or whatever backend it
> uses realizes it is not talking to a terminal, and applies buffering.

In other words - if kdevelop is supposed to support the use of interactive programs in 
its console window, it should allocate a pty, rather than just using ordinary Unix 
pipes.  I would consider this a bug.

The fix for now is for you to explicitly turn off buffering:

import IO

main = do hSetBuffering stdin LineBuffering
          hSetBuffering stdout NoBuffering
          hSetBuffering stderr NoBuffering
          ...

(warning: untested code)

--KW 8-)
-- 
Keith Wansbrough <[EMAIL PROTECTED]>
http://www.cl.cam.ac.uk/users/kw217/
University of Cambridge Computer Laboratory.

_______________________________________________
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell

Reply via email to