@@ -24,10 +24,12 @@ test3 = \_ -> show (Data "testing")
2424instance functorData :: Functor Data where
2525 (<$>) = liftM1
2626
27−instance appData :: Applicative Data where
28− pure = return
27+instance applyData :: Apply Data where
2928 (<*>) = ap
3029
30+instance applicativeData :: Applicative Data where
31+ pure = return
32+
3133instance monadData :: Prelude.Monad Data where
3234 return = Data
3335 (>>=) (Data a) f = f a
@@ -37,10 +39,12 @@ data Maybe a = Nothing | Just a
3739instance functorMaybe :: Functor Maybe where
3840 (<$>) = liftM1
3941
40−instance appMaybe :: Applicative Maybe where
41− pure = return
42+instance applyMaybe :: Apply Maybe where
4243 (<*>) = ap
4344
45+instance applicativeMaybe :: Applicative Maybe where
46+ pure = return
47+
4448instance monadMaybe :: Prelude.Monad Maybe where
4549 return = Just
4650 (>>=) Nothing _ = Nothing
@@ -60,10 +64,12 @@ test6 = \_ -> show ["testing"]
6064instance functorFunction :: Functor ((->) r) where
6165 (<$>) = liftM1
6266
63−instance appFunction :: Applicative ((->) r) where
64− pure = return
67+instance applyFunction :: Apply ((->) r) where
6568 (<*>) = ap
6669
70+instance applicativeFunction :: Applicative ((->) r) where
71+ pure = return
72+
6773instance monadFunction :: Prelude.Monad ((->) r) where
6874 return a r = a
6975 (>>=) f g r = g (f r) r
@@ -75,6 +81,6 @@ runReader r f = f r
7581test9 _ = runReader 0 $ do
7682 n <- ask
7783 return $ n + 1
78−
84+
7985main = Debug.Trace.trace (test7 "Done")
8086