[Haskell] Types of when and unless in Control.Monad
Henning Thielemann
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
>
> or
>
> do mapM f xs
> cont
>
> 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
mailing list