Opened 14 months ago

Last modified 3 weeks ago

#1812 new defect

Modules leaking define-for-syntax variables and functions

Reported by: Idiomdrottning Owned by:
Priority: major Milestone: 6.0.0
Component: core libraries Version: 5.3.0
Keywords: modules, syntax Cc:
Estimated difficulty:


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

(import foo)
(set! bar #f)

Is this intentional?

Change History (2)

comment:1 Changed 4 weeks ago by felix winkelmann

Milestone: someday6.0.0

comment:2 Changed 3 weeks ago by felix winkelmann

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".

Note: See TracTickets for help on using tickets.