Control.Monad proposal: Add whenJust

Edward Kmett ekmett at gmail.com
Sun May 19 18:33:30 CEST 2013


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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/libraries/attachments/20130519/c97804b4/attachment.htm>


More information about the Libraries mailing list