Re: [Haskell-cafe] Why no IO transformer monad?

Henning Sato von Rosen
For each basic monad there seems to be a corresponding transformer, e.g. 'StateT' for 'State' and so on.
To be useful every transformer has a "run" method of some kind. For a hypothetical IO transformer it would look like runIOT :: Monad m => IOT m a -> m a ...which is basically the same as unsafePerformIO and defeats the purpose of having an IO Monad at all. If you want to retain the IO-type in the result, then you don't need IOT at all, layering any transformer on top of IO is exactly what's needed. Udo. __________________________________________________________ Mit WEB.DE FreePhone mit hoechster Qualitaet ab 0 Ct./Min. weltweit telefonieren! http://freephone.web.de/?mc=021201

What about: runIOT :: Monad m => IOT m a -> IO (m a) Keean. Udo Stenzel wrote:
Henning Sato von Rosen
schrieb am 18.12.04 18:31:11: For each basic monad there seems to be a corresponding transformer, e.g. 'StateT' for 'State' and so on.
To be useful every transformer has a "run" method of some kind. For a hypothetical IO transformer it would look like
runIOT :: Monad m => IOT m a -> m a
...which is basically the same as unsafePerformIO and defeats the purpose of having an IO Monad at all. If you want to retain the IO-type in the result, then you don't need IOT at all, layering any transformer on top of IO is exactly what's needed.
Udo.
__________________________________________________________ Mit WEB.DE FreePhone mit hoechster Qualitaet ab 0 Ct./Min. weltweit telefonieren! http://freephone.web.de/?mc=021201
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
participants (2)
-
Keean Schupke
-
Udo Stenzel