I have been thinking about this topic. Where I am stuck, from the perspective of a 'wrapper', is that the logging functions in monad-logger have more general types than the ones in rio. For example:
class Monad m => MonadLogger m where ...
logWithoutLoc :: (MonadLogger m, ToLogStr msg) => LogSource -> LogLevel -> msg -> m ()
compared to:
class Monad m => MonadIO m where ...
logGeneric :: (MonadIO m, MonadReader env m, HasLogFunc env, HasCallStack) => LogSource -> LogLevel -> Utf8Builder -> m ()
MonadLogger m is not subject to the MonadIO m constraint.
See the preference at comment.
I have been thinking about this topic. Where I am stuck, from the perspective of a 'wrapper', is that the logging functions in
monad-logger
have more general types than the ones inrio
. For example:compared to:
MonadLogger m
is not subject to theMonadIO m
constraint.