Deeper integration with polysemy #121
Labels
Hacktoberfest
https://hacktoberfest.digitalocean.com/
log-action
Everything related to LogAction data type
package:co-log-polysemy
For: co-log-polysemy
Milestone
The
LogAction
data type is defined like this:https://github.com/kowainik/co-log/blob/746016089a44e06dadf23818044285bd3ab22135/co-log-core/src/Colog/Core/Action.hs#L90-L92
The initial assumption was to make it work with any monad. And nothing stops from specializing the
m
parameter to theSem
monad from thepolysemy
package!Currently we have the following interpreter for the
LogAction
:https://github.com/kowainik/co-log/blob/746016089a44e06dadf23818044285bd3ab22135/co-log-polysemy/src/Colog/Polysemy/Effect.hs#L82-L87
This interpreter assumes that that the
Sem r
monad has an ability to execute monadic effects of typem
. However, it seems like it's possible to loose this restriction with the following code:So instead of defining
LogAction
in some arbitrary monadm
, you can defineLogAction
that is capable of using theSem
monad itsefl.The text was updated successfully, but these errors were encountered: