
Hi Jason, thanks for your reply.
I was curious that we could bring really continuations into haskell, the
traditional callCC brings a lot of unnecessary
type restrictions
On Wed, Aug 24, 2011 at 12:45 PM, Jason Dagit
On Wed, Aug 24, 2011 at 9:19 AM, bob zhang
wrote: Hi, all I thought the right type for ContT should be newtype ContT m a = ContT {runContT :: forall r. (a-> m r) -> m r} and other control operators shift :: Monad m => (forall r . (a-> ContT m r) -> ContT m r) -> ContT m a reset :: Monad m => ContT m a -> ContT m a callCC :: ((a-> (forall r . ContT m r)) -> ContT m a) -> ContT m a
unfortunately, I can not make callCC type check, and don't know how to do it. I managed to make shift, reset type check
Correct me if I'm wrong, but you're wanting to implement the delimited form of continuations?
If so, you might take a look at this and the associated papers: http://hackage.haskell.org/package/CC-delcont
Jason
-- Best, bob