[Haskell-cafe] Generalizing (++) for monoids instead of using (<>)
thomas.dubuisson at gmail.com
Sun Apr 1 23:14:28 CEST 2012
On Sun, Apr 1, 2012 at 1:58 PM, aditya bhargava
<bluemangroupie at gmail.com> wrote:
> After asking this question:
> I found out that the new infix operator for `mappend` is (<>). I'm wondering
> why ghc 7.4 didn't generalize (++) to work on monoids instead.
Such decisions should really be made by the Haskell Prime committee
(vs GHC HQ). In Haskell there is a continuing tension between making
things polymorphic and to keep the prelude functions monomorphic so
they generate simple error messages (among other arguments). At the
point, the additional argument of any new definition of "Haskell"
remaining backwards compatible also holds weight and this slows the
This is not a new issue, there are a number of functions that could be
defined more generally (common example: map/fmap). The problem making
such changes is a matter of consensus and will to see things though.
More information about the Haskell-Cafe