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

Edward A Kmett ekmett at gmail.com
Sat Oct 12 22:27:10 UTC 2013

There are those of us who need to maintain code that works on platforms older than GHC HEAD.

This would make it impossible to keep an API working across the change.


> On Oct 12, 2013, at 4:50 PM, Dan Burton <danburton.email at gmail.com> wrote:
> The back-compat can't replace code that uses the `Identity` data constructor, though. It will also make existing code bases ambiguous if they have defined their own `Id` data constructor. Pretty easy fixes, but nontrivial, so worth noting. Despite the pain involved, I think that Identity -> Id when moving this functor into base is a good choice.
> -- Dan Burton
>> On Sat, Oct 12, 2013 at 12:40 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.
>> _______________________________________________
>> Libraries mailing list
>> Libraries at haskell.org
>> http://www.haskell.org/mailman/listinfo/libraries
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/libraries/attachments/20131012/c0abf9a9/attachment.html>

More information about the Libraries mailing list