freer-effects
freer-effects copied to clipboard
Add handler functions for dealing with Writers and Trace interactively
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).
Hi @axman6. Would pr #30 solve the part with the Trace effect?
@xkollar looks perfect to me!
@axman6: thanks for having a look. I'll try harder to get it into a master :-).