Skip to content

Instantly share code, notes, and snippets.

------------------------------------------------------------------------------
class MonadTrans t where
lift :: Monad m => m a -> t m a
lifted :: Monad m => ((t m a -> m a) -> m a) -> t m a
lift = lifted . const
-----------------------------------------------------------------------------
instance (MonadTrans t, Monad m) => Monad (t m) where
return = lift . return