[Haskell-cafe] Why no IO transformer monad?

Keean Schupke k.schupke at imperial.ac.uk
Mon Dec 20 10:19:27 EST 2004


Ross Paterson wrote:

On the haskell list it has almost been decided that (ST RealWorld a) and 
(IO a)
_should_ merge and become the same thing.

    Keean.

>On Mon, Dec 20, 2004 at 02:16:52PM +0000, Keean Schupke wrote:
>  
>
>>Surely if IO is (ST RealWorld a) then (StateT RealWorld m a) is more or 
>>less the right thing?
>>    
>>
>
>But IO is not ST RealWorld (even if GHC pretends it is): other users
>of the world are not waiting for the new world produced by your Haskell
>program.
>
>IO is more accurately modelled by a resumption monad, cf
>
>http://www.haskell.org/pipermail/haskell-cafe/2003-August/004892.html
>
>That suggests a possible monad transformer:
>
>	data IOT m a = Return a | Invoke (m (SysCall (IOT m a)))
>
>but with no way to define runIOT :: Monad m => IOT m a -> IO (...),
>it's not much use.
>  
>



More information about the Haskell-Cafe mailing list