lines package:io-streams

Splits a bytestring InputStream into lines. See splitOn and lines. Example:
ghci> is <- Streams.fromList ["Hello,\n world!"] >>= Streams.lines
ghci> replicateM 3 (Streams.read is)
[Just "Hello", Just ", world!", Nothing]
Note that this may increase the chunk size if the input contains extremely long lines.
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!