On Fri, Sep 11, 2009 at 7:12 AM, Brian Mastenbrook
<[email protected]> wrote:
>
> With a `syntax-error' syntax (should that be `syntax-violation'?
> `syntax-perturbation'? `syntax-felony'?) this would be possible in
> `syntax-rules' as well.
Ugly, but effective:
(define-syntax syntax-error
(syntax-rules ()
((syntax-error) (syntax-error "Bad use of syntax error!"))))
Now write calls to (syntax-error "Duplicate binding.") and you'll
get expansion time errors that look something like this
error: no matching clause in (syntax-error "Duplicate binding.")
Depending on how the implementation reports these things, of course.
Yes, it is ugly and crude, but it works.
--
~jrm
_______________________________________________
r6rs-discuss mailing list
[email protected]
http://lists.r6rs.org/cgi-bin/mailman/listinfo/r6rs-discuss