Summary

Modules leaking define-for-syntax variables and functions

Metadata

Description

 (module foo
 (foo-deluxe)
 (import scheme (chicken base) (chicken syntax))
 (define-for-syntax (bar) (print "hi!"))
 (define-syntax foo-deluxe
   (syntax-rules ()
     ((foo-deluxe) (bar))))
 )
 
 (import foo)
 (foo-deluxe)
 (bar)
 (set! bar #f)
 (foo-deluxe)

Is this intentional?

Changes and comments

[2023-11-06 23:39:12 UTC] felix changed milestone from someday to 6.0.0

[2023-11-10 16:18:45 UTC] felix wrote:

This is currently not really done at all. The "meta" environment is the same as the global toplevel evaluation environment. The proper thing to do here is probably to create a fresh, distinct meta-environment for every module, initialized to "scheme".