but uses the system encoding and has other nice @Data.Text.IO@ features
-}
-fromHandle :: MonadIO m => IO.Handle -> Producer Text m ()
+fromHandle :: MonadIO m => IO.Handle -> Producer' Text m ()
fromHandle h = go where
go = do txt <- liftIO (T.hGetChunk h)
if T.null txt then return ()
{-# INLINABLE fromHandle#-}
-- | Stream text from 'stdin'
-stdin :: MonadIO m => Producer Text m ()
+stdin :: MonadIO m => Producer' Text m ()
stdin = fromHandle IO.stdin
{-# INLINE stdin #-}
MAIN = PUTSTRLN "HELLO WORLD"
-}
-readFile :: MonadSafe m => FilePath -> Producer Text m ()
+readFile :: MonadSafe m => FilePath -> Producer' Text m ()
readFile file = Safe.withFile file IO.ReadMode fromHandle
{-# INLINE readFile #-}