Re:Algebraic Effects for the Rest of Us
by tome on Saturday May 30, 2026 @06:25AM
(#48334667)
Not sure why people are saying "you can't" when it seems to me the whole point of algebraic effects that you can. You can define g so that it has no ability to do "general IO", all it can do is yield log messages. Then f can call g in a way that turns the log messages into writes to stdout. For example, here's how you would do it in Bluefin:
[ Parent
| on HN ]
"You can't" is simpler, because the inevitable reply is "but how do I do actual logging inside g"
"Actual logging" as in direct access to IO?