upvote
For caveman debugging, if I'm not sitting in a monad, I usually reach for something like Debug.Trace. Typically that's in Idris or my own language, but I see that haskell has it too.

For my own language, I have the syntax highlighting set to put the `trace` keyword in red, so I can easily clean up.

reply
Debug.Trace.trace and friends can help here. This can work from pure code.

But the lazy evaluation does imply that trace functions only execute when the statement is actually forced evaluation. But it is actually quite helpful during debugging..

reply