[Haskell] Re: Crazy class stuff
taralx at gmail.com
Tue Mar 13 03:54:27 EDT 2007
On 3/13/07, Taral <taralx at gmail.com> wrote:
> And it doesn't work. I know what I want it to do, how do I express it right?
This is closer, but still doesn't work:
class (Monad i, Monad o) => MonadTrans' i o where
lift' :: i a -> o a
instance Monad m => MonadTrans' m m where
lift' = id
instance (MonadTrans t, MonadTrans' a b) => MonadTrans' a (t b) where
lift' = lift . lift'
Taral <taralx at gmail.com>
"You can't prove anything."
-- Gödel's Incompetence Theorem
More information about the Haskell