[project @ 1996-01-08 20:28:12 by partain]
[ghc-hetmet.git] / ghc / lib / prelude / PreludeStdIO_mt.hi
1 {-# GHC_PRAGMA INTERFACE VERSION 5 #-}
2 interface PreludeStdIO where
3 import PreludeBuiltin(Char(..), Int(..), Integer(..), List(..), Tuple0, Tuple2, _Addr(..), _RealWorld(..), _State(..))
4 import PreludeCore(Bool(..), Eq(..), Ord(..), Text(..))
5 import PreludeIOError(IOError13)
6 import PreludeMonadicIO(Either)
7 import PreludePrimIO(_MVar)
8 data BufferMode   = NoBuffering | LineBuffering | BlockBuffering (Maybe Int)
9 type FilePath = [Char]
10 type Handle = _MVar _Handle
11 type HandlePosn = (_MVar _Handle, Int)
12 data IOMode   = ReadMode | WriteMode | AppendMode | ReadWriteMode
13 data Maybe a   = Nothing | Just a
14 data SeekMode   = AbsoluteSeek | RelativeSeek | SeekFromEnd
15 data _Handle   = _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
16 _bufferMode :: _Handle -> Maybe BufferMode
17         {-# GHC_PRAGMA _A_ 1 _U_ 1 _N_ _S_ "S" _N_ _N_ #-}
18 _filePtr :: _Handle -> _Addr
19         {-# GHC_PRAGMA _A_ 1 _U_ 1 _N_ _S_ "S" _N_ _N_ #-}
20 _getBufferMode :: _Handle -> _State _RealWorld -> (_Handle, _State _RealWorld)
21         {-# GHC_PRAGMA _A_ 2 _U_ 21 _N_ _S_ "SU(P)" {_A_ 2 _U_ 22 _N_ _N_ _N_ _N_} _N_ _N_ #-}
22 _markHandle :: _Handle -> _Handle
23         {-# GHC_PRAGMA _A_ 1 _U_ 1 _N_ _S_ "S" _N_ _N_ #-}
24 hClose :: _MVar _Handle -> _State _RealWorld -> (Either IOError13 (), _State _RealWorld)
25         {-# GHC_PRAGMA _A_ 2 _U_ 11 _N_ _S_ "U(P)U(P)" {_A_ 2 _U_ 22 _N_ _N_ _N_ _N_} _N_ _N_ #-}
26 hFileSize :: _MVar _Handle -> _State _RealWorld -> (Either IOError13 Integer, _State _RealWorld)
27         {-# GHC_PRAGMA _A_ 2 _U_ 11 _N_ _S_ "U(P)U(P)" {_A_ 2 _U_ 22 _N_ _N_ _N_ _N_} _N_ _N_ #-}
28 hFlush :: _MVar _Handle -> _State _RealWorld -> (Either IOError13 (), _State _RealWorld)
29         {-# GHC_PRAGMA _A_ 2 _U_ 11 _N_ _S_ "U(P)U(P)" {_A_ 2 _U_ 22 _N_ _N_ _N_ _N_} _N_ _N_ #-}
30 hGetPosn :: _MVar _Handle -> _State _RealWorld -> (Either IOError13 (_MVar _Handle, Int), _State _RealWorld)
31         {-# GHC_PRAGMA _A_ 2 _U_ 11 _N_ _S_ "U(P)U(P)" {_A_ 2 _U_ 22 _N_ _N_ _N_ _N_} _N_ _N_ #-}
32 hIsBlockBuffered :: _MVar _Handle -> _State _RealWorld -> (Either IOError13 (Bool, Maybe Int), _State _RealWorld)
33         {-# GHC_PRAGMA _A_ 2 _U_ 11 _N_ _S_ "U(P)U(P)" {_A_ 2 _U_ 22 _N_ _N_ _N_ _N_} _N_ _N_ #-}
34 hIsClosed :: _MVar _Handle -> _State _RealWorld -> (Either IOError13 Bool, _State _RealWorld)
35         {-# GHC_PRAGMA _A_ 2 _U_ 11 _N_ _S_ "U(P)U(P)" {_A_ 2 _U_ 22 _N_ _N_ _N_ _N_} _N_ _N_ #-}
36 hIsEOF :: _MVar _Handle -> _State _RealWorld -> (Either IOError13 Bool, _State _RealWorld)
37         {-# GHC_PRAGMA _A_ 2 _U_ 11 _N_ _S_ "U(P)U(P)" {_A_ 2 _U_ 22 _N_ _N_ _N_ _N_} _N_ _N_ #-}
38 hIsLineBuffered :: _MVar _Handle -> _State _RealWorld -> (Either IOError13 Bool, _State _RealWorld)
39         {-# GHC_PRAGMA _A_ 2 _U_ 11 _N_ _S_ "U(P)U(P)" {_A_ 2 _U_ 22 _N_ _N_ _N_ _N_} _N_ _N_ #-}
40 hIsNotBuffered :: _MVar _Handle -> _State _RealWorld -> (Either IOError13 Bool, _State _RealWorld)
41         {-# GHC_PRAGMA _A_ 2 _U_ 11 _N_ _S_ "U(P)U(P)" {_A_ 2 _U_ 22 _N_ _N_ _N_ _N_} _N_ _N_ #-}
42 hIsOpen :: _MVar _Handle -> _State _RealWorld -> (Either IOError13 Bool, _State _RealWorld)
43         {-# GHC_PRAGMA _A_ 2 _U_ 11 _N_ _S_ "U(P)U(P)" {_A_ 2 _U_ 22 _N_ _N_ _N_ _N_} _N_ _N_ #-}
44 hIsReadable :: _MVar _Handle -> _State _RealWorld -> (Either IOError13 Bool, _State _RealWorld)
45         {-# GHC_PRAGMA _A_ 2 _U_ 11 _N_ _S_ "U(P)U(P)" {_A_ 2 _U_ 22 _N_ _N_ _N_ _N_} _N_ _N_ #-}
46 hIsSeekable :: _MVar _Handle -> _State _RealWorld -> (Either IOError13 Bool, _State _RealWorld)
47         {-# GHC_PRAGMA _A_ 2 _U_ 11 _N_ _S_ "U(P)U(P)" {_A_ 2 _U_ 22 _N_ _N_ _N_ _N_} _N_ _N_ #-}
48 hIsWritable :: _MVar _Handle -> _State _RealWorld -> (Either IOError13 Bool, _State _RealWorld)
49         {-# GHC_PRAGMA _A_ 2 _U_ 11 _N_ _S_ "U(P)U(P)" {_A_ 2 _U_ 22 _N_ _N_ _N_ _N_} _N_ _N_ #-}
50 hSeek :: _MVar _Handle -> SeekMode -> Integer -> _State _RealWorld -> (Either IOError13 (), _State _RealWorld)
51         {-# GHC_PRAGMA _A_ 4 _U_ 1111 _N_ _S_ "U(P)LU(PPP)U(P)" {_A_ 4 _U_ 2112 _N_ _N_ _N_ _N_} _N_ _N_ #-}
52 hSetBuffering :: _MVar _Handle -> BufferMode -> _State _RealWorld -> (Either IOError13 (), _State _RealWorld)
53         {-# GHC_PRAGMA _A_ 3 _U_ 121 _N_ _S_ "LSU(P)" {_A_ 3 _U_ 122 _N_ _N_ _N_ _N_} _N_ _N_ #-}
54 hSetPosn :: (_MVar _Handle, Int) -> _State _RealWorld -> (Either IOError13 (), _State _RealWorld)
55         {-# GHC_PRAGMA _A_ 2 _U_ 11 _N_ _S_ "U(U(P)L)U(P)" {_A_ 3 _U_ 212 _N_ _N_ _N_ _N_} _N_ _N_ #-}
56 isEOF :: _State _RealWorld -> (Either IOError13 Bool, _State _RealWorld)
57         {-# 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_ #-}
58 openFile :: [Char] -> IOMode -> _State _RealWorld -> (Either IOError13 (_MVar _Handle), _State _RealWorld)
59         {-# GHC_PRAGMA _A_ 3 _U_ 221 _N_ _S_ "LLU(P)" {_A_ 3 _U_ 222 _N_ _N_ _N_ _N_} _N_ _N_ #-}
60 stderr13 :: _MVar _Handle
61         {-# GHC_PRAGMA _A_ 0 _N_ _N_ _N_ _N_ _N_ #-}
62 stdin13 :: _MVar _Handle
63         {-# GHC_PRAGMA _A_ 0 _N_ _N_ _N_ _N_ _N_ #-}
64 stdout13 :: _MVar _Handle
65         {-# GHC_PRAGMA _A_ 0 _N_ _N_ _N_ _N_ _N_ #-}
66 instance Eq a => Eq (Maybe a)
67         {-# GHC_PRAGMA _M_ PreludeStdIO {-dfun-} _A_ 1 _U_ 1 _N_ _N_ _N_ _N_ #-}
68 instance Ord a => Ord (Maybe a)
69         {-# GHC_PRAGMA _M_ PreludeStdIO {-dfun-} _A_ 2 _U_ 22 _N_ _N_ _N_ _N_ #-}
70 instance Text a => Text (Maybe a)
71         {-# GHC_PRAGMA _M_ PreludeStdIO {-dfun-} _A_ 1 _U_ 2 _N_ _N_ _N_ _N_ #-}
72