
From a quick look at Wikipedia, a semigroup = Monoid - mempty.
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
Functor.
On 14 August 2011 15:50, Malcolm Wallace
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 both.
I am in favour of <> for Monoid mappend, indeed I thought this had already been decided a long time ago.
I oppose any dependency (at this stage) on Semigroup. For one thing, I don't know what a semigroup is. There is next to no Haddock documentation for the semigroup package, so I am not further enlightened by looking there. As a consequence, I have no idea how to make my types which are currently Monoids into SemiGroups. For instance, although I can guess at "sconcat", what semantics is "replicate1p" supposed to have? What algebraic laws am I supposed to be respecting?
Regards, Malcolm
_______________________________________________ Libraries mailing list Libraries@haskell.org http://www.haskell.org/mailman/listinfo/libraries
-- Push the envelope. Watch it bend.