dynamic-require

已查看 32 次
跳至第一个未读帖子

jon stenerson

未读,
2021年2月2日 22:31:592021/2/2
收件人 racket-users@googlegroups.com List
The previous message here prompts this ...

I have some modules with paths "A1.rkt" ... "An.rkt". In the interaction
window of DrRacket I can require any or all of them and I believe them
to be correct.

Now suppose I have a function (F) that produces one of those paths. I
try  (dynamic-require (F) #f) and there are no errors but where do the
imports go? I don't seem able to access them.

However, I can do (define quux (dynamic-require (F) 'quux) )  and then
use quux. Is there a way to bring in all the exports of (F) without
knowing the names ahead of time?

Thanks,

Jon

Laurent

未读,
2021年2月3日 04:18:222021/2/3
收件人 jon stenerson、racket-users@googlegroups.com List

--
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 racket-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/racket-users/333a9191-ae5e-6dd8-cebf-30bd00d87b9f%40comcast.net.

jon stenerson

未读,
2021年2月3日 12:12:202021/2/3
收件人 racket...@googlegroups.com
Very good! Thank you.
回复全部
回复作者
转发
0 个新帖子