{-# LANGUAGE Trustworthy #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE CPP #-}
module GHC.IO.StdHandles
(
stdin, stdout, stderr,
openFile, openBinaryFile, openFileBlocking
) where
import GHC.IO
import GHC.IO.IOMode
import GHC.IO.Handle.Types
import qualified GHC.IO.Handle.FD as POSIX
#if defined(mingw32_HOST_OS)
import GHC.IO.SubSystem
import qualified GHC.IO.Handle.Windows as Win
stdin :: Handle
stdin = POSIX.stdin <!> Win.stdin
stdout :: Handle
stdout = POSIX.stdout <!> Win.stdout
stderr :: Handle
stderr = POSIX.stderr <!> Win.stderr
openFile :: FilePath -> IOMode -> IO Handle
openFile = POSIX.openFile <!> Win.openFile
openBinaryFile :: FilePath -> IOMode -> IO Handle
openBinaryFile = POSIX.openBinaryFile <!> Win.openBinaryFile
openFileBlocking :: FilePath -> IOMode -> IO Handle
openFileBlocking = POSIX.openFileBlocking <!> Win.openFileBlocking
#else
stdin :: Handle
stdin :: Handle
stdin = Handle
POSIX.stdin
stdout :: Handle
stdout :: Handle
stdout = Handle
POSIX.stdout
stderr :: Handle
stderr :: Handle
stderr = Handle
POSIX.stderr
openFile :: FilePath -> IOMode -> IO Handle
openFile :: FilePath -> IOMode -> IO Handle
openFile = FilePath -> IOMode -> IO Handle
POSIX.openFile
openBinaryFile :: FilePath -> IOMode -> IO Handle
openBinaryFile :: FilePath -> IOMode -> IO Handle
openBinaryFile = FilePath -> IOMode -> IO Handle
POSIX.openBinaryFile
openFileBlocking :: FilePath -> IOMode -> IO Handle
openFileBlocking :: FilePath -> IOMode -> IO Handle
openFileBlocking = FilePath -> IOMode -> IO Handle
POSIX.openFileBlocking
#endif