[plt-scheme] Weird Error Message
Here's a use of kernel-syntax-case I grabbed from one of the libraries.
Stick it in a file sans the require and hit execute:
(define (remove-begins def)
(kernel-syntax-case def #f
((begin defs ...)
(apply append (map remove-begins (syntax->list #'(defs ...)))))
(_ (list def))))
Result:
syntax: no pattern variables before ellipses in template in: ...
Now stick this at the top of the definitions:
(require (lib "kerncase.ss" "syntax"))
Result:
hunky dory.
You get the same problem if you just use a bogus id in place of
kernel-syntax-case
(define (remove-begins def)
(fooface ...))
I would rather be told of the unbound "fooface" than to have the syntax
system do
strange things.