There is an interesting claim that MonadIO
constraint tells more about the function using it than if it were using IO
directly:
foo :: MonadIO m => m a -> m a
Reason: MonadIO requires that the IO be in positive, not negative, position.
This lets us know, for example, that foo is safe to use in a continuation-based monad like ContT or Conduit.
How does MonadIO
enforce this? Is it always the case or is it related to the example?