X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=GHC%2FIO%2FHandle%2FText.hs;h=754be0285abc91a4eb8dc4ed9ac204088b599d72;hb=ee7be4593b1b17d4ef45c37963b8b19d53865ab6;hp=d9e967267b138513ccd0256ee2a6700ad9a4b743;hpb=95ff1b673ad261f3fde2c1f89dd987b2a638dc78;p=ghc-base.git diff --git a/GHC/IO/Handle/Text.hs b/GHC/IO/Handle/Text.hs index d9e9672..754be02 100644 --- a/GHC/IO/Handle/Text.hs +++ b/GHC/IO/Handle/Text.hs @@ -680,6 +680,9 @@ commitBuffer' raw sz@(I# _) count@(I# _) flush release -- 'hPutBuf' ignores any text encoding that applies to the 'Handle', -- writing the bytes directly to the underlying file or device. -- +-- 'hPutBuf' ignores the prevailing 'TextEncoding' and +-- 'NewlineMode' on the 'Handle', and writes bytes directly. +-- -- This operation may fail with: -- -- * 'ResourceVanished' if the handle is a pipe or socket, and the @@ -784,6 +787,8 @@ writeChunkNonBlocking h_@Handle__{..} ptr bytes -- If the handle is a pipe or socket, and the writing end -- is closed, 'hGetBuf' will behave as if EOF was reached. -- +-- 'hGetBuf' ignores the prevailing 'TextEncoding' and 'NewlineMode' +-- on the 'Handle', and reads bytes directly. hGetBuf :: Handle -> Ptr a -> Int -> IO Int hGetBuf h ptr count @@ -868,6 +873,9 @@ readChunk h_@Handle__{..} ptr bytes -- If the handle is a pipe or socket, and the writing end -- is closed, 'hGetBufNonBlocking' will behave as if EOF was reached. -- +-- 'hGetBufNonBlocking' ignores the prevailing 'TextEncoding' and +-- 'NewlineMode' on the 'Handle', and reads bytes directly. + hGetBufNonBlocking :: Handle -> Ptr a -> Int -> IO Int hGetBufNonBlocking h ptr count | count == 0 = return 0