# Streaming IO

# Streaming IO

io-streams (opens new window) is Stream-based library that focuses on the Stream abstraction but for IO. It exposes two types:

  • `InputStream`: a read-only smart handle
  • `OutputStream`: a write-only smart handle
  • We can create a stream with makeInputStream :: IO (Maybe a) -> IO (InputStream a) (opens new window). Reading from a stream is performed using read :: InputStream a -> IO (Maybe a) (opens new window), where Nothing denotes an EOF: