unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
* Null (begin) blocks - V2.0.3 reports error was OK in V2.0.2
@ 2011-11-21 17:25 Ian Hulin
  2011-11-21 23:02 ` Andy Wingo
  0 siblings, 1 reply; 2+ messages in thread
From: Ian Hulin @ 2011-11-21 17:25 UTC (permalink / raw)
  To: guile-user
  Cc: Andy Wingo (Guile Developer), Ludovic Courtès,
	Han-Wen Nienhuys

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




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-11-21 23:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-21 17:25 Null (begin) blocks - V2.0.3 reports error was OK in V2.0.2 Ian Hulin
2011-11-21 23:02 ` Andy Wingo

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).