Effect responsible for logging messages of type msg. Has similar
structure to LogAction.
You can think of this effect in the following way in terms of the existing
effects in polysemy:
:: a typeCtrl KGHC 9.10.3 · lts/ghc-9.10.x · c74966e · 2026-09-27
Moduleco-log-polysemy-0.0.1.4Haskell2010
SPDX-License-Identifier : MPL-2.0 Maintainer : Co-Log xrom.xkov@gmail.com Stability : Provisional Portability : Portable
This module contains logging effect which can be interpreted in terms of
LogAction from the co-log-core package.
Effect responsible for logging messages of type msg. Has similar
structure to LogAction.
You can think of this effect in the following way in terms of the existing
effects in polysemy:
Run Sem action with the corresponding LogActionSem. If you
have plain LogAction that works with some monad m, use
runLogAction instead.
Run a Log effect in terms of the given LogAction. The idea behind this
function is the following: if you have LogAction m msg then you can use this
action to tell how to io interpret effect Log. However, this is only possible
if you also have effect because running log action requires access to
monad Lift mm.
This function allows to use extensible effects provided by the polysemy
library with logging provided by co-log. You can construct LogAction
independently and then just pass to this function to tell how to log messages.
Several examples:
runLogAction mempty: interprets the Log effect by ignoring all messages.
runLogAction logStringStdout: interprets Log effect by
allowing to log String to stdout.