When you use Monoid, there is no indication of the behavior of the mempty and mappend methods. Sometimes this can be truly surprising, such as using <> for cartesian product instead of list append. The idea is to provide two typeclasses, with no methods, each acting as witness to the intended behavior, and to provide better documentation in usage sites as to the required semantics.
When you use
Monoid
, there is no indication of the behavior of themempty
andmappend
methods. Sometimes this can be truly surprising, such as using<>
for cartesian product instead of list append. The idea is to provide two typeclasses, with no methods, each acting as witness to the intended behavior, and to provide better documentation in usage sites as to the required semantics.