It seems that the monad-control package is only used to make instances for MonadBase IO Req and MonadBaseControl IO Req. Since Req is implemented as a newtype wrapping ReaderT _something IO, it's safe to do
instance MonadUnliftIO Req where
withRunInIO = liftBaseWith
thereby enabling req consumers following the ReaderT pattern to do all the things possible with monad-control without incurring it as a dependency.
Even if the monad-control instances are offered long-term, for backwards compatibility or any other reason, at least please offer MonadUnliftIO in addition. The unliftio-core package is tiny and the implementation is just these two lines.
Thanks!
It seems that the monad-control package is only used to make instances for
MonadBase IO ReqandMonadBaseControl IO Req. Since Req is implemented as a newtype wrappingReaderT _something IO, it's safe to dothereby enabling req consumers following the ReaderT pattern to do all the things possible with monad-control without incurring it as a dependency.
Even if the monad-control instances are offered long-term, for backwards compatibility or any other reason, at least please offer MonadUnliftIO in addition. The unliftio-core package is tiny and the implementation is just these two lines.
Thanks!