Idea: Add Semigroup type class
In Haskell, Semigroup
is a superclass of Monoid
that uses the (<>)
operator to denote the associative binary operation. It would be nice to have this hierarchy in Curry as well for a few reasons:
- To stay closer to Haskell's standard libraries
- For better readability (
<>
is more concise compared to backtickedmappend
)
Aside from this, GHC discourages use of mappend
in favor of (<>)
from Semigroup
.
Note that adding Semigroup
as a superclass would be a breaking change, however.