[Haskell] Types of when and unless in Control.Monad
lemming at henning-thielemann.de
Wed Jun 6 10:53:45 CEST 2012
On Wed, 6 Jun 2012, Andreas Abel wrote:
> Well, but nothing in the type system prevents you from writing
> mapM f xs >> cont
> do mapM f xs
> so you are not warned of a space leak in the common situations anyway, but
> you are responsible yourself.
> I don't know why 'when' should be any different than '>>'.
That's why I said that I also prefer
(>>) :: m () -> m a -> m a
More information about the Libraries