Proposal: add ifM and whenM to Control.Monad

Brandon Allbery allbery.b at gmail.com
Mon Apr 21 18:34:22 UTC 2014


On Mon, Apr 21, 2014 at 2:26 PM, Evan Laforge <qdunkan at gmail.com> wrote:

> On Mon, Apr 21, 2014 at 11:19 AM, Bardur Arantsson <spam at scientician.net>
> wrote:
> > On 2014-04-21 17:47, Edward Kmett wrote:
> >> I, for one, could get behind just taking ifM, whenM, unlessM for these
> >> operations, proper naming conventions aside.
> >>
> >> They've been independently reinvented in 60+ packages with these exact
> >> names.
> >>
> >> If we do this, over time we'll save another 60+ packages the trouble of
> >> doing the same thing.
> >
> > +1 (for the proposal, based on exactly the above summary)
>
> +1 from me too, because I have the same functions with these names in
> my non-cabal packages.
>
> There might be a lot of non-cabal whenM etc. out there.


And you're still missing a few with more specific type signatures, e.g.
xmonad's whenX.

-- 
brandon s allbery kf8nh                               sine nomine associates
allbery.b at gmail.com                                  ballbery at sinenomine.net
unix, openafs, kerberos, infrastructure, xmonad        http://sinenomine.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/libraries/attachments/20140421/f85ad9c3/attachment.html>


More information about the Libraries mailing list