Summary
Modules leaking define-for-syntax variables and functions
Metadata
- Id: 2f7f3a63c04e73f5ceee303cbc251fcd2fd1854b
- Trac id: 1812
- Type: defect
- Reporter: Idiomdrottning
- Owner:
- Cc:
- Status: new
- Component: core libraries
- Estimated difficulty:
- Resolution:
- Priority: major
- Milestone: 6.0.0
- Version: 5.3.0
- Changetime: 2023-11-10 16:18:45 UTC
- Created: 2022-10-13 15:47:54 UTC
- Keywords: modules, syntax
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".