Hello!
Ricardo Wurmus <[email protected]> skribis:
> it seems that it is impossible to nest with-imported-modules. A gexp
> that is wrapped in multiple layers of with-imported-modules won’t depend
> on the list of all mentioned modules but only on the outermost.
>
> This is because with-imported-modules sets the current-imported-modules
> parameter without checking if the parameter already has a value.
>
> Should nesting be supported? It seems useful.
Is it? :-)
My impression is that one would always write:
(with-imported-modules … #~(…))
or possibly combining multiple expressions:
(define e1 (with-imported-modules … #~(…)))
(define e2 (with-imported-modules … #~(… #$e1 …)))
in which case modules are appended.
I couldn’t think of a use case where one would literally write:
(with-imported-modules …
(with-imported-modules …
#~(…)))
Perhaps I’m missing some pattern where it could be useful though?
Thanks,
Ludo’.