I've done further investigation and expect to take another crack at articulating this stuff sometime. Soare's paper on "Computation and Recursion" (see the link on my "Resources" page) is extremely enlightening.

-gregg

]]>Would "The key idea is to treat an expression of type IO a as a lambda calculus term with a normal-form value of type a, and also possible side effects of accepting input and producing output during the reduction of the term to normal form" be better? I still don't like that it really isn't the term itself that is performing IO; it's the language implementation performing it as directed by the reduction.

]]>Paul ]]>

I'm afraid the only sample code is "getChar". My motivation is to figure out how to describe what it means in purely mathematical terms. Showing how to *use* it involves monads, but that's a different topic.

Some diagrams would be useful, though. I'm working on a paper with simple diagrams that I hope will clarify my points.

-gregg

]]>As a Haskell n00b who is still trying to grasp monads, I found this reading quite interesting. Thank you. ]]>