[racket-dev] syntax-case and stack trace

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Sat Jul 16 08:19:10 EDT 2011

At Fri, 15 Jul 2011 21:53:59 -0500, Casey Klein wrote:
> FWIW, the big taints commit also changed the value of this expression:
> 
> (let ([s #'x])
>   (equal? s
>           (with-handlers ([exn:fail:syntax? (compose first
> exn:fail:syntax-exprs)])
>             (raise-syntax-error #f "message" s))))

That's intentional, although I don't think it's correctly documented
(and probably not yet implemented right) that syntax objects in an
`exn:fail:syntax' are always tainted. I'll work on that.

The expression could be fixed for taints as

  (let ([s (syntax-taint #'x)])
    (equal? s
            ....))



Posted on the dev mailing list.