@@ -28,13 +28,12 @@ instance applyData :: Apply Data where
28 (<*>) = ap
28 (<*>) = ap
30instance applicativeData :: Applicative Data where
30instance applicativeData :: Applicative Data where
31− pure = return
31+ pure = Data
33instance bindData :: Bind Data where
33instance bindData :: Bind Data where
34 (>>=) (Data a) f = f a
34 (>>=) (Data a) f = f a
36−instance monadData :: Monad Data where
36+instance monadData :: Monad Data
39data Maybe a = Nothing | Just a
38data Maybe a = Nothing | Just a
@@ -45,14 +44,13 @@ instance applyMaybe :: Apply Maybe where
45 (<*>) = ap
44 (<*>) = ap
47instance applicativeMaybe :: Applicative Maybe where
46instance applicativeMaybe :: Applicative Maybe where
48− pure = return
47+ pure = Just
50instance bindMaybe :: Bind Maybe where
49instance bindMaybe :: Bind Maybe where
51 (>>=) Nothing _ = Nothing
50 (>>=) Nothing _ = Nothing
52 (>>=) (Just a) f = f a
51 (>>=) (Just a) f = f a
54−instance monadMaybe :: Monad Maybe where
53+instance monadMaybe :: Monad Maybe
57test4 :: forall a m. (Monad m) => a -> m Number
55test4 :: forall a m. (Monad m) => a -> m Number
58test4 = \_ -> return 1
56test4 = \_ -> return 1
@@ -72,13 +70,12 @@ instance applyFunction :: Apply ((->) r) where
72 (<*>) = ap
70 (<*>) = ap
74instance applicativeFunction :: Applicative ((->) r) where
72instance applicativeFunction :: Applicative ((->) r) where
75− pure = return
73+ pure a _ = a
77instance bindFunction :: Bind ((->) r) where
75instance bindFunction :: Bind ((->) r) where
78 (>>=) f g r = g (f r) r
76 (>>=) f g r = g (f r) r
80−instance monadFunction :: Monad ((->) r) where
78+instance monadFunction :: Monad ((->) r)