[plt-scheme] Determining the module about to be called

From: Jay McCarthy (jay.mccarthy at gmail.com)
Date: Fri May 11 19:28:01 EDT 2007

Suppose I have syntax-object (stx) in some module M1, that matches
#`(#%app o e ...), is there any way to check if #'o refers to an
identifier that was imported from another module?

I'm writing a language that maintains a certain invariant and I can't
trust other modules (including mzscheme) to maintain it. I have a
solution now, but I think doing the above would be more elegant.

I have the impression that syntax-source-module may be relevant, but
it seems to not be quite right. (It appears that if a module M2
provides a macro used by M1, the syntax object produced by that
expansion has the syntax-source-module of M2, even though since I did
a local-expand, my M1 language had the opportunity to sanitize the
macro output.)

Jay

-- 
Jay McCarthy <jay.mccarthy at gmail.com>
http://jay.teammccarthy.org


Posted on the users mailing list.