Restrict type of monadic binding
According to Do notation considered harmful#Safety the type of the monadic binding combinator (>>) should be restricted to
(>>) :: m () -> m a -> m a
This way, you can omit
_ <- only if the monadic return value has type
Types of some other monadic operations should be restricted, too.
mapM_ :: Monad m => (a -> m ()) -> [a] -> m () replicateM_ :: Monad m => Int -> m () -> m () sequence_ :: Monad m => [m ()] -> m () zipWithM_ :: Monad m => (a -> b -> m ()) -> [a] -> [b] -> m ()