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.
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!