|
|
|
|
|
by tsimionescu
2443 days ago
|
|
Because as code evolves you may find you need some logging in pureFun and now you have to go and sprinkle some IO wherever pureFun is used, which may propagate to who knows how many other places. Of course, I suppose there is always unsafePerformIO, at least for those late-night debug sessions. |
|
For temporary debug output you should probably consider the Debug.Trace module before unsafePerformIO. It has a simpler interface and doesn't introduce the possibility of arbitrary I/O, just text output (and event logging if that's enabled in the RTS).