On Wed, Sep 8, 2010 at 9:43 PM, Gregory Crosswhite
<[email protected]> wrote:
>
> Of course, if someone can prove to me that I am wrong and that GotoT
> semantics can be implemented with continuations, then I would welcome
> this information.  :-)
>

Here's an implementation of GotoT with double-continuations:
http://hpaste.org/fastcgi/hpaste.fcgi/view?id=29823

I also have a sketch of me trying to use a single-continuation, but I
was defeated:
http://hpaste.org/fastcgi/hpaste.fcgi/view?id=29824

The idea is that on 'goto', we throw away the passed down continuation
in favor of an alternate return. The double-continuation approach is a
bit overkill since we don't have the equivalent of 'catch', to add
local scope to an alternate return.

My single continuation approach has two type-check errors I haven't
been able to understand yet, but hopefully you can see what I was
going for.

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

Reply via email to