[Haskell-cafe] MonadTrans lift implementation

Jonathan Cast jonathanccast at fastmail.fm
Mon Jan 19 16:47:03 EST 2009

On Mon, 2009-01-19 at 21:31 +0000, Ross Paterson wrote:
> On Mon, Jan 19, 2009 at 01:13:37PM -0800, Jonathan Cast wrote:
> > (On the other hand, your hunch that lift = return is correct --- so you
> > get a cookie for that; it's just that return here is neither the return
> > of the monad for m nor the return of the monad for ReaderT m.  It is,
> > instead, the return of the *applicative functor* --- on the category of
> > monads and monad homomorphisms --- associated to the monad transformer
> > ReaderT.)
> It's also a monad in the category of monads, as are ErrorT, StateT and
> WriteT (see Moggi, An Abstract View of Programming Languages, 1989, s4).

Nice!  I really haven't studied monad transformers nearly as much as I
should have.  (I also really need to read more Moggi :)


More information about the Haskell-Cafe mailing list