From unknown Sun Jun 15 08:47:57 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#17940 <17940@debbugs.gnu.org> To: bug#17940 <17940@debbugs.gnu.org> Subject: Status: Nitpick: (lambda () (begin)) errors Reply-To: bug#17940 <17940@debbugs.gnu.org> Date: Sun, 15 Jun 2025 15:47:57 +0000 retitle 17940 Nitpick: (lambda () (begin)) errors reassign 17940 guile submitter 17940 Taylan Ulrich Bayirli/Kammer severity 17940 minor thanks From debbugs-submit-bounces@debbugs.gnu.org Fri Jul 04 18:39:50 2014 Received: (at submit) by debbugs.gnu.org; 4 Jul 2014 22:39:50 +0000 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 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 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 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 ) id 1X3C8l-0002lf-DS for submit@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 ) id 1X3C8f-0000e4-Hd for bug-guile@gnu.org; Fri, 04 Jul 2014 18:39:34 -0400 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 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 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) 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) Date: Sat, 05 Jul 2014 01:39:04 +0300 Message-Id: <87zjgoda0n.fsf@taylan.uni.cx> From: Taylan Ulrich Bayirli/Kammer To: bug-guile@gnu.org 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@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" 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 ) -> * -> * -> (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 From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 01 19:30:56 2014 Received: (at control) by debbugs.gnu.org; 1 Oct 2014 23:30:57 +0000 Received: from localhost ([127.0.0.1]:57850 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XZTMG-00079c-Gk for submit@debbugs.gnu.org; Wed, 01 Oct 2014 19:30:56 -0400 Received: from world.peace.net ([96.39.62.75]:44998) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XZTMD-00075y-A3 for control@debbugs.gnu.org; Wed, 01 Oct 2014 19:30:54 -0400 Received: from c-24-62-95-23.hsd1.ma.comcast.net ([24.62.95.23] helo=jojen) by world.peace.net with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1XZTM7-0002Mu-9o; Wed, 01 Oct 2014 19:30:47 -0400 From: Mark H Weaver To: control@debbugs.gnu.org Date: Wed, 01 Oct 2014 19:30:45 -0400 Message-ID: <87wq8j9xlm.fsf@netris.org> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 2.0 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: severity 17940 minor thanks [...] Content analysis details: (2.0 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 1.8 MISSING_SUBJECT Missing Subject: header 0.2 NO_SUBJECT Extra score for no subject X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 2.0 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: severity 17940 minor thanks [...] Content analysis details: (2.0 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 1.8 MISSING_SUBJECT Missing Subject: header 0.2 NO_SUBJECT Extra score for no subject severity 17940 minor thanks From debbugs-submit-bounces@debbugs.gnu.org Fri Mar 13 09:08:24 2020 Received: (at 17940) by debbugs.gnu.org; 13 Mar 2020 13:08:24 +0000 Received: from localhost ([127.0.0.1]:58260 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jCk36-0002Qx-4q for submit@debbugs.gnu.org; Fri, 13 Mar 2020 09:08:24 -0400 Received: from mail-pg1-f170.google.com ([209.85.215.170]:47097) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jCk34-0002Ql-L0 for 17940@debbugs.gnu.org; Fri, 13 Mar 2020 09:08:23 -0400 Received: by mail-pg1-f170.google.com with SMTP id y30so4955842pga.13 for <17940@debbugs.gnu.org>; Fri, 13 Mar 2020 06:08:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=to:from:subject:message-id:date:user-agent:mime-version :content-transfer-encoding:content-language; bh=zgdseAoxaqOZxx5fIjgYqd4iVo0GyBehHsgqaazir20=; b=F9u0IKMqa+GDY4buHGVXf2Ic9dXcta5X/fARTs2bcfo2VP2tjB5wTH0Sl9czz+7G0T rTtvypU5pTPf02FpXwYZSS6c4LiKr3I6APSncskDXBtlhJEwb9qNDMIUF/6o0Fqf7Zeu v5MTmeEqbF28cb7KXJrr8acbTtwHu3UcUNWcstumtdSbmS+zD2cG/hMfJUAWWMoEKLJb oQ8OfUQQrGe+hXZ1KHoeBKOnjltEbZix31eZG4dBiwD7aU+36EgSGnr+JXHRFi6f7C+h uZSsFgpKN4eUqSWgw5VKPTYVTLcW/40G3dIeyox0Wn20zI1kAX8hVSvwDYhxBrTxZby1 rAWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:from:subject:message-id:date:user-agent :mime-version:content-transfer-encoding:content-language; bh=zgdseAoxaqOZxx5fIjgYqd4iVo0GyBehHsgqaazir20=; b=EZnQoKpf1cRDuKlwLENUYX7ep+dAoVX2BZQ/824qrp66mGbZSzX3OD5tl7v6YNcdGX lmyWFSsp1g+dDZpXHuia8pOlYWzugsn7WaWgvnTg/g2uYQwnHSs1IZl8ghouXH52UxiN igz8ofSblLGUC2gXBdDaobKU/7W+5fMCAED7wc+fy5juBPqK9tMhB8R9MPE7LyAzAl7q CjqI2AyiU3KaVkhqO2jSz7vfRYYKpYy88Xgx+Wu/r4Vs8Fb/YlgmaMMcTXSnIljL8Vz3 kAJK7G7u0g2hvC0YFHtEaut0Xxan3tWzw3wan0n8yZ8d4qsyhC9uutLMlk/7l96LR0v1 OtfA== X-Gm-Message-State: ANhLgQ2sXkQq7ieR/Jdjt0/RwcAj29FOj9MKiPICA8UEzC4MIv/BWHN6 bE9wZLzlC7U/wGaysj0MF8TVHnIV X-Google-Smtp-Source: ADFU+vt4HCG3hGks6YNasUTvZvXLeLVPlW2oxh+yQvCnHXyaCAXS726CfGxR96FPIeiuL9LeI2MAjg== X-Received: by 2002:a63:2313:: with SMTP id j19mr13003682pgj.330.1584104896058; Fri, 13 Mar 2020 06:08:16 -0700 (PDT) Received: from [192.168.2.183] (64-52-176-132.championbroadband.com. [64.52.176.132]) by smtp.gmail.com with ESMTPSA id 4sm1653838pfn.156.2020.03.13.06.08.03 for <17940@debbugs.gnu.org> (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 13 Mar 2020 06:08:14 -0700 (PDT) To: 17940@debbugs.gnu.org From: Matt Wette Subject: (begin) Message-ID: <5faf157c-da68-a596-0c0b-d12eba339dcf@gmail.com> Date: Fri, 13 Mar 2020 06:08:01 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 17940 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) I have run into this also, in writing macros. My workaround is to always add (if #f #f) in my forms that allow no expressions in the body. See second-to-last line below. (define-syntax sx-match-1   (syntax-rules ()     ((_ v (pat exp ...) c1 ...)      (let ((kf (lambda () (sx-match-1 v c1 ...))))        (sxm-sexp v pat (begin (if #f #f) exp ...) (kf))))     ((_ v) (error "sx-match: nothing matches"))))