Hacker News new | ask | show | jobs
by morcus 270 days ago
Disclaimer: I don't know much about this programming language or about Effects, so there may be a better way to do this already

something I'd sometimes like to do when I'm profiling complex code will be to have an (essentially) global variable tracking the sum of how long a function took to execute over all invocations.

I am guessing that mutating the global counter would count as an effect, and I wouldn't really want to add the effect all the way through the call graph. I think this is something where the handling ought to be similar to how you're handling Debug.