@hackage co-log-polysemy0.0.1.6
Composable Contravariant Comonadic Logging Library
Installation
Tested Compilers
Dependencies (3)
- base >=4.11 && <4.22
- co-log-core ^>=0.3.0.0
- polysemy >=1.2.0.0 && <1.10 Show all…
Dependents (8)
@hackage/polysemy-methodology-co-log, @hackage/techlab, @hackage/flashblast, @hackage/polysemy-http, @hackage/polysemy-methodology, @hackage/co-log-polysemy-formatting, Show all…
co-log-polysemy

co-log-polysemy package is a implementation of the
co-log-core logging based on
the polysemy extensible
effects library.
How to use
co-log-polysemy is compatible with the following GHC
versions - supported versions
In order to start using co-log-polysemy in your project, you
will need to set it up with these easy steps:
-
Add the dependency on
co-log-polysemyin your project's.cabalfile. For this, you should modify thebuild-dependssection according to the below section:build-depends: base ^>= LATEST_SUPPORTED_BASE , co-log-core ^>= LATEST_VERSION , polysemy ^>= LATEST_VERSION -
To use this package, refer to the below example
module Main (main) where import Prelude hiding (log) import Polysemy (Member, Sem, runM) import Colog.Core.IO (logStringStdout) import Colog.Polysemy (Log, log, runLogAction) example :: Member (Log String) r => Sem r () example = do log @String "First message..." log @String "Second message..." main :: IO () main = runM $ runLogAction @IO logStringStdout example