unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: Ian Hulin <ian@hulin.org.uk>
To: guile-user@gnu.org
Cc: "Andy Wingo (Guile Developer)" <wingo@pobox.com>,
	"Ludovic Courtès" <ludo@gnu.org>,
	"Han-Wen Nienhuys" <hanwenn@gmail.com>
Subject: Null (begin) blocks - V2.0.3 reports error was OK in V2.0.2
Date: Mon, 21 Nov 2011 17:25:57 +0000	[thread overview]
Message-ID: <4ECA89A5.5090202@hulin.org.uk> (raw)

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
<snip>
— 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




             reply	other threads:[~2011-11-21 17:25 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-21 17:25 Ian Hulin [this message]
2011-11-21 23:02 ` Null (begin) blocks - V2.0.3 reports error was OK in V2.0.2 Andy Wingo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4ECA89A5.5090202@hulin.org.uk \
    --to=ian@hulin.org.uk \
    --cc=guile-user@gnu.org \
    --cc=hanwenn@gmail.com \
    --cc=ludo@gnu.org \
    --cc=wingo@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).