[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: debugger restarts

From: Ludovic Courtès
Subject: Re: debugger restarts
Date: Fri, 05 Feb 2016 10:26:28 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

Federico Beffa <address@hidden> skribis:

> I've been playing a little bit with MIT Scheme and have noticed a very
> nice feature of the debugger: when you hit an error and enter the
> debugger, it allows you to continue execution of a program with a user
> supplied value (restarts).
> Looking for such a feature in Guile I've found this old thread:
> which suggests that it isn't. I'm wondering if something has moved in
> that direction since then.

Sorry for the laaate reply!  Unfortunately no, nothing has been done in
that direction, but it’d still be a welcome addition!

Currently the behavior of ‘throw’ (in boot-9.scm) is that it always
aborts to the catch prompt and runs the ‘throw’ handler from there; the
continuation of the faulty code is not captured, and thus cannot be
resumed like MIT Scheme’s (restart 2) does:

         (lambda ()
                 (if pre-unwind-handler
                     (custom-throw-handler tag k pre-unwind-handler)
                     (default-throw-handler tag k))))
         (lambda (cont k . args)   ;<- here we would want to call CONT
           (apply handler k args)))

We would need to make this customizable.  However, we don’t want to
systematically reify ‘cont’ here because that would be too costly.

I’m not sure how to approach this.  Maybe Andy or Mark know better?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]