
21 Apr
2014
21 Apr
'14
4:59 p.m.
On 04/21/2014 06:56 PM, David Mazieres wrote:
Mario Pastorelli
writes: Only the name 'mif' respects the rules with this type. The more generic version of 'ifM' is
ifM :: Monad m => m Bool -> a -> a -> a
and I don't think there is a name conversion for this kind of function in Control.Monad. Well, if you could actually implement the above function, convention would likely dictate that it be called "unsafeIf".
David
Yes, you are right. That's wrong, please ignore it. The type of ifM is ifM :: Monad m => m Bool -> m a -> m a -> m a so prepending 'm' is ok.