[plt-scheme] 205.7
The exp-tagged code in CVS for MzScheme and MrEd is now version 205.7.
Changes:
* Macro templates can include consecutive `...' for splicing
sequences:
> (syntax-object->datum
(syntax-case '((1 2) (3)) ()
[((a ...) ...) #'(a ... ...)]))
(1 2 3)
* Macro patterns can include sub-patterns after `...':
> (syntax-object->datum
(syntax-case '(1 2 3) ()
[(a ... b) #'(b a ...)]))
(3 1 2)
A `...' cannot appear in a sequence after `...' (except nested
in another pattern). A `.' can appear after `...', but it's
defined to never match a syntactic list:
> (syntax-object->datum
(syntax-case '(1 2 3) ()
[(a ... . b) #'(b a ...)]))
no match
> (syntax-object->datum
(syntax-case '(1 2 . 3) ()
[(a ... . b) #'(b a ...)]))
(3 1 2)
There's certainly room for consusion with this rule for `.'. For
example, the pattern `(a ... . (b))' is really `(a ... b)' which
makes it look like `(b)' matches a syntactic list, but really the
`.' disappears. Nevertheless, the `.' rule seems useful enough for
matching `lambda' argument sequences, etc., that it's probably worth
keeping.
* Improved error reporting (both syntax and run-time) for
`with-syntax'.
* Changed the error message for using a module-defined identifier
before its definition executes. When `error-print-source-location'
is set to #f, the module name is not included in the message (which
makes the message look right in DrScheme, especially in the teaching
languages).
Matthew