Read an IORef (Maybe a) or a similar device until it reads Nothing.
reread provides convenient exit from the io-streams library
reread readIORef :: IORef (Maybe a) -> Stream (Of a) IO ()
reread Streams.read :: System.IO.Streams.InputStream a -> Stream (Of a) IO ()