If you want to log when you have errors, is it wrong to put in Data.TaggedError classes the logging behavior? The error becomes impure then, so i'm not sure if that's kind of an anti-pattern.
What is the recomended approach?
Edit: I'm not really sure if "impure" is really the right approach since it's not really run untili runtime. I actually don't see the issue with it. Let me know.