On Wed, Aug 24, 2011 at 9:19 AM, bob zhang <[email protected]> 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 _______________________________________________ Haskell-Cafe mailing list [email protected] http://www.haskell.org/mailman/listinfo/haskell-cafe
