unliftio-streams-0.1.1.1: Generalization of io-streams to MonadUnliftIO
Safe HaskellNone
LanguageHaskell2010

UnliftIO.Streams

Synopsis

Stream types

data InputStream a #

An InputStream generates values of type c in the IO monad.

Two primitive operations are defined on InputStream:

It is intended that InputStreams obey the following law:

unRead c stream >> read stream === return (Just c)

Instances

Instances details
BufferedIO (InputStream ByteString) 
Instance details

Defined in System.IO.Streams.Internal

BufferedIO (StreamPair ByteString) 
Instance details

Defined in System.IO.Streams.Internal

RawIO (InputStream ByteString) 
Instance details

Defined in System.IO.Streams.Internal

RawIO (StreamPair ByteString) 
Instance details

Defined in System.IO.Streams.Internal

IODevice (InputStream ByteString) 
Instance details

Defined in System.IO.Streams.Internal

IODevice (StreamPair ByteString) 
Instance details

Defined in System.IO.Streams.Internal

data OutputStream a #

An OutputStream consumes values of type c in the IO monad. The only primitive operation defined on OutputStream is:

Values of type c are written in an OutputStream by wrapping them in Just, and the end of the stream is indicated by supplying Nothing.

If you supply a value after a Nothing, the behavior is defined by the implementer of the given OutputStream. (All OutputStream definitions in this library will simply discard the extra input.)

Instances

Instances details
BufferedIO (OutputStream ByteString) 
Instance details

Defined in System.IO.Streams.Internal

BufferedIO (StreamPair ByteString) 
Instance details

Defined in System.IO.Streams.Internal

RawIO (OutputStream ByteString) 
Instance details

Defined in System.IO.Streams.Internal

RawIO (StreamPair ByteString) 
Instance details

Defined in System.IO.Streams.Internal

IODevice (OutputStream ByteString) 
Instance details

Defined in System.IO.Streams.Internal

IODevice (StreamPair ByteString) 
Instance details

Defined in System.IO.Streams.Internal

Creating streams

Primitive stream operations

unRead :: MonadUnliftIO m => a -> InputStream a -> m () Source #

write :: MonadUnliftIO m => Maybe a -> OutputStream a -> m () Source #

Utility streams

Batteries included