From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Taylan Ulrich Bayirli/Kammer Newsgroups: gmane.lisp.guile.bugs Subject: bug#17940: Nitpick: (lambda () (begin)) errors Date: Sat, 05 Jul 2014 01:39:04 +0300 Message-ID: <87zjgoda0n.fsf@taylan.uni.cx> NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1404513626 5888 80.91.229.3 (4 Jul 2014 22:40:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 4 Jul 2014 22:40:26 +0000 (UTC) To: 17940@debbugs.gnu.org Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Sat Jul 05 00:40:18 2014 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 1X3C9R-0003TG-K1 for guile-bugs@m.gmane.org; Sat, 05 Jul 2014 00:40:17 +0200 Original-Received: from localhost ([::1]:38315 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X3C9Q-0000ku-Mh for guile-bugs@m.gmane.org; Fri, 04 Jul 2014 18:40:16 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58684) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X3C9I-0000hZ-UR for bug-guile@gnu.org; Fri, 04 Jul 2014 18:40:14 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X3C9D-0002su-9V for bug-guile@gnu.org; Fri, 04 Jul 2014 18:40:08 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:52039) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X3C9D-0002sX-5s for bug-guile@gnu.org; Fri, 04 Jul 2014 18:40:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1X3C9C-0007eD-Ga for bug-guile@gnu.org; Fri, 04 Jul 2014 18:40:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Taylan Ulrich Bayirli/Kammer Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Fri, 04 Jul 2014 22:40:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 17940 X-GNU-PR-Package: guile X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-guile@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.140451359029374 (code B ref -1); Fri, 04 Jul 2014 22:40:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 4 Jul 2014 22:39:50 +0000 Original-Received: from localhost ([127.0.0.1]:43189 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X3C8z-0007dh-VO for submit@debbugs.gnu.org; Fri, 04 Jul 2014 18:39:50 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:56908) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X3C8w-0007dS-A6 for submit@debbugs.gnu.org; Fri, 04 Jul 2014 18:39:47 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X3C8l-0002lr-GZ for submit@debbugs.gnu.org; Fri, 04 Jul 2014 18:39:40 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:37488) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X3C8l-0002lf-DS for submit@debbugs.gnu.org; Fri, 04 Jul 2014 18:39:35 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58624) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X3C8f-0000e4-Hd for bug-guile@gnu.org; Fri, 04 Jul 2014 18:39:34 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X3C8a-0002jw-2Q for bug-guile@gnu.org; Fri, 04 Jul 2014 18:39:29 -0400 Original-Received: from mail-wi0-x233.google.com ([2a00:1450:400c:c05::233]:35618) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X3C8Z-0002js-RV for bug-guile@gnu.org; Fri, 04 Jul 2014 18:39:23 -0400 Original-Received: by mail-wi0-f179.google.com with SMTP id cc10so4414244wib.12 for ; 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) Original-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 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 04 Jul 2014 15:39:22 -0700 (PDT) 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-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 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:7512 Archived-At: 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 ) -> * -> * -> (other stuff) | -> (other stuff) | (begin ) meaning that the "(begin)" in that lambda body can be matched up to , where it then almost matches the `begin' form but fails only because in the RnRS grammar it must have at least one expression (see 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