Thu Feb 24 17:58:36 CET 2011
I.e., A semigroup only contains (what's currently called) mappend and
obeys all mappend laws (i.e., associativity). A monoid is simple a
semigroup + left and right identy.
Given how simple it is, I would generally be in favour of moving it
into base (with documentation). But there is the issue of backwards
compatibility. It's exactly the same issue as with Applicative and
On 14 August 2011 15:50, Malcolm Wallace <malcolm.wallace at me.com> wrote:
> On 14 Aug 2011, at 15:25, Yitzchak Gale wrote:
>> Thomas Schilling wrote:
>>> My argument would be that since Monoid is used more commonly,
>>> it should get the nice and short name (<>).
>> If it is defined in Data.Semigroup, then it can be used for
> I am in favour of <> for Monoid mappend, indeed I thought this had alread=
y been decided a long time ago.
> I oppose any dependency (at this stage) on Semigroup. =A0For one thing, I=
don't know what a semigroup is. =A0There is next to no Haddock documentati=
on for the semigroup package, so I am not further enlightened by looking th=
ere. =A0As a consequence, I have no idea how to make my types which are cur=
rently Monoids into SemiGroups. =A0For instance, although I can guess at "s=
concat", what semantics is "replicate1p" supposed to have? =A0What algebrai=
c laws am I supposed to be respecting?
> =A0 =A0Malcolm
> Libraries mailing list
> Libraries at haskell.org
Push the envelope. Watch it bend.
More information about the Libraries