4 hSetBuffering stdout NoBuffering
5 putStr "Enter an integer: "
7 putStr "Enter another integer: "
9 putStr ("Their sum is " ++ show (read x1 + read x2 :: Int) ++ "\n")
13 if eof then return [] else do
15 if c `elem` ['\n','\r']
17 else do cs <- readLine