freer-effects icon indicating copy to clipboard operation
freer-effects copied to clipboard

Add handler functions for dealing with Writers and Trace interactively

Open axman6 opened this issue 8 years ago • 3 comments

One of the common uses for Writer is to provide pure logging. Sometimes it is useful to be able to get these logging values as they occur during interpretation. I've added functions for interpreting Writer and Trace in terms of another effect, such as IO, allowing Writer to be used for logging, using different logging levels and handle each level differently (a use case that has come up at work where we want to add tracing info but ignore it unless debugging).

axman6 avatar Jun 09 '17 12:06 axman6

Hi @axman6. Would pr #30 solve the part with the Trace effect?

xkollar avatar Jun 10 '17 10:06 xkollar

@xkollar looks perfect to me!

axman6 avatar Jun 10 '17 11:06 axman6

@axman6: thanks for having a look. I'll try harder to get it into a master :-).

xkollar avatar Jun 10 '17 11:06 xkollar