Re: [Haskell-cafe] Re: Changing type of 'when'

2009-01-28 Thread Jake McArthur
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Maurí­cio wrote: |> ignore m = m >> return () | | | But isn't exactly that the behavior of (>>)? ~ignore :: Monad m => m a -> m () ~(>>) :: Monad m => m a -> m b -> m b It may also be worth noting that ignore can be generalized to Functor:

[Haskell-cafe] Re: Changing type of 'when'

2009-01-28 Thread Maurí­cio
? It is easy for 'when' to ignore the result of the first computation, and this would not break existing code, and also save a lot of >> return ()s. As Neil Mitchell pointed out[1], ignoring results implicitly may indicate an error. Perhaps it's cleaner to define ignore m = m >> return ()

[Haskell-cafe] Re: Changing type of 'when'

2009-01-28 Thread Gleb Alexeyev
Maurí­cio wrote: ? It is easy for 'when' to ignore the result of the first computation, and this would not break existing code, and also save a lot of >> return ()s. As Neil Mitchell pointed out[1], ignoring results implicitly may indicate an error. Perhaps it's cleaner to define ignore m