Den tir. 21. jul. 2020 kl. 17.45 skrev Shriram Krishnamurthi <
[email protected]>:

> How I can combine these three? I want to do something like this:
>
>     (define n (make-base-namespace))
>     (define p (build-path f))
>     (eval `(require ,p) n)
>
> Racket doesn't like that: bad syntax for require sub-form because p is a
> path-typed value.
>
> Essentially, I want to inject the module at f into n so that the provided
> identifiers of f are visible inside n. (I haven't been able to get
> dynamic-require working either, nor is it an entirely satisfactory
> solution because I may not always know what names f is providing.)
>

Sounds like a job for `namespace-require` with a require spec of the form
`(file ,(path->string (build-path f)))`.

/Jens Axel

-- 
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/CABefVgzwBhd%3D27JCRr3PDj5NKL8iukiQCsEspww%2BTBcPBUe4dQ%40mail.gmail.com.

Reply via email to