{-# GHC_PRAGMA INTERFACE VERSION 5 #-} interface PreludeIO where import PreludeBuiltin(Char(..), Int(..), Integer(..), List(..), Tuple0, Tuple2, _Addr(..), _RealWorld(..), _State(..)) import PreludeCore(Bool(..), Eq(..), Ord(..), Text(..)) import PreludeIOError(IOError13(..)) import PreludeMonadicIO((>>), (>>=), Either(..), IO(..), accumulate, either, fail, failWith, handle, return, sequence, try) import PreludePrimIO(_MVar) import PreludeReadTextIO(getChar, hGetChar, hGetContents, hLookAhead, hReady, readFile13) import PreludeStdIO(BufferMode(..), FilePath(..), Handle(..), HandlePosn(..), IOMode(..), Maybe(..), SeekMode(..), _Handle, hClose, hFileSize, hFlush, hGetPosn, hIsBlockBuffered, hIsClosed, hIsEOF, hIsLineBuffered, hIsNotBuffered, hIsOpen, hIsReadable, hIsSeekable, hIsWritable, hSeek, hSetBuffering, hSetPosn, isEOF, openFile, stderr13, stdin13, stdout13) import PreludeWriteTextIO(appendFile13, hPutChar, hPutStr, hPutText, print13, putChar, putStr, putText, writeFile13) infixr 1 >> infixr 1 >>= data IOError13 = AlreadyExists [Char] | HardwareFault [Char] | IllegalOperation [Char] | InappropriateType [Char] | Interrupted [Char] | InvalidArgument [Char] | NoSuchThing [Char] | OtherError13 [Char] | PermissionDenied [Char] | ProtocolError [Char] | ResourceBusy [Char] | ResourceExhausted [Char] | ResourceVanished [Char] | SystemError [Char] | TimeExpired [Char] | UnsatisfiedConstraints [Char] | UnsupportedOperation [Char] | UserError [Char] | EOF data Either a b = Left a | Right b type IO a = _State _RealWorld -> (Either IOError13 a, _State _RealWorld) data _MVar a {-# GHC_PRAGMA _MVar (SynchVar# _RealWorld a) #-} data BufferMode = NoBuffering | LineBuffering | BlockBuffering (Maybe Int) type FilePath = [Char] type Handle = _MVar _Handle type HandlePosn = (_MVar _Handle, Int) data IOMode = ReadMode | WriteMode | AppendMode | ReadWriteMode data Maybe a = Nothing | Just a data SeekMode = AbsoluteSeek | RelativeSeek | SeekFromEnd data _Handle {-# GHC_PRAGMA _ErrorHandle IOError13 | _ClosedHandle | _SemiClosedHandle _Addr (_Addr, Int) | _ReadHandle _Addr (Maybe BufferMode) Bool | _WriteHandle _Addr (Maybe BufferMode) Bool | _AppendHandle _Addr (Maybe BufferMode) Bool | _ReadWriteHandle _Addr (Maybe BufferMode) Bool | _SocketHandle _Addr Bool #-} (>>) :: (_State _RealWorld -> (Either IOError13 a, _State _RealWorld)) -> (_State _RealWorld -> (Either IOError13 b, _State _RealWorld)) -> _State _RealWorld -> (Either IOError13 b, _State _RealWorld) {-# GHC_PRAGMA _A_ 3 _U_ 112 _N_ _S_ "SLL" _F_ _ALWAYS_ _/\_ u0 u1 -> \ (u2 :: _State _RealWorld -> (Either IOError13 u0, _State _RealWorld)) (u3 :: _State _RealWorld -> (Either IOError13 u1, _State _RealWorld)) (u4 :: _State _RealWorld) -> let {(u7 :: u0 -> _State _RealWorld -> (Either IOError13 u1, _State _RealWorld)) = \ (u5 :: u0) (u6 :: _State _RealWorld) -> _APP_ u3 [ u6 ]} in _APP_ _TYAPP_ _TYAPP_ _ORIG_ PreludeMonadicIO (>>=) { u0 } { u1 } [ u2, u7, u4 ] _N_ #-} (>>=) :: (_State _RealWorld -> (Either IOError13 a, _State _RealWorld)) -> (a -> _State _RealWorld -> (Either IOError13 b, _State _RealWorld)) -> _State _RealWorld -> (Either IOError13 b, _State _RealWorld) {-# GHC_PRAGMA _A_ 3 _U_ 112 _N_ _S_ "SLL" _F_ _ALWAYS_ _/\_ u0 u1 -> \ (u2 :: _State _RealWorld -> (Either IOError13 u0, _State _RealWorld)) (u3 :: u0 -> _State _RealWorld -> (Either IOError13 u1, _State _RealWorld)) (u4 :: _State _RealWorld) -> case _APP_ u2 [ u4 ] of { _ALG_ _TUP_2 (u5 :: Either IOError13 u0) (u6 :: _State _RealWorld) -> case u5 of { _ALG_ Right (u7 :: u0) -> _APP_ u3 [ u7, u6 ]; Left (u8 :: IOError13) -> let {(u9 :: Either IOError13 u1) = _!_ Left [IOError13, u1] [u8]} in case u6 of { _ALG_ S# (ua :: State# _RealWorld) -> _!_ _TUP_2 [(Either IOError13 u1), (_State _RealWorld)] [u9, u6]; _NO_DEFLT_ }; _NO_DEFLT_ }; _NO_DEFLT_ } _N_ #-} accumulate :: [_State _RealWorld -> (Either IOError13 a, _State _RealWorld)] -> _State _RealWorld -> (Either IOError13 [a], _State _RealWorld) {-# GHC_PRAGMA _A_ 2 _U_ 12 _N_ _S_ "SL" _N_ _N_ #-} either :: (a -> c) -> (b -> c) -> Either a b -> c {-# GHC_PRAGMA _A_ 3 _U_ 111 _N_ _S_ "LLS" _F_ _IF_ARGS_ 3 3 XXC 6 _/\_ u0 u1 u2 -> \ (u3 :: u0 -> u2) (u4 :: u1 -> u2) (u5 :: Either u0 u1) -> case u5 of { _ALG_ Left (u6 :: u0) -> _APP_ u3 [ u6 ]; Right (u7 :: u1) -> _APP_ u4 [ u7 ]; _NO_DEFLT_ } _N_ #-} fail :: [Char] -> _State _RealWorld -> (Either IOError13 a, _State _RealWorld) {-# GHC_PRAGMA _A_ 2 _U_ 21 _N_ _S_ "LU(P)" {_A_ 2 _U_ 22 _N_ _N_ _N_ _N_} _N_ _N_ #-} failWith :: IOError13 -> _State _RealWorld -> (Either IOError13 a, _State _RealWorld) {-# GHC_PRAGMA _A_ 2 _U_ 22 _N_ _S_ "LS" _F_ _ALWAYS_ _/\_ u0 -> \ (u1 :: IOError13) (u2 :: _State _RealWorld) -> let {(u3 :: Either IOError13 u0) = _!_ Left [IOError13, u0] [u1]} in case u2 of { _ALG_ S# (u4 :: State# _RealWorld) -> _!_ _TUP_2 [(Either IOError13 u0), (_State _RealWorld)] [u3, u2]; _NO_DEFLT_ } _N_ #-} handle :: (_State _RealWorld -> (Either IOError13 a, _State _RealWorld)) -> (IOError13 -> _State _RealWorld -> (Either IOError13 a, _State _RealWorld)) -> _State _RealWorld -> (Either IOError13 a, _State _RealWorld) {-# GHC_PRAGMA _A_ 3 _U_ 112 _N_ _S_ "SLL" _N_ _N_ #-} getChar :: _State _RealWorld -> (Either IOError13 Char, _State _RealWorld) {-# GHC_PRAGMA _A_ 1 _U_ 1 _N_ _S_ "U(P)" {_A_ 1 _U_ 2 _N_ _N_ _F_ _IF_ARGS_ 0 1 X 4 \ (u0 :: State# _RealWorld) -> case _ORIG_ PreludeStdIO stdin13 of { _ALG_ _MVar (u1 :: SynchVar# _RealWorld _Handle) -> _APP_ _WRKR_ _ORIG_ PreludeReadTextIO hGetChar [ u1, u0 ]; _NO_DEFLT_ } _N_} _F_ _IF_ARGS_ 0 1 X 3 \ (u0 :: _State _RealWorld) -> _APP_ _ORIG_ PreludeReadTextIO hGetChar [ _ORIG_ PreludeStdIO stdin13, u0 ] _N_ #-} hGetChar :: _MVar _Handle -> _State _RealWorld -> (Either IOError13 Char, _State _RealWorld) {-# GHC_PRAGMA _A_ 2 _U_ 11 _N_ _S_ "U(P)U(P)" {_A_ 2 _U_ 22 _N_ _N_ _N_ _N_} _N_ _N_ #-} hGetContents :: _MVar _Handle -> _State _RealWorld -> (Either IOError13 [Char], _State _RealWorld) {-# GHC_PRAGMA _A_ 2 _U_ 11 _N_ _S_ "U(P)U(P)" {_A_ 2 _U_ 22 _N_ _N_ _N_ _N_} _N_ _N_ #-} hLookAhead :: _MVar _Handle -> _State _RealWorld -> (Either IOError13 Char, _State _RealWorld) {-# GHC_PRAGMA _A_ 2 _U_ 11 _N_ _S_ "U(P)U(P)" {_A_ 2 _U_ 22 _N_ _N_ _N_ _N_} _N_ _N_ #-} hReady :: _MVar _Handle -> _State _RealWorld -> (Either IOError13 Bool, _State _RealWorld) {-# GHC_PRAGMA _A_ 2 _U_ 11 _N_ _S_ "U(P)U(P)" {_A_ 2 _U_ 22 _N_ _N_ _N_ _N_} _N_ _N_ #-} hClose :: _MVar _Handle -> _State _RealWorld -> (Either IOError13 (), _State _RealWorld) {-# GHC_PRAGMA _A_ 2 _U_ 11 _N_ _S_ "U(P)U(P)" {_A_ 2 _U_ 22 _N_ _N_ _N_ _N_} _N_ _N_ #-} hFileSize :: _MVar _Handle -> _State _RealWorld -> (Either IOError13 Integer, _State _RealWorld) {-# GHC_PRAGMA _A_ 2 _U_ 11 _N_ _S_ "U(P)U(P)" {_A_ 2 _U_ 22 _N_ _N_ _N_ _N_} _N_ _N_ #-} hFlush :: _MVar _Handle -> _State _RealWorld -> (Either IOError13 (), _State _RealWorld) {-# GHC_PRAGMA _A_ 2 _U_ 11 _N_ _S_ "U(P)U(P)" {_A_ 2 _U_ 22 _N_ _N_ _N_ _N_} _N_ _N_ #-} hGetPosn :: _MVar _Handle -> _State _RealWorld -> (Either IOError13 (_MVar _Handle, Int), _State _RealWorld) {-# GHC_PRAGMA _A_ 2 _U_ 11 _N_ _S_ "U(P)U(P)" {_A_ 2 _U_ 22 _N_ _N_ _N_ _N_} _N_ _N_ #-} hIsBlockBuffered :: _MVar _Handle -> _State _RealWorld -> (Either IOError13 (Bool, Maybe Int), _State _RealWorld) {-# GHC_PRAGMA _A_ 2 _U_ 11 _N_ _S_ "U(P)U(P)" {_A_ 2 _U_ 22 _N_ _N_ _N_ _N_} _N_ _N_ #-} hIsClosed :: _MVar _Handle -> _State _RealWorld -> (Either IOError13 Bool, _State _RealWorld) {-# GHC_PRAGMA _A_ 2 _U_ 11 _N_ _S_ "U(P)U(P)" {_A_ 2 _U_ 22 _N_ _N_ _N_ _N_} _N_ _N_ #-} hIsEOF :: _MVar _Handle -> _State _RealWorld -> (Either IOError13 Bool, _State _RealWorld) {-# GHC_PRAGMA _A_ 2 _U_ 11 _N_ _S_ "U(P)U(P)" {_A_ 2 _U_ 22 _N_ _N_ _N_ _N_} _N_ _N_ #-} hIsLineBuffered :: _MVar _Handle -> _State _RealWorld -> (Either IOError13 Bool, _State _RealWorld) {-# GHC_PRAGMA _A_ 2 _U_ 11 _N_ _S_ "U(P)U(P)" {_A_ 2 _U_ 22 _N_ _N_ _N_ _N_} _N_ _N_ #-} hIsNotBuffered :: _MVar _Handle -> _State _RealWorld -> (Either IOError13 Bool, _State _RealWorld) {-# GHC_PRAGMA _A_ 2 _U_ 11 _N_ _S_ "U(P)U(P)" {_A_ 2 _U_ 22 _N_ _N_ _N_ _N_} _N_ _N_ #-} hIsOpen :: _MVar _Handle -> _State _RealWorld -> (Either IOError13 Bool, _State _RealWorld) {-# GHC_PRAGMA _A_ 2 _U_ 11 _N_ _S_ "U(P)U(P)" {_A_ 2 _U_ 22 _N_ _N_ _N_ _N_} _N_ _N_ #-} hIsReadable :: _MVar _Handle -> _State _RealWorld -> (Either IOError13 Bool, _State _RealWorld) {-# GHC_PRAGMA _A_ 2 _U_ 11 _N_ _S_ "U(P)U(P)" {_A_ 2 _U_ 22 _N_ _N_ _N_ _N_} _N_ _N_ #-} hIsSeekable :: _MVar _Handle -> _State _RealWorld -> (Either IOError13 Bool, _State _RealWorld) {-# GHC_PRAGMA _A_ 2 _U_ 11 _N_ _S_ "U(P)U(P)" {_A_ 2 _U_ 22 _N_ _N_ _N_ _N_} _N_ _N_ #-} hIsWritable :: _MVar _Handle -> _State _RealWorld -> (Either IOError13 Bool, _State _RealWorld) {-# GHC_PRAGMA _A_ 2 _U_ 11 _N_ _S_ "U(P)U(P)" {_A_ 2 _U_ 22 _N_ _N_ _N_ _N_} _N_ _N_ #-} hSeek :: _MVar _Handle -> SeekMode -> Integer -> _State _RealWorld -> (Either IOError13 (), _State _RealWorld) {-# GHC_PRAGMA _A_ 4 _U_ 1111 _N_ _S_ "U(P)LU(PPP)U(P)" {_A_ 4 _U_ 2112 _N_ _N_ _N_ _N_} _N_ _N_ #-} hSetBuffering :: _MVar _Handle -> BufferMode -> _State _RealWorld -> (Either IOError13 (), _State _RealWorld) {-# GHC_PRAGMA _A_ 3 _U_ 121 _N_ _S_ "LSU(P)" {_A_ 3 _U_ 122 _N_ _N_ _N_ _N_} _N_ _N_ #-} hSetPosn :: (_MVar _Handle, Int) -> _State _RealWorld -> (Either IOError13 (), _State _RealWorld) {-# GHC_PRAGMA _A_ 2 _U_ 11 _N_ _S_ "U(U(P)L)U(P)" {_A_ 3 _U_ 212 _N_ _N_ _N_ _N_} _N_ _N_ #-} appendFile13 :: [Char] -> [Char] -> _State _RealWorld -> (Either IOError13 (), _State _RealWorld) {-# GHC_PRAGMA _A_ 3 _U_ 221 _N_ _S_ "LLU(P)" {_A_ 3 _U_ 222 _N_ _N_ _N_ _N_} _N_ _N_ #-} hPutChar :: _MVar _Handle -> Char -> _State _RealWorld -> (Either IOError13 (), _State _RealWorld) {-# GHC_PRAGMA _A_ 3 _U_ 111 _N_ _S_ "U(P)LU(P)" {_A_ 3 _U_ 212 _N_ _N_ _N_ _N_} _N_ _N_ #-} hPutStr :: _MVar _Handle -> [Char] -> _State _RealWorld -> (Either IOError13 (), _State _RealWorld) {-# GHC_PRAGMA _A_ 3 _U_ 121 _N_ _S_ "U(P)LU(P)" {_A_ 3 _U_ 222 _N_ _N_ _N_ _N_} _N_ _N_ #-} hPutText :: Text a => _MVar _Handle -> a -> _State _RealWorld -> (Either IOError13 (), _State _RealWorld) {-# GHC_PRAGMA _A_ 1 _U_ 1121 _N_ _N_ _N_ _N_ #-} interact13 :: ([Char] -> [Char]) -> _State _RealWorld -> (Either IOError13 (), _State _RealWorld) {-# GHC_PRAGMA _A_ 2 _U_ 11 _N_ _S_ "LU(P)" {_A_ 2 _U_ 12 _N_ _N_ _N_ _N_} _N_ _N_ #-} return :: a -> _State _RealWorld -> (Either IOError13 a, _State _RealWorld) {-# GHC_PRAGMA _A_ 2 _U_ 22 _N_ _S_ "LS" _F_ _ALWAYS_ _/\_ u0 -> \ (u1 :: u0) (u2 :: _State _RealWorld) -> let {(u3 :: Either IOError13 u0) = _!_ Right [IOError13, u0] [u1]} in case u2 of { _ALG_ S# (u4 :: State# _RealWorld) -> _!_ _TUP_2 [(Either IOError13 u0), (_State _RealWorld)] [u3, u2]; _NO_DEFLT_ } _N_ #-} sequence :: [_State _RealWorld -> (Either IOError13 a, _State _RealWorld)] -> _State _RealWorld -> (Either IOError13 (), _State _RealWorld) {-# GHC_PRAGMA _A_ 2 _U_ 12 _N_ _S_ "SL" _N_ _N_ #-} try :: (_State _RealWorld -> (Either IOError13 a, _State _RealWorld)) -> _State _RealWorld -> (Either IOError13 (Either IOError13 a), _State _RealWorld) {-# GHC_PRAGMA _A_ 2 _U_ 12 _N_ _S_ "SL" _N_ _N_ #-} readFile13 :: [Char] -> _State _RealWorld -> (Either IOError13 [Char], _State _RealWorld) {-# GHC_PRAGMA _A_ 2 _U_ 21 _N_ _S_ "LU(P)" {_A_ 2 _U_ 22 _N_ _N_ _N_ _N_} _N_ _N_ #-} isEOF :: _State _RealWorld -> (Either IOError13 Bool, _State _RealWorld) {-# GHC_PRAGMA _A_ 1 _U_ 1 _N_ _S_ "U(P)" {_A_ 1 _U_ 2 _N_ _N_ _F_ _IF_ARGS_ 0 1 X 4 \ (u0 :: State# _RealWorld) -> case _ORIG_ PreludeStdIO stdin13 of { _ALG_ _MVar (u1 :: SynchVar# _RealWorld _Handle) -> _APP_ _WRKR_ _ORIG_ PreludeStdIO hIsEOF [ u1, u0 ]; _NO_DEFLT_ } _N_} _F_ _IF_ARGS_ 0 1 X 3 \ (u0 :: _State _RealWorld) -> _APP_ _ORIG_ PreludeStdIO hIsEOF [ _ORIG_ PreludeStdIO stdin13, u0 ] _N_ #-} openFile :: [Char] -> IOMode -> _State _RealWorld -> (Either IOError13 (_MVar _Handle), _State _RealWorld) {-# GHC_PRAGMA _A_ 3 _U_ 221 _N_ _S_ "LLU(P)" {_A_ 3 _U_ 222 _N_ _N_ _N_ _N_} _N_ _N_ #-} stderr13 :: _MVar _Handle {-# GHC_PRAGMA _A_ 0 _N_ _N_ _N_ _N_ _N_ #-} stdin13 :: _MVar _Handle {-# GHC_PRAGMA _A_ 0 _N_ _N_ _N_ _N_ _N_ #-} stdout13 :: _MVar _Handle {-# GHC_PRAGMA _A_ 0 _N_ _N_ _N_ _N_ _N_ #-} print13 :: Text a => a -> _State _RealWorld -> (Either IOError13 (), _State _RealWorld) {-# GHC_PRAGMA _A_ 1 _U_ 121 _N_ _N_ _N_ _N_ #-} putChar :: Char -> _State _RealWorld -> (Either IOError13 (), _State _RealWorld) {-# GHC_PRAGMA _A_ 2 _U_ 11 _N_ _N_ _F_ _IF_ARGS_ 0 0 X 2 _APP_ _ORIG_ PreludeWriteTextIO hPutChar [ _ORIG_ PreludeStdIO stdout13 ] _N_ #-} putStr :: [Char] -> _State _RealWorld -> (Either IOError13 (), _State _RealWorld) {-# GHC_PRAGMA _A_ 2 _U_ 21 _N_ _N_ _F_ _IF_ARGS_ 0 0 X 2 _APP_ _ORIG_ PreludeWriteTextIO hPutStr [ _ORIG_ PreludeStdIO stdout13 ] _N_ #-} putText :: Text a => a -> _State _RealWorld -> (Either IOError13 (), _State _RealWorld) {-# GHC_PRAGMA _A_ 1 _U_ 121 _N_ _N_ _F_ _IF_ARGS_ 1 1 X 3 _/\_ u0 -> \ (u1 :: {{Text u0}}) -> _APP_ _TYAPP_ _ORIG_ PreludeWriteTextIO hPutText { u0 } [ u1, _ORIG_ PreludeStdIO stdout13 ] _N_ #-} writeFile13 :: [Char] -> [Char] -> _State _RealWorld -> (Either IOError13 (), _State _RealWorld) {-# GHC_PRAGMA _A_ 3 _U_ 221 _N_ _S_ "LLU(P)" {_A_ 3 _U_ 222 _N_ _N_ _N_ _N_} _N_ _N_ #-} instance (Eq a, Eq b) => Eq (Either a b) {-# GHC_PRAGMA _M_ PreludeMonadicIO {-dfun-} _A_ 2 _U_ 11 _N_ _N_ _N_ _N_ #-} instance Eq a => Eq (Maybe a) {-# GHC_PRAGMA _M_ PreludeStdIO {-dfun-} _A_ 1 _U_ 1 _N_ _N_ _N_ _N_ #-} instance (Ord a, Ord b) => Ord (Either a b) {-# GHC_PRAGMA _M_ PreludeMonadicIO {-dfun-} _A_ 3 _U_ 222 _N_ _N_ _N_ _N_ #-} instance Ord a => Ord (Maybe a) {-# GHC_PRAGMA _M_ PreludeStdIO {-dfun-} _A_ 2 _U_ 22 _N_ _N_ _N_ _N_ #-} instance (Text a, Text b) => Text (Either a b) {-# GHC_PRAGMA _M_ PreludeMonadicIO {-dfun-} _A_ 2 _U_ 22 _N_ _N_ _N_ _N_ #-} instance Text IOError13 {-# GHC_PRAGMA _M_ PreludeIOError {-dfun-} _A_ 0 _N_ _N_ _N_ _F_ _IF_ARGS_ 0 0 X 5 _!_ _TUP_4 [(Int -> [Char] -> [(IOError13, [Char])]), (Int -> IOError13 -> [Char] -> [Char]), ([Char] -> [([IOError13], [Char])]), ([IOError13] -> [Char] -> [Char])] [_CONSTM_ Text readsPrec (IOError13), _CONSTM_ Text showsPrec (IOError13), _CONSTM_ Text readList (IOError13), _CONSTM_ Text showList (IOError13)] _N_ readsPrec = _A_ 2 _U_ 22 _N_ _S_ _!_ _F_ _IF_ARGS_ 0 2 XX 4 \ (u0 :: Int) (u1 :: [Char]) -> _APP_ _TYAPP_ patError# { (Int -> [Char] -> [(IOError13, [Char])]) } [ _NOREP_S_ "%DPreludeCore.Text.readsPrec\"", u0, u1 ] _N_, showsPrec = _A_ 2 _U_ 012 _N_ _S_ "AS" {_A_ 1 _U_ 12 _N_ _N_ _N_ _N_} _N_ _N_, readList = _A_ 0 _U_ 2 _N_ _N_ _N_ _N_, showList = _A_ 0 _U_ 12 _N_ _N_ _N_ _N_ #-} instance Text a => Text (Maybe a) {-# GHC_PRAGMA _M_ PreludeStdIO {-dfun-} _A_ 1 _U_ 2 _N_ _N_ _N_ _N_ #-}