Control.Monad proposal: Add whenJust

Ben midfield at gmail.com
Sun May 19 21:23:24 CEST 2013


i'm not even sure if i'm allowed to vote on proposals, having spent some time on the wiki trying to find out.  also it seems i'm a few hours too late, but i feel it would be a shame for this proposal to die.  i'm personally agnostic between the two positive proposals but i'll vote for the first one (fixing the Prelude) if that's what it takes to get plurality.  so, if my vote counts for anything,

+1 "for just fixing the Prelude to swap in the definitions from Foldable and Traversable."

best, ben

On May 19, 2013, at 9:33 AM, Edward Kmett 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'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




More information about the Libraries mailing list