Michael Snoyman | 14 Mar 04:24 2013

Join a transformer

I'm wondering if this pattern exists and has a name. We have the concept of joining a Monad:

join :: Monad m => m (m a) -> ma

How about joining a monad transformer?

joinT :: (Monad m, MonadTrans t) => t (t m) a -> t m a

I believe implementing this in terms of MonadTransControl[1] might be possible, but I was wondering if there's an already existing idiom for this.


Haskell-Cafe mailing list
Haskell-Cafe <at> haskell.org