
24 Aug
2011
24 Aug
'11
12:45 p.m.
On Wed, Aug 24, 2011 at 9:19 AM, bob zhang
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