3 ms·
… and rampantly introducing the IO monad only to remove it once the culprit is found.
by parentheses 4y ago
… and rampantly introducing the IO monad only to remove it once the culprit is found.
- nequo 4y agoWhy not use Debug.Trace?
- thesz 4y agoAbsolutely second this. Debug.Trace can use event log of RTS which is so cheap it is hard to believe.
- dllthomas 4y agoOn rare occasion you actually need to introduce additional sequencing to work out what's going on. In that case, you might well want to keep it after the fact, though, since your fix might depend on that sequencing. But yes, most of the time that you need something like printf debugging, Debug.Trace works great.
- rowanG077 4y agoIf you need sequencing you can use `seq` or even `deepseq`