[plt-scheme] Usage of raise-syntax-error

From: Grant Rettke (grettke at acm.org)
Date: Sat Oct 20 20:22:00 EDT 2007

I was looking at using raise-syntax-error within a macro defined using
syntax-rules.

I found that when you use syntax-rules you don't have a reference to
that syntax object to pass in to raise-syntax-error.

It seems that you need to use syntax-case in order to do so, from the manual:

12.2.1  Syntax Patterns

The following example shows one reason to use syntax-case instead of
syntax-rules: custom error reporting.

Is it worth cutting over from syntax-rules to syntax-case just to have
access to that? What does it provide?


Posted on the users mailing list.