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

Dan Burton danburton.email at gmail.com
Sat Oct 12 20:50:58 UTC 2013


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/080c2419/attachment.html>


More information about the Libraries mailing list