
24 Jun
2008
24 Jun
'08
2:01 p.m.
Ashley Yakeley wrote:
class Applicative m => Monad m where (>>=) :: m a -> (a -> m b) -> m b fail :: String -> m a fail s = error s
I'd personally like (join :: m (m a) -> m a) to also be in Monad, with default definitions between (>>=) and join, because some monads are more naturally defined by one than the other. (just while we're (not) making breaking changes, and because the default for (>>=) would have to depend on fmap, I though I'd mention it :-) -Isaac