snoyberg / mono-traversable

Type classes for mapping, folding, and traversing monomorphic containers
153 stars 63 forks source link

Add Appendable and Unionable typeclasses #100

Open snoyberg opened 8 years ago

snoyberg commented 8 years ago

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.