[Haskell-cafe] Re: process

h. h._h._h._ at hotmail.com
Fri Feb 23 14:20:44 EST 2007


Albert Y. C. Lai <trebla <at> vex.net> writes:

> 
> h. wrote:
> > module Main where
> > main :: IO ()
> > main = f
> >   where
> >   f = do
> >     a <- getLine
> >     if a == "quit" then return () else putStrLn a >> f
> 
> This one also needs to switch to line buffering. Add/Change:
> 
> import System.IO(stdout, hSetBuffering, BufferMode(LineBuffering))
> main = hSetBuffering stdout LineBuffering >> f
> 


Thanks a lot, now it does work!
This means just the proc1 program has to be changed and everything will work 
properly (hopefully - at least the haskell part works :) ).




More information about the Haskell-Cafe mailing list