[Haskell-cafe] Yet another IO initializer: Effectful declarations and an ACIO monad

Jules Bean jules at jellybean.co.uk
Thu Nov 25 07:40:50 EST 2004

On 25 Nov 2004, at 10:07, Ian.Stark at 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?


More information about the Haskell-Cafe mailing list