Re: [racket-users] Cannot attach submodule to namespace

2021-04-16 Thread Sage Gerard
No worries. Thank you for the help as always. On 4/16/21 2:11 PM, Matthew Flatt wrote: > Yes, attaching a module instances doesn't `require` it anywhere. > > (Sorry --- I didn't look at your program closely enough to work out > whether you meant to require it, start out with a non-empty namespace,

Re: [racket-users] Cannot attach submodule to namespace

2021-04-16 Thread Matthew Flatt
Yes, attaching a module instances doesn't `require` it anywhere. (Sorry --- I didn't look at your program closely enough to work out whether you meant to require it, start out with a non-empty namespace, or something else.) At Fri, 16 Apr 2021 18:02:47 +, Sage Gerard wrote: > Yes. The error c

Re: [racket-users] Cannot attach submodule to namespace

2021-04-16 Thread Sage Gerard
Yes. The error changed to "hello: unbound identifier, also no #%app ..." for me, so I also had to add `(namespace-require (quote-module-path restricted) ns)` to get it working. Were you expecting that I had to do that too? The docs for the `make-base-*-namespace` procedures make it sound like atta

Re: [racket-users] Cannot attach submodule to namespace

2021-04-16 Thread Matthew Flatt
The name `'restricted` is allowed as a shorthand in `require` because `require` knows what module it's in. The `namespace-attach-module` function does not try to infer a module context from the namespace argument; it uses the namespace argument only for its registry. So, you need to use the full na

[racket-users] Cannot attach submodule to namespace

2021-04-16 Thread Sage Gerard
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     (