
3 Oct
2008
3 Oct
'08
4:37 p.m.
Jake McArthur wrote:
Andrew Coppin wrote:
I was thinking more, why not just delete MonadPlus completely, and have any function that needs a monad that's also a monoid say so in its context? (Obviously one of the answers to that is "because it would break vast amounts of existing code".) Because they are not the same. MonadPlus has more restrictions than Monoid. For an instance of the form "instance MonadPlus m where", m a _must_ be a Monoid for _all_ a, whereas "instance Monoid (m a) where" may be defined for some specific a instead.
OK, fair enough then.