@mflatt since the expander
linklet installs bindings in the #%kernel
module via mutation of the module registry, what’s the intention of the set of names exported by that linklet?
The exports of the expander
linklet are things that the more-primitive system needs to drive the expander from the outside. For example, some of those exports are needed in “main.sls”, and more will be used in the future. Similarly, the C-implemented runtime needs to be able to call things like eval
. The more primitive system can’t just get those bindings from the '#%kernel
module, because the more primitive system doesn’t have modules; it needs an API in terms of the more primitive concepts of linklets and functions, and that API gives the move primitive system the ability to work with modules.
Ok, that makes sense
Generally, is it right to say that nothing implemented in C or exported from one of the base linklets is directly exposed to Racket code, instead those values are installed in a primitive module and then those modules are exposed to Racket?
yes