bob zhang <[email protected]> wrote:

> I thought the right type for ContT should be
> newtype ContT m a = ContT {runContT :: forall r. (a-> m r) -> m r}

No, that will effectively make it impossible to make use of CPS effects,
hence turning your ContT into an IdentityT-like monad transformer, which
can only change the semantics of the underlying monad.  More concretely
what you are implementing here is a codensity as you can find it in the
monad-ran package by Edward K.


Greets,
Ertugrul


-- 
nightmare = unsafePerformIO (getWrongWife >>= sex)
http://ertes.de/



_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to