Why does this raise "namespace-attach-module: module not declared (in
the source namespace)"?

I expected that the `restricted` submodule would be both declared and
instantiated by the time control reached `namespace-attach-module`.

(module anon racket/base
   (module restricted racket/base
     (provide #%app #%datum #%top hello)
     (define (hello h) h))
   (require 'restricted)
   (define ns (make-empty-namespace))
   (define-namespace-anchor a)
   (namespace-attach-module (namespace-anchor->namespace a) ''restricted ns)
   (displayln (eval '(hello "world") ns)))

--
~slg


-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/4a99db87-0ddb-14a7-7240-ec7f03dc9310%40sagegerard.com.

Reply via email to