lazy-io-streams-0.1.0.0: Get lazy with your io-streams

Safe HaskellNone
LanguageHaskell2010

System.IO.Streams.Lazy

Description

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

Synopsis

Documentation

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