diff --git a/src/Data/Text/IO.hs b/src/Data/Text/IO.hs index dc71b824..cdfb6dc8 100644 --- a/src/Data/Text/IO.hs +++ b/src/Data/Text/IO.hs @@ -188,10 +188,10 @@ hPutStr h t = do case buffer_mode of _ | nl == LF && isUTF8 -> B.hPutStr h $ encodeUtf8 t (NoBuffering, _) -> hPutChars h str - (LineBuffering, bufC) -> writeLines h nl bufC str - (BlockBuffering _, bufC) - | nl == CRLF -> writeBlocksCRLF h bufC str - | otherwise -> writeBlocksRaw h bufC str + (LineBuffering, buf) -> writeLines h nl buf str + (BlockBuffering _, buf) + | nl == CRLF -> writeBlocksCRLF h buf str + | otherwise -> writeBlocksRaw h buf str hPutChars :: Handle -> Stream Char -> IO () hPutChars h (Stream next0 s0 _len) = loop s0