From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andy Wingo Newsgroups: gmane.lisp.guile.bugs Subject: Re: (+ (values 1 2)) should be 1 Date: Tue, 24 May 2011 15:11:19 +0200 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1306242699 28137 80.91.229.12 (24 May 2011 13:11:39 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 24 May 2011 13:11:39 +0000 (UTC) Cc: bug-guile To: Hans Aberg Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Tue May 24 15:11:35 2011 Return-path: Envelope-to: guile-bugs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QOrOY-0005w0-Ov for guile-bugs@m.gmane.org; Tue, 24 May 2011 15:11:34 +0200 Original-Received: from localhost ([::1]:60699 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QOrOY-0004uF-Al for guile-bugs@m.gmane.org; Tue, 24 May 2011 09:11:34 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:58670) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QOrOT-0004u7-Ob for bug-guile@gnu.org; Tue, 24 May 2011 09:11:33 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QOrOQ-0003Tg-0M for bug-guile@gnu.org; Tue, 24 May 2011 09:11:29 -0400 Original-Received: from a-pb-sasl-sd.pobox.com ([64.74.157.62]:43683 helo=sasl.smtp.pobox.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QOrOP-0003Tc-Sn for bug-guile@gnu.org; Tue, 24 May 2011 09:11:25 -0400 Original-Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by a-pb-sasl-sd.pobox.com (Postfix) with ESMTP id B2B5A2C11; Tue, 24 May 2011 09:13:33 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=sasl; bh=EbeotbdFtQsk32c/SSlTU3NDOg4=; b=qoX8jx 5xJCmgsdOZim+Wa8eEDj3tnyJ3fyDI6Sh1SfZV/oDPkCejO6y67+kJqESNR5MNKg 2au3Y8SckyhdjrSFq8ktqhvFecHsin7gEcPDmg2WLE0JWer2txQ26o5trnpaob3W a0K2J6ZsJtjaqXEgs4WCeJwCyuGHo4kAhaCqU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; q=dns; s=sasl; b=lS3H4T7zTFGaqpLVI/RBS7OYD6RNCIMC tBKf/B1S/4NUZCm4ovpz78O0PjuvCrmzyJPnXbe2ImU1R7NumdmoV9TS9yEDEPrB df3cDilv8UR4s/r71xXh/uuu3q+/6v0PyNdjMUCxKuEgPYOtS3ms0hDO9+A8uyf4 Mnc1E3lDAPU= Original-Received: from a-pb-sasl-sd.pobox.com (unknown [127.0.0.1]) by a-pb-sasl-sd.pobox.com (Postfix) with ESMTP id 9FCDD2C10; Tue, 24 May 2011 09:13:32 -0400 (EDT) Original-Received: from unquote.localdomain (unknown [90.164.198.39]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by a-pb-sasl-sd.pobox.com (Postfix) with ESMTPSA id 057A02C0F; Tue, 24 May 2011 09:13:30 -0400 (EDT) In-Reply-To: (Hans Aberg's message of "Tue, 24 May 2011 12:35:36 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) X-Pobox-Relay-ID: 9FD84C6C-8607-11E0-BA25-D6B6226F3D4C-02397024!a-pb-sasl-sd.pobox.com X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta) X-Received-From: 64.74.157.62 X-BeenThere: bug-guile@gnu.org X-Mailman-Version: 2.1.14 Precedence: list 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:5612 Archived-At: On Tue 24 May 2011 12:35, Hans Aberg writes: > On 23 May 2011, at 15:49, Andy Wingo wrote: > >>>> But, it is 1 and 2, currently. (+ FOO) inlines just to FOO, too >>>> optimistically. >>> >>> It is unspecified according to rsr5. >> >> I know. I'm talking about Guile here. > > The Guile manual, sec. 10.2.5.2, says that SCM_UNSPECIFIED is to be used when the Scheme standard says the return is an unspecified value. > > So this Lisp extension breaks off from that. If one wants it, perhaps, there should be some way to invoke it. Hans, you are misreading. (+ 1) is 1 according to the R5RS. (+ "foo") is an error. (+ (values 1 2)) is unspecified, as an instance of returning an unexpected number of values to a continuation, but it is not an instance of the unspecified value. When a continuation that expects one value receives more values than it is expecting -- e.g., the <> in (+ <>) expects one value -- Guile truncates those values to the first one. If such a continuation receives 0 values, Guile signals an error. Andy -- http://wingolog.org/