#if __GLASGOW_HASKELL__ >= 704
#endif
module Data.ByteString.ExplicitIOModes
( hGetLine
, hGetContents
, hGet
#if MIN_VERSION_bytestring(0,9,1)
, hGetSome
#endif
, hGetNonBlocking
, hPut
#if MIN_VERSION_bytestring(0,9,2)
, hPutNonBlocking
#endif
, hPutStr
) where
import Data.Int ( Int )
import System.IO ( IO )
import Data.ByteString ( ByteString )
import qualified Data.ByteString as B ( hGetLine
, hGetContents
, hGet
#if MIN_VERSION_bytestring(0,9,1)
, hGetSome
#endif
, hGetNonBlocking
, hPut
#if MIN_VERSION_bytestring(0,9,2)
, hPutNonBlocking
#endif
, hPutStr
)
import System.IO.ExplicitIOModes ( Handle, ReadModes, WriteModes )
import System.IO.ExplicitIOModes.Unsafe ( wrap, wrap2 )
hGetLine ∷ ReadModes ioMode ⇒ Handle ioMode → IO ByteString
hGetLine = wrap B.hGetLine
hGetContents ∷ ReadModes ioMode ⇒ Handle ioMode → IO ByteString
hGetContents = wrap B.hGetContents
hGet ∷ ReadModes ioMode ⇒ Handle ioMode → Int → IO ByteString
hGet = wrap2 B.hGet
#if MIN_VERSION_bytestring(0,9,1)
hGetSome ∷ ReadModes ioMode ⇒ Handle ioMode → Int → IO ByteString
hGetSome = wrap2 B.hGetSome
#endif
hGetNonBlocking ∷ ReadModes ioMode ⇒ Handle ioMode → Int → IO ByteString
hGetNonBlocking = wrap2 B.hGetNonBlocking
hPut ∷ WriteModes ioMode ⇒ Handle ioMode → ByteString → IO ()
hPut = wrap2 B.hPut
#if MIN_VERSION_bytestring(0,9,2)
hPutNonBlocking ∷ WriteModes ioMode ⇒ Handle ioMode → ByteString → IO ByteString
hPutNonBlocking = wrap2 B.hPutNonBlocking
#endif
hPutStr ∷ WriteModes ioMode ⇒ Handle ioMode → ByteString → IO ()
hPutStr = wrap2 B.hPutStr