Is there a monad that doesn’t have a corresponding monad transformer (except IO)?

I’m with @Rhymoid on this one, I believe all Monads have two (!!) transformers. My construction is a bit different, and far less complete. I’d like to be able to take this sketch into a proof, but I think I’m either missing the skills/intuition and/or it may be quite involved. Due to Kleisli, every monad … Read more

Converting IO Int to Int

As a general rule you write something like this: do x <- somethingThatReturnsIO somethingElseThatReturnsIO $ pureFunction x There is no way to get the “Int” out of an “IO Int”, except to do something else in the IO Monad. In monad terms, the above code desugars into somethingThatReturnsIO >>= (\x -> somethingElseThatReturnsIO $ pureFunction x) … Read more