unlines package:io-streams

Intersperses string chunks sent to the given OutputStream with newlines. See intersperse and unlines.
ghci> os <- Streams.unlines Streams.stdout
ghci> Streams.write (Just "Hello,") os
Hello
ghci> Streams.write Nothing os
ghci> Streams.write (Just "world!") os
world!