RE: Help with Exceptions on I/O

2003-08-14 Thread Brandon Michael Moore
You don't really need to change the buffering mode. stdout is line buffered by default, so you just need to make sure a newline is printed after your message. putStrLn adds a newline after the string it prints, or you could use \n in the string literal. Try this: main = do --lots of code goes

RE: Help with Exceptions on I/O

2003-08-14 Thread Hal Daume
you can write this a bit more simply as: main = do (do do-the-major stuff here putStr File created...) `catch` (\_ - show the error) getLine-- look ma, no - return () now, your problem is almost certainly with buffering. in the main do, put hSetBuffering stdout