unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
From: Stefan Israelsson Tampe <stefan.itampe@gmail.com>
To: 39811@debbugs.gnu.org
Subject: bug#39811: Missing dynwind exit application
Date: Thu, 27 Feb 2020 19:59:25 +0100	[thread overview]
Message-ID: <CAGua6m2ez-P3Bic=2kBgNf-QzYAiGbA0Zkms9A5XE-VaOEbQ1Q@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 762 bytes --]

Executing this code on guile-3.0.0:

(dynamic-wind
 (lambda () (pk 'enter))
 (lambda () (catch #t
              (lambda () (throw 1))
              (lambda x (pk 'catch x) (apply throw x))))
 (lambda () (pk 'leave)))

Leads to the output:

scheme@(guile-user)> (load "bug.scm")
;;; (enter)
;;; (catch (a))

ice-9/boot-9.scm:1669:16: In procedure raise-exception:
Throw to key `a' with args `()'.

What, it does not execute the leave part of the dynamic wind.

This works however,

(catch #t
  (lambda ()
    (dynamic-wind
      (lambda () (pk 'enter))
      (lambda () (catch #t
                   (lambda () (throw 'a))
                   (lambda x (pk 'catch x) (apply throw x))))
      (lambda () (pk 'leave))))
  (lambda x #f))

So is this how it should be?

[-- Attachment #2: Type: text/html, Size: 1371 bytes --]

             reply	other threads:[~2020-02-27 18:59 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-27 18:59 Stefan Israelsson Tampe [this message]
2020-03-03 20:33 ` bug#39811: Missing dynwind exit application Andy Wingo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAGua6m2ez-P3Bic=2kBgNf-QzYAiGbA0Zkms9A5XE-VaOEbQ1Q@mail.gmail.com' \
    --to=stefan.itampe@gmail.com \
    --cc=39811@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).