[plt-scheme] Weird Error Message

From: Greg Pettyjohn (gregp at ccs.neu.edu)
Date: Wed Apr 6 09:56:45 EDT 2005

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


syntax: no pattern variables before ellipses in template in: ...

Now stick this at the top of the definitions:

(require (lib "kerncase.ss" "syntax"))


hunky dory.

You get the same problem if you just use a bogus id in place of 

(define (remove-begins def)
    (fooface ...))

I would rather be told of the unbound "fooface" than to have the syntax 
system do
strange things.

Posted on the users mailing list.