The non-TH logging functions were introduced in monad-logger-0.3.2.0. They are built on logWithoutLoc, which has been exported since 0.3.23, or logCS. The type of logWithoutLoc is:
logWithoutLoc :: (MonadLogger m, ToLogStr msg) => LogSource -> LogLevel -> msg -> m ()
but the logging functions are more specialised in the message type (Text), for example:
logDebugNS :: MonadLogger m => LogSource -> Text -> m ()
logDebugNS src = logWithoutLoc src LevelDebug
logCS also has a generalised msg.
Is there anything preventing these functions from having the more general type (given that a Text instance for toLogStr msg is exported)? For example:
logDebugNS :: (MonadLogger m, ToLogStr msg) => LogSource -> msg -> m ()
If there is not a barrier, I will propose a pull request.
The non-TH logging functions were introduced in
monad-logger-0.3.2.0
. They are built onlogWithoutLoc
, which has been exported since0.3.23
, orlogCS
. The type oflogWithoutLoc
is:but the logging functions are more specialised in the message type (
Text
), for example:logCS
also has a generalisedmsg
.Is there anything preventing these functions from having the more general type (given that a
Text
instance fortoLogStr msg
is exported)? For example:If there is not a barrier, I will propose a pull request.