[Haskell-cafe] Re: ANNOUNCE: GotoT-transformers version 1.0

Antoine Latter aslatter at gmail.com
Thu Sep 9 00:24:12 EDT 2010

On Wed, Sep 8, 2010 at 9:43 PM, Gregory Crosswhite
<gcross at phys.washington.edu> 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:

I also have a sketch of me trying to use a single-continuation, but I
was defeated:

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.


More information about the Haskell-Cafe mailing list