Control.Monad proposal: Add whenJust

Anthony Cowley acowley at seas.upenn.edu
Mon May 20 01:25:53 CEST 2013


On May 19, 2013, at 10:33 AM, Edward Kmett <ekmett at gmail.com> wrote:

> The main utility in removing the crippled versions entirely is that you don't wind up with conflict, but if they are already gone then there is no conflict (within base) in moving the existing Foldable and Traversable interfaces into the Prelude.
> 
> I did say when I made the suggestion that I didn't think it'd make it past the objections, though.

I think this issue may be too big to rely on mailing list +1s. Is there any precedent for having a web-based poll of some sort? We often get more engagement in debates on IRC and /r/haskell than the mailing list, so let's not let the choice of forum drive the result.

Anthony



> 
> I'm personally against removing the existing mapM, etc. definitions from the Prelude without replacing them with the combinators from Foldable/Traversable as it would break strictly more code, and breaks a lot more combinators than you would think, concat, sum, product, etc. are all redefined in Foldable to be more general.
> 
> 5 +1 votes for just fixing the Prelude to swap in the definitions from Foldable and Traversable.
> 
> 3 +1 votes for removing everything that conflicts with Foldable and Traversable from the Prelude. 
> 
> And 2 votes against doing anything.
> 
> At this point it is clear that no position has won more than a plurality of the popular opinion, so I resignedly retract the proposal and let the vocal 20% win.
> 
> -Edward
> 
> 
> On Sat, May 18, 2013 at 8:02 PM, John Lato <jwlato at gmail.com> wrote:
>> 
>> On May 18, 2013 10:09 PM, "Ian Lynagh" <ian at well-typed.com> wrote:
>> >
>> > On Wed, May 15, 2013 at 10:40:45PM +0200, Bas van Dijk wrote:
>> > > On 15 May 2013 18:14, Edward Kmett <ekmett at gmail.com> wrote:
>> > > > Personally, I'd be all for just moving Foldable (and Traversable) into the
>> > > > Prelude and retiring the monomorphic versions of the functions they supply.
>> >
>> > I'd prefer to remove the monomorphic functions, but not to add anything
>> > to Prelude.
>> 
>> +1 to Ian's suggestion. 
>> 
>> _______________________________________________
>> Libraries mailing list
>> Libraries at haskell.org
>> http://www.haskell.org/mailman/listinfo/libraries
> 
> _______________________________________________
> 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/20130519/16874bee/attachment-0001.htm>


More information about the Libraries mailing list