A Consumer
can only await
values from upstream.
type Consumer a = Proxy () a () X
await :: Monad m => Consumer a m a
For example:
fancyPrint :: MonadIO m => Consumer String m ()
fancyPrint = forever $ do
numStr <- await
liftIO $ putStrLn ("I received: " ++ numStr)