[Haskell-cafe] Why no IO transformer monad?

Keean Schupke k.schupke at imperial.ac.uk
Sat Dec 18 13:23:55 EST 2004

As far as I understand it IO is a special case of a state monad (where
the state is the "World". If this is the case and there is a 
(StateT) then it should be possible to write an IO transformer. 
I also think because of some magic in the ST and IO monads, you cannot write
the transformer yourself, as it would require compiler support.


Henning Sato von Rosen wrote:

>Hi all!
>For each basic monad there seems to be a corresponding transformer,
>e.g.  'StateT' for 'State' and so on.
>I guess the reason lies in the fact that if there were an IO
>Transformer monad, one might run it and get the 'Universe' out of the
>IO monad.
>But, I am working on understanding IO magic, on a much more concrete
>level, so I am am looking for a really good explanation of the above.
>(And the IO monad in general.)
>Haskell-Cafe mailing list
>Haskell-Cafe at haskell.org

More information about the Haskell-Cafe mailing list