X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=GHC%2FIOBase.lhs;h=f0ce8de3a12de4ccb68dc1c9f0221c14a6063d3d;hb=3b7854b611293af35a1d69dbc9761b973462d8b3;hp=0a3cfcac303ef3f71c603730e0e0b912856545dc;hpb=e0bafa79619596dcb677f50c7163423141b0a823;p=ghc-base.git diff --git a/GHC/IOBase.lhs b/GHC/IOBase.lhs index 0a3cfca..f0ce8de 100644 --- a/GHC/IOBase.lhs +++ b/GHC/IOBase.lhs @@ -30,7 +30,7 @@ module GHC.IOBase( -- Handles, file descriptors, FilePath, Handle(..), Handle__(..), HandleType(..), IOMode(..), FD, - isReadableHandleType, isWritableHandleType, showHandle, + isReadableHandleType, isWritableHandleType, isReadWriteHandleType, showHandle, -- Buffers Buffer(..), RawBuffer, BufferState(..), BufferList(..), BufferMode(..), @@ -423,6 +423,9 @@ isWritableHandleType WriteHandle = True isWritableHandleType ReadWriteHandle = True isWritableHandleType _ = False +isReadWriteHandleType ReadWriteHandle{} = True +isReadWriteHandleType _ = False + -- | File and directory names are values of type 'String', whose precise -- meaning is operating system dependent. Files can be opened, yielding a -- handle which can then be used to operate on the contents of that file.