GNU bug report logs - #14347
reset, shift, continuation values truncated inconsistently

Previous Next

Package: guile;

Reported by: Jussi Piitulainen <jpiitula <at> ling.helsinki.fi>

Date: Sat, 4 May 2013 14:58:01 UTC

Severity: normal

Done: Andy Wingo <wingo <at> pobox.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Jussi Piitulainen <jpiitula <at> ling.helsinki.fi>
Subject: bug#14347: closed (Re: bug#14347: reset, shift, continuation
 values truncated inconsistently)
Date: Mon, 20 Jun 2016 21:08:02 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#14347: reset, shift, continuation values truncated inconsistently

which was filed against the guile package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 14347 <at> debbugs.gnu.org.

-- 
14347: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=14347
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Andy Wingo <wingo <at> pobox.com>
To: Jussi Piitulainen <jpiitula <at> ling.helsinki.fi>
Cc: 14347-done <at> debbugs.gnu.org
Subject: Re: bug#14347: reset, shift,
 continuation values truncated inconsistently
Date: Mon, 20 Jun 2016 23:06:59 +0200
On Sat 04 May 2013 09:47, Jussi Piitulainen <jpiitula <at> ling.helsinki.fi> writes:

> Hi, the following seems at least inconsistent to
> me and possibly unintended: I believe it
> demonstrates that the continuation captured by
> `shift' passes all its values to its continuation
> when it's called directly, but truncates them to
> the first value when it's bound to a variable
> outside the reset expression and then called.

Thank you for the report, and apologies for taking so long to fix it!
Fixed in a192c336a22b8c9ac354e88c2f2b317dff22b8c9 on stable-2.0.  2.1.3
already had it fixed, but by accident.

Andy

[Message part 3 (message/rfc822, inline)]
From: Jussi Piitulainen <jpiitula <at> ling.helsinki.fi>
To: <bug-guile <at> gnu.org>
Subject: reset, shift, continuation values truncated inconsistently
Date: 04 May 2013 10:47:15 +0300
Hi, the following seems at least inconsistent to
me and possibly unintended: I believe it
demonstrates that the continuation captured by
`shift' passes all its values to its continuation
when it's called directly, but truncates them to
the first value when it's bound to a variable
outside the reset expression and then called.

The documentation for reset and shift in the
manual does not quite say, but I believe the
captured continuation in these examples should be
the continuation of the shift expression inside
the reset expression, that is, it should simply
return the three values in all cases.

GNU Guile 2.0.5-deb+1-3
Copyright (C) 1995-2012 Free Software Foundation, Inc.
...
Enter `,help' for help.
scheme@(guile-user)> (use-modules (ice-9 control))
scheme@(guile-user)> (reset (shift k (k)) (values 3.1 2 3))
$1 = 3.1
$2 = 2
$3 = 3
scheme@(guile-user)> ((reset (shift k k) (values 3.1 2 3)))
$4 = 3.1
$5 = 2
$6 = 3
scheme@(guile-user)> (let ((k (reset (shift k k) (values 3.1 2 3)))) (k))
$7 = 3.1
scheme@(guile-user)> (define k (reset (shift k k) (values 3.1 2 3)))
scheme@(guile-user)> (k)
$8 = 3.1
scheme@(guile-user)> (k)
$9 = 3.1

(I installed guile-2.0 with apt-get on Ubuntu and got this.)




This bug report was last modified 9 years and 58 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.