GNU bug report logs - #17940
Nitpick: (lambda () (begin)) errors

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: guile; Severity: minor; Reported by: Taylan Ulrich Bayirli/Kammer <taylanbayirli@HIDDEN>; dated Fri, 4 Jul 2014 22:40:01 UTC; Maintainer for guile is bug-guile@HIDDEN.
Severity set to 'minor' from 'normal' Request was from Mark H Weaver <mhw@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 4 Jul 2014 22:39:50 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jul 04 18:39:50 2014
Received: from localhost ([127.0.0.1]:43189 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1X3C8z-0007dh-VO
	for submit <at> debbugs.gnu.org; Fri, 04 Jul 2014 18:39:50 -0400
Received: from eggs.gnu.org ([208.118.235.92]:56908)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <taylanbayirli@HIDDEN>) id 1X3C8w-0007dS-A6
 for submit <at> debbugs.gnu.org; Fri, 04 Jul 2014 18:39:47 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <taylanbayirli@HIDDEN>) id 1X3C8l-0002lr-GZ
 for submit <at> debbugs.gnu.org; Fri, 04 Jul 2014 18:39:40 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM,
 T_DKIM_INVALID autolearn=disabled version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:37488)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <taylanbayirli@HIDDEN>) id 1X3C8l-0002lf-DS
 for submit <at> debbugs.gnu.org; Fri, 04 Jul 2014 18:39:35 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:58624)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <taylanbayirli@HIDDEN>) id 1X3C8f-0000e4-Hd
 for bug-guile@HIDDEN; Fri, 04 Jul 2014 18:39:34 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <taylanbayirli@HIDDEN>) id 1X3C8a-0002jw-2Q
 for bug-guile@HIDDEN; Fri, 04 Jul 2014 18:39:29 -0400
Received: from mail-wi0-x233.google.com ([2a00:1450:400c:c05::233]:35618)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <taylanbayirli@HIDDEN>) id 1X3C8Z-0002js-RV
 for bug-guile@HIDDEN; Fri, 04 Jul 2014 18:39:23 -0400
Received: by mail-wi0-f179.google.com with SMTP id cc10so4414244wib.12
 for <bug-guile@HIDDEN>; Fri, 04 Jul 2014 15:39:22 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=date:message-id:from:to:subject;
 bh=c2iDqGsiLfISMTM3o6MQzHg+nZ4k/yBvGAZ61TJVDLM=;
 b=V1t6+WSl+SH9TgA1UQeWrra/UTcIGfmPaEn+uaK3IWNeXkIEbkzf/6RY13wL6c06ES
 g89juCO4dUmfE3BeyDEjtlTvjwmySSvpVTTDiV21ZLSZoqYQx8qHfYa5wooufj5DpXoI
 5aPT12i+59EWTaJMA+qbTmvINSYw7agMnOOj+onJ5oHli7IS9FV3l7RaTRwTFDeWJUoQ
 nlUomcR4i4PFUGmYFw9k2j1wJHpJ/wXtY0rBZyOz3mYGfl6NDQTClpWt+IpLf05BaPXa
 3eoKdppknZ+vDg+c+oOaE6ruUmqgZ6s4wb4s8p618MGRsecuDK8izvNtUQ2OPvjZhRJT
 uUWw==
X-Received: by 10.194.222.5 with SMTP id qi5mr14756016wjc.62.1404513562862;
 Fri, 04 Jul 2014 15:39:22 -0700 (PDT)
Received: from taylan.uni.cx ([85.100.205.21])
 by mx.google.com with ESMTPSA id s3sm71737603wje.36.2014.07.04.15.39.21
 for <bug-guile@HIDDEN>
 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
 Fri, 04 Jul 2014 15:39:22 -0700 (PDT)
Date: Sat, 05 Jul 2014 01:39:04 +0300
Message-Id: <87zjgoda0n.fsf@HIDDEN>
From: Taylan Ulrich Bayirli/Kammer <taylanbayirli@HIDDEN>
To: bug-guile@HIDDEN
Subject: Nitpick: (lambda () (begin)) errors
X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address
 (bad octet value).
X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address
 (bad octet value).
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -4.0 (----)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -4.0 (----)

Disclaimer: this is probably just a nitpick.

On guile-user someone brought up that (lambda () (begin)) errors,
arguably counter-intuitively:

http://lists.gnu.org/archive/html/guile-user/2014-07/msg00005.html

After much investigation over this trivial matter, I found that while
it's compliant with the RnRS (it's unspecified), it means Guile
extends the RnRS grammar in an "unexpected" way.  According to R5 and
7RS:

<lambda expression> -> (lambda <formals> <body>)
<body> -> <definition>* <sequence>
<sequence> -> <command>* <expression>
<expression> -> (other stuff) | <derived expression>
<derived expression> -> (other stuff) | (begin <sequence>)

meaning that the "(begin)" in that lambda body can be matched up to
<derived expression>, where it then almost matches the `begin' form
but fails only because in the RnRS grammar it must have at least one
expression (see <sequence> again; this is also reflected in section
4.2.3 where this `begin' form is explained; its template clearly shows
it must have at least one expression operand).

Guile on the other hand *generally* allows the expression-begin to
have zero operands, having it return *unspecified*.  So one would
expect it to work here as well, since one expects that this is a small
incremental extension to the RnRS grammar, but that's not the case.

If I'm not mistaken, `expand-body' in psyntax would be the place to
tackle this, and from a quick glance I'm guessing the benefit/effort
ratio for changing this is not very high. :-)

Taylan




Acknowledgement sent to Taylan Ulrich Bayirli/Kammer <taylanbayirli@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-guile@HIDDEN. Full text available.
Report forwarded to bug-guile@HIDDEN:
bug#17940; Package guile. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Mon, 25 Nov 2019 12:00:02 UTC

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