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

Michael Snoyman michael at snoyman.com
Sun Oct 13 04:16:40 UTC 2013


I agree with Edward here. I don't see enough value in the name change to
warrant all the breakage and conditional compilation hacks that will ensue.

On Sunday, October 13, 2013, Edward A Kmett wrote:

> 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.
>
> -Edward
>
> On Oct 12, 2013, at 4:50 PM, Dan Burton <danburton.email at gmail.com<javascript:_e({}, 'cvml', '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<javascript:_e({}, 'cvml', 'dag.odenhall at gmail.com');>
> > wrote:
>
>> On Sat, Oct 12, 2013 at 7:32 PM, Edward Kmett <ekmett at gmail.com<javascript:_e({}, 'cvml', '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 <javascript:_e({}, 'cvml',
>> '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/20131013/cd90f203/attachment.html>


More information about the Libraries mailing list