[project @ 1996-01-08 20:28:12 by partain]
[ghc-hetmet.git] / ghc / lib / prelude / PreludeMonadicIO_t.hi
1 {-# GHC_PRAGMA INTERFACE VERSION 5 #-}
2 interface PreludeMonadicIO where
3 import PreludeBuiltin(Char(..), List(..), Tuple0, Tuple2, _RealWorld(..), _State(..))
4 import PreludeCore(Eq(..), Ord(..), Text(..))
5 import PreludeIOError(IOError13)
6 infixr 1 >>
7 infixr 1 >>=
8 data Either a b   = Left a | Right b
9 type IO a = _State _RealWorld -> (Either IOError13 a, _State _RealWorld)
10 (>>) :: (_State _RealWorld -> (Either IOError13 a, _State _RealWorld)) -> (_State _RealWorld -> (Either IOError13 b, _State _RealWorld)) -> _State _RealWorld -> (Either IOError13 b, _State _RealWorld)
11         {-# 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_ #-}
12 (>>=) :: (_State _RealWorld -> (Either IOError13 a, _State _RealWorld)) -> (a -> _State _RealWorld -> (Either IOError13 b, _State _RealWorld)) -> _State _RealWorld -> (Either IOError13 b, _State _RealWorld)
13         {-# 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_ #-}
14 accumulate :: [_State _RealWorld -> (Either IOError13 a, _State _RealWorld)] -> _State _RealWorld -> (Either IOError13 [a], _State _RealWorld)
15         {-# GHC_PRAGMA _A_ 2 _U_ 12 _N_ _S_ "SL" _N_ _N_ #-}
16 either :: (a -> c) -> (b -> c) -> Either a b -> c
17         {-# 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_ #-}
18 fail :: [Char] -> _State _RealWorld -> (Either IOError13 a, _State _RealWorld)
19         {-# GHC_PRAGMA _A_ 2 _U_ 21 _N_ _S_ "LU(P)" {_A_ 2 _U_ 22 _N_ _N_ _N_ _N_} _N_ _N_ #-}
20 failWith :: IOError13 -> _State _RealWorld -> (Either IOError13 a, _State _RealWorld)
21         {-# 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_ #-}
22 handle :: (_State _RealWorld -> (Either IOError13 a, _State _RealWorld)) -> (IOError13 -> _State _RealWorld -> (Either IOError13 a, _State _RealWorld)) -> _State _RealWorld -> (Either IOError13 a, _State _RealWorld)
23         {-# GHC_PRAGMA _A_ 3 _U_ 112 _N_ _S_ "SLL" _N_ _N_ #-}
24 return :: a -> _State _RealWorld -> (Either IOError13 a, _State _RealWorld)
25         {-# 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_ #-}
26 sequence :: [_State _RealWorld -> (Either IOError13 a, _State _RealWorld)] -> _State _RealWorld -> (Either IOError13 (), _State _RealWorld)
27         {-# GHC_PRAGMA _A_ 2 _U_ 12 _N_ _S_ "SL" _N_ _N_ #-}
28 try :: (_State _RealWorld -> (Either IOError13 a, _State _RealWorld)) -> _State _RealWorld -> (Either IOError13 (Either IOError13 a), _State _RealWorld)
29         {-# GHC_PRAGMA _A_ 2 _U_ 12 _N_ _S_ "SL" _N_ _N_ #-}
30 instance (Eq a, Eq b) => Eq (Either a b)
31         {-# GHC_PRAGMA _M_ PreludeMonadicIO {-dfun-} _A_ 2 _U_ 11 _N_ _N_ _N_ _N_ #-}
32 instance (Ord a, Ord b) => Ord (Either a b)
33         {-# GHC_PRAGMA _M_ PreludeMonadicIO {-dfun-} _A_ 3 _U_ 222 _N_ _N_ _N_ _N_ #-}
34 instance (Text a, Text b) => Text (Either a b)
35         {-# GHC_PRAGMA _M_ PreludeMonadicIO {-dfun-} _A_ 2 _U_ 22 _N_ _N_ _N_ _N_ #-}
36