[plt-scheme] Getting the expansion location

From: Noel Welsh (noelwelsh at yahoo.com)
Date: Tue May 13 11:17:31 EDT 2003

--- Matthew Flatt <mflatt at cs.utah.edu> wrote:
> I think you want something like this:
>       (with-syntax ([loc-holder
> (datum->syntax-object #f 'loc-holder stx)])
>          ....
>          (fail-assertion reported-name
>                          (quote-syntax loc-holder)
>                          ....)))))

Thanks!  This works nicely.  I was grubbing around in
contract.ss (I like the 'heading' font, Robby ;-) and
saw a function to turn syntax into strings
(build-src-loc-string/unk) which I think is called as
part of the macro expansion.  Is this a viable
alternative to capturing a syntax object, or does this
constiture a 3-D value and is to be avoided?

Ta once more,

Email: noelwelsh <at> yahoo <dot> com
Jabber: noelw <at> jabber <dot> org

Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.

Posted on the users mailing list.