-import "Prelude"\r
-\r
-data RealWorld = RealWorld\r
-data IO a = IO (RealWorld -> (RealWorld, a))\r
-\r
-@inline\r
-unIO (IO m) = m \r
-\r
-instance Functor IO where\r
- @inline\r
- fmap f x = x >>= (return . f)\r
-\r
-instance Monad IO where\r
- @inline\r
- return x = IO (\s -> (s, x))\r
- \r
- @inline\r
- (IO m) >>= f = IO (\s -> do\r
- (newS, v) = m s\r
- unIO (f v) newS \r
- )\r
-\r
-@inline\r
-runIO :: IO a -> a\r
-runIO m = snd (unIO m RealWorld)\r
-\r
-main = runIO (return (13 :: Integer))\r
---\r
-13\r
+import "Prelude"
+
+data RealWorld = RealWorld
+data IO a = IO (RealWorld -> (RealWorld, a))
+
+@inline
+unIO (IO m) = m
+
+instance Functor IO where
+ @inline
+ fmap f x = x >>= (return . f)
+
+instance Monad IO where
+ @inline
+ return x = IO (\s -> (s, x))
+
+ @inline
+ (IO m) >>= f = IO (\s -> do
+ (newS, v) = m s
+ unIO (f v) newS
+ )
+
+@inline
+runIO :: IO a -> a
+runIO m = snd (unIO m RealWorld)
+
+main = runIO (return (13 :: Integer))
+--
+13