Separate Logger
and IO-local context to allow Logger
to be a ProFunctor
#130
Labels
Logger
and IO-local context to allow Logger
to be a ProFunctor
#130
Currently, creating a logger is effectful because we create an
IOLocal
context.The actual interface requires a local instance to allow adding context to effects:
This in turn allows us to scope context to an effect value whenever we have a logger in scope:
This is very convenient and easy to use. There are 2 main drawbacks:
Profunctor
for this interfaceChallenges
If the
Logger
no longer has a reference to the local context, we place the burden on the user to pass around this context. It's not clear if there's a good solution to avoid this (maybe Odin has solved this?).Proposal
Simplify the interface to something akin to:
The text was updated successfully, but these errors were encountered: