[racket-dev] Abort behavior different in DrRacket & Racket
I've pushed a fix for this. Thanks for pointing it out.
Robby
On Wed, May 23, 2012 at 4:42 PM, Asumu Takikawa <asumu at ccs.neu.edu> wrote:
> Hi all,
>
> In the Guide entry on control[1], there's a section detailing prompts
> and abort. Here's an example from that section:
>
>> (define (escape v)
> (abort-current-continuation
> (default-continuation-prompt-tag)
> (lambda () v)))
>> (+ 1 (+ 1 (+ 1 (+ 1 (+ 1 (+ 1 (escape 0)))))))
>
> If you run this in the command-line REPL, it'll produce 0 as the Guide
> claims. However, if you run it in DrRacket, it will not return.
>
> It turns out that the abort handler for DrRacket is just:
> (lambda args (void))
>
> while the abort handler for Racket is this:
> (lambda results (for-each (current-print) results))
>
> Was this intentional or should both REPLs behave the same way for
> aborts?
>
> [1]: http://pre.racket-lang.org/docs/html/guide/prompt.html
>
> Cheers,
> Asumu
> _________________________
> Racket Developers list:
> http://lists.racket-lang.org/dev