Hi, I have encountered a counterintuitive behavior of namespace-require and wonder if it is a bug.
Basically, namespace-require behaves differently when the target namespace is passed by parameterizing current-namespace, compared to when the optional namespace parameter is used.
For example, this works:
(define ns (make-base-empty-namespace))
(parameterize ([current-namespace ns]) (namespace-require 'racket))
But this gives an error about unknown module:
(define ns (make-base-empty-namespace))
(namespace-require 'racket ns)
require: unknown module
module name: #<resolved-module-path:"/Applications/Racket v7.3/collects/racket/main.rkt">
Am I doing something wrong in the second case?
Thanks,
Yongming