Monoid Mary is a user on mastodon.social. You can follow them or interact with them if you have an account anywhere in the fediverse. If you don't, you can sign up here.
Monoid Mary @argumatronic

if "pure code" calls error but is never lifted into IO does it really throw an exception?

the one reply i got to that on 🐦 is unsatisfying: sure the error message that prints to the terminal *isn't* the exception, but how are you running pure code such that it *can* throw without invoking IO?

this is a stupid question, i guess, and it doesn't matter, except now i think i understand what my uncle meant when he i started learning programming and he told me, "baby, you never get out of I/O"

· Web · 0 · 2

@argumatronic This is hard to make satisfying, but I do think of it rather like the answer you already got: `error` is branching into some diverging code that the RTS can recognize (like "Infinite loop detected") and handle specially. My pure code is looping; the RTS happens to know that particular loop.

@acowley @argumatronic It kinda feels like there's an attitude of "we can't get away from bottom, so we might as well let ourselves use it for something".