You need to use curly braces in single-line do-expressions:
do { line <- getLine; putStrLn line } do { line <- getLine; putStrLn line }I guess there's something funky in the unicode handling on the site.