lazy-io-streams- Get lazy with your io-streams

Safe HaskellNone



This module provides some arguably evil functions for turning your nice io-streams into lazy lists.



toLazyList :: InputStream a -> IO [a] Source #

Convert an input stream into a lazy list.

lazyListOutput :: IO (OutputStream a, [a]) Source #

Create an output stream and a lazy list that contains the values that you feed into that output stream. Make sure you evaluate the list in a separate thread to the one you write to the stream in.

toLazyByteString :: InputStream ByteString -> IO ByteString Source #

Convert an input stream of strict ByteStrings to a lazy ByteString.

lazyByteStringOutput :: IO (OutputStream ByteString, ByteString) Source #

Create a lazy ByteString by feeding an OutputStream strict ByteStrings