
16 Dec
2012
16 Dec
'12
1:30 p.m.
What about this instance: module Data.Functor.Compose import Control.Monad.Trans.Class (MonadTrans, lift) instance (Monad f) => MonadTrans (Compose f) where lift x = Compose (return x) ? The constraint (Monad f) is ugly. An (Applicative f) may not fit to a *Monad*Trans class. On the other hand, Compose is more oftenly used to compose Applicative functors.