@@ -22,20 +22,20 @@ instance (Prelude.Show a) => Prelude.Show (Data a) where
22test3 = \_ -> show (Data "testing")
22test3 = \_ -> show (Data "testing")
24instance Prelude.Monad Data where
24instance Prelude.Monad Data where
25− ret = Data
25+ return = Data
26 (>>=) (Data a) f = f a
26 (>>=) (Data a) f = f a
28data Maybe a = Nothing | Just a
28data Maybe a = Nothing | Just a
30instance Prelude.Monad Maybe where
30instance Prelude.Monad Maybe where
31− ret = Just
31+ return = Just
32 (>>=) Nothing _ = Nothing
32 (>>=) Nothing _ = Nothing
33 (>>=) (Just a) f = f a
33 (>>=) (Just a) f = f a
35test4 :: forall a m. (Monad m) => a -> m Number
35test4 :: forall a m. (Monad m) => a -> m Number
36−test4 = \_ -> ret 1
36+test4 = \_ -> return 1
38−test5 = \_ -> Just 1 >>= \n -> ret (n + 1)
38+test5 = \_ -> Just 1 >>= \n -> return (n + 1)
40module TypeClasses2 where
40module TypeClasses2 where
@@ -49,7 +49,7 @@ instance (Prelude.Show a) => Prelude.Show [a] where
49test6 = \_ -> show ["testing"]
49test6 = \_ -> show ["testing"]
51instance Prelude.Monad (->) r where
51instance Prelude.Monad (->) r where
52− ret a r = a
52+ return a r = a
53 (>>=) f g r = g (f r) r
53 (>>=) f g r = g (f r) r
@@ -58,7 +58,7 @@ runReader r f = f r
59test9 _ = runReader 0 $ do
59test9 _ = runReader 0 $ do
61− ret $ n + 1
61+ return $ n + 1
63module Main where
63module Main where