3 ms·
> spent hours figuring out how to debug-print a value from a pure function What method did you try to figure it out? If I google "haskell debug print pure fun
by nh2 7y ago
> spent hours figuring out how to debug-print a value from a pure function
What method did you try to figure it out?
If I google "haskell debug print pure function", the first three results I get are:
* https://hackage.haskell.org/package/base-4.12.0.0/docs/Debug-Trace.html https://hackage.haskell.org/package/base-4.12.0.0/docs/Debug...
* https://stackoverflow.com/questions/13265783/trace-output-in-pure-function https://stackoverflow.com/questions/13265783/trace-output-in...
* https://en.wikibooks.org/wiki/Haskell/Debugging https://en.wikibooks.org/wiki/Haskell/Debugging
and they all have easy, one-line, correct examples of how to do it, within the first 20 seconds of reading.
(This is not to criticise -- sometimes one misses the forest for the trees -- as a professional Haskell consultant who runs trainings I am genuinely interested into what problems people face and why.)
- awinter-py 7y agosaw a lot of these links and passed over them -- I had it in my head that I could use the `print` command and that I didn't need the debug lib shrug there's always an adjustment process when learning something new