From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jussi Piitulainen Newsgroups: gmane.lisp.guile.bugs Subject: bug#14347: reset, shift, continuation values truncated inconsistently Date: 04 May 2013 10:47:15 +0300 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1367680151 4747 80.91.229.3 (4 May 2013 15:09:11 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 4 May 2013 15:09:11 +0000 (UTC) To: 14347@debbugs.gnu.org Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Sat May 04 17:09:10 2013 Return-path: Envelope-to: guile-bugs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UYe5F-00043T-GA for guile-bugs@m.gmane.org; Sat, 04 May 2013 17:09:09 +0200 Original-Received: from localhost ([::1]:53477 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UYe5F-0004qK-1W for guile-bugs@m.gmane.org; Sat, 04 May 2013 11:09:09 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:50085) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UYdtn-0000mD-Uv for bug-guile@gnu.org; Sat, 04 May 2013 10:57:22 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UYdtl-0001qo-3J for bug-guile@gnu.org; Sat, 04 May 2013 10:57:19 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:54023) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UYdtk-0001pP-Vt for bug-guile@gnu.org; Sat, 04 May 2013 10:57:17 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1UYduU-0003oz-86 for bug-guile@gnu.org; Sat, 04 May 2013 10:58:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Jussi Piitulainen Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-guile@gnu.org Resent-Date: Sat, 04 May 2013 14:58:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 14347 X-GNU-PR-Package: guile X-GNU-PR-Keywords: X-Debbugs-Original-To: Original-Received: via spool by submit@debbugs.gnu.org id=B.136767946814640 (code B ref -1); Sat, 04 May 2013 14:58:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 4 May 2013 14:57:48 +0000 Original-Received: from localhost ([127.0.0.1]:58132 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UYduE-0003nz-Rg for submit@debbugs.gnu.org; Sat, 04 May 2013 10:57:48 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:50846) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UYXCa-0002pN-3o for submit@debbugs.gnu.org; Sat, 04 May 2013 03:48:18 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UYXBo-0003lM-RS for submit@debbugs.gnu.org; Sat, 04 May 2013 03:47:31 -0400 Original-Received: from lists.gnu.org ([208.118.235.17]:53778) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UYXBo-0003lI-OP for submit@debbugs.gnu.org; Sat, 04 May 2013 03:47:28 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:33961) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UYXBl-00088p-VC for bug-guile@gnu.org; Sat, 04 May 2013 03:47:28 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UYXBj-0003ik-LX for bug-guile@gnu.org; Sat, 04 May 2013 03:47:25 -0400 Original-Received: from smtp-rs1-vallila2.fe.helsinki.fi ([128.214.173.75]:54952) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UYXBj-0003Ua-Ac for bug-guile@gnu.org; Sat, 04 May 2013 03:47:23 -0400 Original-Received: from ruuvi.it.helsinki.fi.ling.helsinki.fi (ruuvi.it.helsinki.fi [128.214.205.65]) by smtp-rs1.it.helsinki.fi (8.14.4/8.14.4) with ESMTP id r447lF0G023262 for ; Sat, 4 May 2013 10:47:16 +0300 Original-Lines: 37 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Mailman-Approved-At: Sat, 04 May 2013 10:57:45 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 140.186.70.43 X-Mailman-Approved-At: Sat, 04 May 2013 11:09:06 -0400 X-BeenThere: bug-guile@gnu.org List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Original-Sender: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.bugs:7115 Archived-At: 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.)