[plt-scheme] "identifier originates in a different module"
I'm trying to define a macro in a module to make invoking units
easier, and I'm running into an error message that I don't understand.
(module foo mzscheme
(require (lib "unit.ss"))
(provide foo@ define-foo)
(define foo@
(unit (import number) (export foo)
(define (foo) number)))
(define-syntax define-foo
(syntax-rules ()
((_ prefix number)
(define-values/invoke-unit (foo) foo@ prefix number))))
)
(module use-foo mzscheme
(require foo)
(provide main)
(define number 42)
(define-foo x number)
(define (main) (x:foo)))
(require use-foo)
(main)
foo.scm:10:36: module: identifier originates in a different module at: x:foo in: (define-values (x:foo) (invoke-unit (compound-unit (import number) (link (unit-to-invoke (foo@ nu...
Can anyone shed light on this? What is wrong with an identifier
originating in a different module, and what should I do about it?
--dougo at ccs.neu.edu