Adding an ignore function to Control.Monad

Henning Thielemann lemming at
Wed Jun 10 15:21:13 EDT 2009

Isaac Dupree schrieb:
> On the other hand, maybe it's also an argument to change all the
> functions like forkIO from
> :: IO () -> IO ThreadID
> to
> :: IO a -> IO ThreadID
> I mean, surely they don't rely on the value of a () return-type, other
> than to pass on to other places that artificially require the ()-type?

No, I think it is already bad enough, that (>>) has type (m a -> m b ->
m b) instead of (m () -> m b -> m b). It is like automatically ignoring
return values in C. It is too easy to ignore a result that is important.

More information about the Libraries mailing list