Finding Module Names

27 views
Skip to first unread message

Aaron Eline

unread,
Feb 21, 2021, 4:54:21 AM2/21/21
to Racket Users

I was wondering if there was a way to find the name of the current module?
Trying to write a macro that takes actions based on the module name?

Jay McCarthy

unread,
Feb 21, 2021, 9:13:10 AM2/21/21
to Aaron Eline, Racket Users
I think you want to look at either

quote-module-name from
https://docs.racket-lang.org/syntax/Source_Locations.html#%28part._.Quoting%29

or maybe

syntax-source-module
https://docs.racket-lang.org/reference/stxops.html?q=syntax-module#%28def._%28%28quote._~23~25kernel%29._syntax-source-module%29%29

Jay

--
Jay McCarthy
Associate Professor @ CS @ UMass Lowell
http://jeapostrophe.github.io
Vincit qui se vincit.
> --
> You received this message because you are subscribed to the Google Groups "Racket Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to racket-users...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/racket-users/8d110ed0-3663-45fc-8d93-503fac28c98en%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages