Proposal: add ifM and whenM to Control.Monad
wren romano
winterkoninkje at gmail.com
Sun Apr 20 23:22:18 UTC 2014
+1 for finally adding ifM, whenM, and unlessM to Control.Monad (what
about guardM?)
As far as bike-shedding goes, the naming-convention abiding mif,
mwhen, and munless are also fine— albeit they look a bit strange.
While the official fooM vs mfoo convention is spelled out in
Control.Monad, I don't know how much anyone actually pays attention to
that; a lot of people use the fooM pattern ubiquitously instead. In
practice the mfoo pattern is only used with mzero, mplus, msum, and
mfilter— so in practice it seems more like "mfoo means the MonadPlus
variant of foo" whereas "fooM means the Monad variant of foo".
--
Live well,
~wren
More information about the Libraries
mailing list