Re: Monoid for ZipList

박신환 ndospark320 at
Sat May 5 07:38:33 UTC 2018

I'm not refering that Maybe makes Monoid by adding the identity element. I'm refering that the Monoid (Maybe (First a)) have the same semantic as Alternative Maybe.
So I'm suggesting that the same semantic should go to Monoid (ZipList (First a)) for Alternative ZipList. 
-----Original Message-----
From: "Edward Kmett"<ekmett at>
To: "박신환"<ndospark320 at>;
Cc: "Haskell Libraries"<libraries at>;
Sent: 2018-05-05 (토) 07:04:05
Subject: Re: Monoid for ZipList
It is worth noting that Maybe a and [a] are rather special cases. The former is the monoid you get from adjoining a unit to a semigroup. The latter is the free monoid. Most other monoids for things wrapped in an applicative are either based on the Alternative instance which inherently provides a monoidal structure or based on lifting a monoid pointwise into the data type. 
Here we have at least 3-4 possible, quite reasonable, monoids at play, and no real reason to choose any one of them over the others. In that situation, our general practice thus far has been to resist choosing if a choice hasn't already been made, simply because there is no real manner other than memorization / code inspection for a user to know which instance we happened to pick.
I'm -1 on adding the instance proposed here.

Sent from my iPhone
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the Libraries mailing list