
25 Nov
2004
25 Nov
'04
7:40 a.m.
On 25 Nov 2004, at 10:07, Ian.Stark@ed.ac.uk wrote:
Way back in this thread, Koen Claessen mentioned the idea of a commutative version of the IO monad for handling things with identity. That doesn't quite do it, but I have a refinement that might. The thing is to focus on IO computations that are:
a) central -- their effect commutes with every other IO action b) affine -- their effect is not directly observable, and can be discarded.
Thus an element u of (IO a) is affine central if for all v::IO b and w::IO c,
do { x <- u; v } = v (affine)
If x does not occur in v, I presume? Jules