2 ms·
For debug there is Debug.Trace which is about perfect. For non-debug, you may be overestimating how useful it is to output from pure functions in production.
by kadoban 7y ago
For debug there is Debug.Trace which is about perfect.
For non-debug, you may be overestimating how useful it is to output from pure functions in production.
In general when you are in a situation where you need to change the Monad you're under, there's techniques and libraries for that (one way you define it once, give it a name, etc.).
The biggest pain tends to be going from pure to monadic in the first place, which last I used Haskell there wasn't much for but to just do it. There may be more tooling now, haven't seen.