4

Recently I studied monad transformers in Haskell. And I became very curious why there is no IOT monad transformer. For example, I can add IORef environment to IO monad like this

type IORefEnv s = ReaderT (IORef s) IO

But why can't I add IO effect to my environment in a similar way?

type IOReader r a = IOT (Reader r) a

DK318
  • 41
  • 1
  • 1
    Hm. I'm actually not sure the marked question is a duplicate. The answer there shows why one (completely plausible, reasonable guess for an) implementation of `IOT` doesn't work, but not why it can't be done in general. – Daniel Wagner Dec 21 '21 at 17:29

0 Answers0