words package:io-streams

Splits a bytestring InputStream into words. See splitOn and words. Example:
ghci> is <- Streams.fromList ["Hello, world!"] >>= Streams.words
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 words.
Intersperses string chunks sent to the given OutputStream with spaces. See intersperse and unwords.
ghci> os <- Streams.unwords Streams.stdout
ghci> forM_ [Just "Hello,", Nothing, Just "world!\n"] $ w -> Streams.write w os
Hello, world!