News for hackers. Stuff that matters.
Re:Carnegie Mellon's intro functional programming lectures a... by mrkeen on Monday November 20, 2023 @02:48PM (#38353483)
Just let all your functions live in IO then. You'll still come out ahead.

Or do an unsafePerformIO.

Or use trace (where someone else has done the unsafePerformIO for you).

Or use a Writer.

Or introduce some logging capability (Logger m =>) onto your code.

Or take a look at all the man-hours that have been spent on trying to perfect logging: https://hackage.haskell.org/packages/tag/logging

Re:Carnegie Mellon's intro functional programming lectures a... by frozenlettuce on Monday November 20, 2023 @03:19PM (#38354032)
yeah, biting the bullet seems to be the way to go. As you mention the lots of "man-hours that have been spent on trying to perfect logging", when doing research the usage of that time might be ok, but when building a product you might need to make concessions.