Ticket #2392 (closed proposal: wontfix)
Make Applicative a superclass of Monad
Make Applicative (in Control.Applicative) a superclass of Monad (in Control.Monad). Rename members of Applicative and other functions, to avoid unnecessary duplication.
class Functor f => Applicative f where return :: a -> f a ap :: f (a -> b) -> f a -> f b liftA2 :: Applicative f => (a -> b -> c) -> f a -> f b -> f c liftA2 f a b = ap (fmap f a) b (>>) :: (Applicative f) => f a -> f b -> f b (>>) = liftA2 (const id) -- etc.
class Applicative m => Monad m where (>>=) :: forall a b . m a -> (a -> m b) -> m b fail :: String -> m a fail s = error s