module System.Process.ByteString where
#if __GLASGOW_HASKELL__ <= 709
import Control.Applicative ((<$>))
#endif
import Control.Monad
import Data.ByteString (ByteString)
import Data.ListLike.IO (hGetContents)
import Data.Word (Word8)
import Prelude hiding (null)
import System.Process
import System.Process.Common
import System.Exit (ExitCode)
#if !MIN_VERSION_bytestring(0,10,0)
import Control.DeepSeq (NFData)
instance NFData ByteString
#endif
instance ListLikeProcessIO ByteString Word8 where
forceOutput = return
readChunks h = (: []) <$> hGetContents h
readProcessWithExitCode
:: FilePath
-> [String]
-> ByteString
-> IO (ExitCode, ByteString, ByteString)
readProcessWithExitCode = System.Process.Common.readProcessWithExitCode
readCreateProcessWithExitCode
:: CreateProcess
-> ByteString
-> IO (ExitCode, ByteString, ByteString)
readCreateProcessWithExitCode = System.Process.Common.readCreateProcessWithExitCode