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).
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 interpretingWriter
andTrace
in terms of another effect, such asIO
, allowingWriter
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).