[Haskell-cafe] Join a transformer

Michael Snoyman michael at snoyman.com
Thu Mar 14 04:24:23 CET 2013


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.

Michael

[1]
http://haddocks.fpcomplete.com/fp/7.4.2/20130301-40/monad-control/Control-Monad-Trans-Control.html
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20130314/70d74844/attachment-0001.htm>


More information about the Haskell-Cafe mailing list