
23 Feb
2007
23 Feb
'07
2:20 p.m.
Albert Y. C. Lai
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 :) ).