[project @ 1996-01-08 20:28:12 by partain]
[ghc-hetmet.git] / ghc / lib / prelude / PreludeMonadicIO.hi
diff --git a/ghc/lib/prelude/PreludeMonadicIO.hi b/ghc/lib/prelude/PreludeMonadicIO.hi
new file mode 100644 (file)
index 0000000..90681d8
--- /dev/null
@@ -0,0 +1,36 @@
+{-# GHC_PRAGMA INTERFACE VERSION 5 #-}
+interface PreludeMonadicIO where
+import PreludeBuiltin(Char(..), List(..), Tuple0, Tuple2, _RealWorld(..), _State(..))
+import PreludeCore(Eq(..), Ord(..), Text(..))
+import PreludeIOError(IOError13)
+infixr 1 >>
+infixr 1 >>=
+data Either a b   = Left a | Right b
+type IO a = _State _RealWorld -> (Either IOError13 a, _State _RealWorld)
+(>>) :: (_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_ #-}
+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_ #-}
+instance (Eq a, Eq b) => Eq (Either a b)
+       {-# GHC_PRAGMA _M_ PreludeMonadicIO {-dfun-} _A_ 2 _U_ 11 _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 (Text a, Text b) => Text (Either a b)
+       {-# GHC_PRAGMA _M_ PreludeMonadicIO {-dfun-} _A_ 2 _U_ 22 _N_ _N_ _N_ _N_ #-}
+