[Haskell-cafe] How to make callCC more dynamic

bob zhang bobzhang1988 at gmail.com
Wed Aug 24 19:23:07 CEST 2011


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 <dagitj at gmail.com> wrote:

> On Wed, Aug 24, 2011 at 9:19 AM, bob zhang <bobzhang1988 at gmail.com> 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20110824/b04ada0b/attachment.htm>


More information about the Haskell-Cafe mailing list