From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ian Hulin Newsgroups: gmane.lisp.guile.user Subject: Null (begin) blocks - V2.0.3 reports error was OK in V2.0.2 Date: Mon, 21 Nov 2011 17:25:57 +0000 Message-ID: <4ECA89A5.5090202@hulin.org.uk> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Trace: dough.gmane.org 1321896385 11074 80.91.229.12 (21 Nov 2011 17:26:25 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 21 Nov 2011 17:26:25 +0000 (UTC) Cc: "Andy Wingo \(Guile Developer\)" , =?UTF-8?B?THVkb3ZpYw==?= =?UTF-8?B?IENvdXJ0w6hz?= , Han-Wen Nienhuys To: guile-user@gnu.org Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Mon Nov 21 18:26:21 2011 Return-path: Envelope-to: guile-user@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 1RSXdM-00064h-LS for guile-user@m.gmane.org; Mon, 21 Nov 2011 18:26:20 +0100 Original-Received: from localhost ([::1]:51813 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RSXdM-0002Rn-6T for guile-user@m.gmane.org; Mon, 21 Nov 2011 12:26:20 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:40633) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RSXdI-0002RL-Nk for guile-user@gnu.org; Mon, 21 Nov 2011 12:26:17 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RSXdH-0000jG-9N for guile-user@gnu.org; Mon, 21 Nov 2011 12:26:16 -0500 Original-Received: from lo.gmane.org ([80.91.229.12]:37633) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RSXdH-0000iJ-4F for guile-user@gnu.org; Mon, 21 Nov 2011 12:26:15 -0500 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1RSXdF-00060K-1u for guile-user@gnu.org; Mon, 21 Nov 2011 18:26:13 +0100 Original-Received: from cpc13-rdng21-2-0-cust334.15-3.cable.virginmedia.com ([82.12.149.79]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 21 Nov 2011 18:26:13 +0100 Original-Received: from ian by cpc13-rdng21-2-0-cust334.15-3.cable.virginmedia.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 21 Nov 2011 18:26:13 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 32 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: cpc13-rdng21-2-0-cust334.15-3.cable.virginmedia.com User-Agent: Mozilla/5.0 (X11; Linux i686; rv:7.0.1) Gecko/20110929 Thunderbird/7.0.1 X-Enigmail-Version: 1.3.3 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 80.91.229.12 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Original-Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.user:8967 Archived-At: Hi Andy, Ludo, LilyPond code uses (begin) as a special list terminator for some data structures, and tests this using a custom predicate void: (define-public (void? x) (eq? x (begin))) This works in V1.8, and apparently used to work in 2.0.2 (no errors), but in 2.0.3 (begin) is OK at the repl, (with readline enabled and activated), but in any sort of procedure using it causes a diagnostic, reporting either at the repl or in .scm files, xxx: source expression failed to match any pattern in form (begin). The documentation says: 6.13.1 Evaluating a series of expressions — syntax: begin expr1 expr2 ... The expression(s) are evaluated in left-to-right order and the value of the last expression is returned as the value of the begin-expression. This expression type is used when the expressions before the last one are evaluated for their side effects. Guile also allows the expression (begin), a begin with no sub-expressions. Such an expression returns the `unspecified' value. How do we mend our code, or has Guile V2.0.3 broken? Cheers, Ian Hulin