For completeness, this works as well: lib.scm: (define-module (lib) #:use-module ((main) #:select (thing)) #:export (test))
(define-syntax test (lambda (sintax) (syntax-case sintax () ((test id) (free-identifier=? #'id #'thing))))) main.scm: (define-module (main) #:use-module (lib) #:export (thing)) (display (test thing)) (newline) (define thing 5)