module System.IO.Strict
(
SIO,
run,
return',
getContents,
hGetContents,
readFile,
read,
readLn,
fix,
withBinaryFile,
withFile,
appendFile,
getChar,
getLine,
hPrint,
hPutStrLn,
hReady,
interact,
openBinaryTempFile,
openTempFile,
print,
putChar,
putStr,
putStrLn,
writeFile,
hClose,
hFileSize,
hFlush,
hGetBuf,
hGetBufNonBlocking,
hGetBuffering,
hGetChar,
hGetEcho,
hGetLine,
hGetPosn,
hIsClosed,
hIsEOF,
hIsOpen,
hIsReadable,
hIsSeekable,
hIsTerminalDevice,
hIsWritable,
hLookAhead,
hPutBuf,
hPutBufNonBlocking,
hPutChar,
hPutStr,
hSeek,
hSetBinaryMode,
hSetBuffering,
hSetEcho,
hSetFileSize,
hSetPosn,
hShow,
hTell,
hWaitForInput,
isEOF,
openBinaryFile,
openFile,
stderr,
stdin,
stdout
)
where
import Prelude (Bool, Int, Integer, String, Char, FilePath, Read, Show, (.))
import Control.DeepSeq (NFData(..))
import System.IO (IOMode, Handle, BufferMode, HandlePosn, SeekMode)
import GHC.Ptr (Ptr)
import System.IO.Strict.Internals (SIO, wrap0, wrap0', wrap1, wrap1', wrap2, wrap3, run, return')
import qualified System.IO.Strict.Internals as SIO
import qualified System.IO as IO
getContents :: SIO String
getContents = wrap0' IO.getContents
hGetContents :: Handle -> SIO String
hGetContents = wrap1' IO.hGetContents
withBinaryFile :: NFData sr => FilePath -> IOMode -> (Handle -> SIO sr) -> SIO sr
withBinaryFile fp mode kont = wrap0' (IO.withBinaryFile fp mode (SIO.run . kont))
withFile :: NFData sr => FilePath -> IOMode -> (Handle -> SIO sr) -> SIO sr
withFile fp mode kont = wrap0' (IO.withFile fp mode (SIO.run . kont))
fix :: NFData sa => (sa -> SIO sa) -> SIO sa
fix kont = wrap0' (IO.fixIO (SIO.run . kont))
readFile :: FilePath -> SIO String
readFile = wrap1' IO.readFile
read :: (NFData sa, Read sa) => String -> SIO sa
read = wrap1' IO.readIO
readLn :: (NFData sa, Read sa) => SIO sa
readLn = wrap0' IO.readLn
getChar :: SIO Char
getChar = wrap0 IO.getChar
appendFile :: FilePath -> String -> SIO ()
appendFile = wrap2 IO.appendFile
getLine :: SIO String
getLine = wrap0 IO.getLine
hPrint :: (Show a) => Handle -> a -> SIO ()
hPrint = wrap2 IO.hPrint
hPutStrLn :: Handle -> String -> SIO ()
hPutStrLn = wrap2 IO.hPutStrLn
hReady :: Handle -> SIO Bool
hReady = wrap1 IO.hReady
interact :: (String -> String) -> SIO ()
interact = wrap1 IO.interact
openBinaryTempFile :: FilePath -> String -> SIO (FilePath, Handle)
openBinaryTempFile = wrap2 IO.openBinaryTempFile
openTempFile :: FilePath -> String -> SIO (FilePath, Handle)
openTempFile = wrap2 IO.openTempFile
print :: (Show a) => a -> SIO ()
print = wrap1 IO.print
putChar :: Char -> SIO ()
putChar = wrap1 IO.putChar
putStr :: String -> SIO ()
putStr = wrap1 IO.putStr
putStrLn :: String -> SIO ()
putStrLn = wrap1 IO.putStrLn
writeFile :: FilePath -> String -> SIO ()
writeFile = wrap2 IO.writeFile
hClose :: Handle -> SIO ()
hClose = wrap1 IO.hClose
hFileSize :: Handle -> SIO Integer
hFileSize = wrap1 IO.hFileSize
hFlush :: Handle -> SIO ()
hFlush = wrap1 IO.hFlush
hGetBuf :: Handle -> Ptr a -> Int -> SIO Int
hGetBuf = wrap3 IO.hGetBuf
hGetBufNonBlocking :: Handle -> Ptr a -> Int -> SIO Int
hGetBufNonBlocking = wrap3 IO.hGetBufNonBlocking
hGetBuffering :: Handle -> SIO BufferMode
hGetBuffering = wrap1 IO.hGetBuffering
hGetChar :: Handle -> SIO Char
hGetChar = wrap1 IO.hGetChar
hGetEcho :: Handle -> SIO Bool
hGetEcho = wrap1 IO.hGetEcho
hGetLine :: Handle -> SIO String
hGetLine = wrap1 IO.hGetLine
hGetPosn :: Handle -> SIO HandlePosn
hGetPosn = wrap1 IO.hGetPosn
hIsClosed :: Handle -> SIO Bool
hIsClosed = wrap1 IO.hIsClosed
hIsEOF :: Handle -> SIO Bool
hIsEOF = wrap1 IO.hIsEOF
hIsOpen :: Handle -> SIO Bool
hIsOpen = wrap1 IO.hIsOpen
hIsReadable :: Handle -> SIO Bool
hIsReadable = wrap1 IO.hIsReadable
hIsSeekable :: Handle -> SIO Bool
hIsSeekable = wrap1 IO.hIsSeekable
hIsTerminalDevice :: Handle -> SIO Bool
hIsTerminalDevice = wrap1 IO.hIsTerminalDevice
hIsWritable :: Handle -> SIO Bool
hIsWritable = wrap1 IO.hIsWritable
hLookAhead :: Handle -> SIO Char
hLookAhead = wrap1 IO.hLookAhead
hPutBuf :: Handle -> Ptr a -> Int -> SIO ()
hPutBuf = wrap3 IO.hPutBuf
hPutBufNonBlocking :: Handle -> Ptr a -> Int -> SIO Int
hPutBufNonBlocking = wrap3 IO.hPutBufNonBlocking
hPutChar :: Handle -> Char -> SIO ()
hPutChar = wrap2 IO.hPutChar
hPutStr :: Handle -> String -> SIO ()
hPutStr = wrap2 IO.hPutStr
hSeek :: Handle -> SeekMode -> Integer -> SIO ()
hSeek = wrap3 IO.hSeek
hSetBinaryMode :: Handle -> Bool -> SIO ()
hSetBinaryMode = wrap2 IO.hSetBinaryMode
hSetBuffering :: Handle -> BufferMode -> SIO ()
hSetBuffering = wrap2 IO.hSetBuffering
hSetEcho :: Handle -> Bool -> SIO ()
hSetEcho = wrap2 IO.hSetEcho
hSetFileSize :: Handle -> Integer -> SIO ()
hSetFileSize = wrap2 IO.hSetFileSize
hSetPosn :: HandlePosn -> SIO ()
hSetPosn = wrap1 IO.hSetPosn
hShow :: Handle -> SIO String
hShow = wrap1 IO.hShow
hTell :: Handle -> SIO Integer
hTell = wrap1 IO.hTell
hWaitForInput :: Handle -> Int -> SIO Bool
hWaitForInput = wrap2 IO.hWaitForInput
isEOF :: SIO Bool
isEOF = wrap0 IO.isEOF
openBinaryFile :: FilePath -> IOMode -> SIO Handle
openBinaryFile = wrap2 IO.openBinaryFile
openFile :: FilePath -> IOMode -> SIO Handle
openFile = wrap2 IO.openFile
stderr :: Handle
stderr = IO.stderr
stdin :: Handle
stdin = IO.stdin
stdout :: Handle
stdout = IO.stdout