1 2 3 4 5 6 7 8 9 10 11 12
main = do x <- readNum if x == 42 then putStr("") else do putStr (show (x) ++ "\n") main where readNum :: IO Integer readNum = do line <- getLine readIO line
1 2
Program error: <stdin>: IO.hGetChar: end of file (end of file)