[plt-scheme] Weird Error Message

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Thu Apr 7 14:59:10 EDT 2005

At Wed, 6 Apr 2005 09:56:45 -0400, Greg Pettyjohn wrote:
> 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: ...

If you put the above expression in a module, the error message is
"unbound variable in module in: kernel-syntax-case".

Not that I'm a fan of the top-level environment, but I don't see how
the error message could be any different there. For all MzScheme knows,
`kernel-syntax-case' will be bound to a function, eventually.


Posted on the users mailing list.