{- An extended version of the representation of a monad transformer as a class, see Mark P. Jones's article in Meijers/Jeuring (Eds.): "Advanced Functional Programming...", Berlin/Heidelberg 1995 -} module MonadT where class MonadT t where lift :: Monad m => m a -> t m a start :: Monad m => t m a -> m a -- performs the calcuation represented by ( t m a) in m {-- Liftable is intended to map "lift" to an ADT which encapsulates the characteristic monadic operations. mapLift === fmap (lift .) if l could be declared as a Functor. --} class Liftable l where mapLift :: (MonadT t, Monad m) => l m -> l (t m)