[Proposal] Add instance Monoid a => Monoid (Const a b)

Stijn van Drongelen rhymoid at gmail.com
Sat Oct 12 19:48:44 UTC 2013


On Oct 12, 2013 9:41 PM, "Dag Odenhall" <dag.odenhall at gmail.com> wrote:
>
> On Sat, Oct 12, 2013 at 7:32 PM, Edward Kmett <ekmett at gmail.com> wrote:
>>
>> On a related note Simon recently asked the core libraries committee if
we should move Data.Functor.Identity into base.
>
> How about calling that one Id then (already in Data.Traversable but not
exported). This would be more consistent with Const not being called
Constant. Maybe also put it in Control.Applicative or move both somewhere
better.
>
> For back-compat, transformers could continue to export those modules,
with aliases like type Identity = Id.
>

I strongly agree with this. It would also preserve the 'symmetry' with
value-level const and id, perhaps even making the concept more accessible
to beginners.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/libraries/attachments/20131012/2638c3d5/attachment.html>


More information about the Libraries mailing list