Closed jeiea closed 7 years ago
I prefer the current signature, as it avoids bugs of accidentally ignoring return values. This is a common debate on the haskell community.
On Thu, Feb 9, 2017, 8:56 PM jeiea notifications@github.com wrote:
Currently your all preludes export whenM :: m Bool -> m () -> m () intactly from Control.Monad. If I use act :: IO a with whenM, then it would be whenM mpred (act >> return ()). It can be bypassed by changing the signature to m Bool -> m a -> m (). And I think when is also considerable. How do you think?
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/snoyberg/mono-traversable/issues/123, or mute the thread https://github.com/notifications/unsubscribe-auth/AADBB2CCVd0yiDlUA2CoEadhbewY9Xqtks5ra2FKgaJpZM4L8hko .
Currently all your preludes export
whenM :: m Bool -> m () -> m ()
intactly fromControl.Monad
. If I useact :: IO a
withwhenM
, then it would bewhenM mpred (act >> return ())
. It can be bypassed by changing the signature tom Bool -> m a -> m ()
. And I thinkwhen
is also considerable. How do you think?