[slime-devel] [BUG] Weird interplay between SLDB, condition system, and READ

Tobias C. Rittweiler tcr at freebits.de
Fri Jan 18 18:43:06 UTC 2008

Hi all,

The following works in a raw SBCL session, but not when used with Slime:

  (defun call-with-retry-restart (msg thunk)
          (lambda () (throw 'retry nil))
            (lambda (stream)
              (write msg :stream stream))))
      (catch 'ok
        (loop do (catch 'retry
                   (format t "CATCH 'RETRY~%")
                   (throw 'ok (funcall thunk)))
              (format t "LOOP~%")))))

  (defmacro with-retry-restart ((&key (msg "Retry.")) &body body)
    (check-type msg string)
    `(call-with-retry-restart ,msg #'(lambda () , at body)))

  (with-retry-restart ()
    (format t "BODY~%")
    (unless (equal (read) "OUTTA")
      (error "Lost in a maze!")))

After having invoked the retry restart, the new computation is aborted
by the call to READ. I tried to get at what's causing this, but ran out
of time. Perhaps you're luckier. Thanks in advance.


More information about the slime-devel mailing list