Michael Silver scripsit: > > That's because the interpreter implicitly loads some modules, and the > > compiler doesn't do that. > > That’s odd; I would expect both to implicitly load those modules because the > documentation for both data-structures > <https://wiki.call-cc.org/man/4/Unit%20data-structures#unit-data-structures> > and ports <https://wiki.call-cc.org/man/4/Unit%20ports#unit-ports> say > both modules are "used by default, unless the program is compiled with the > --explicit-use option”, which I was not using (at least intentionally).
It's not so much the compiler vs. the interpreter (though there is a difference), but being in a module vs. not being in a module. The interpreter loads certain units and imports them into the top level. Once inside a module, however, nothing is available except the name `import`, so the first order of business is to import identifiers from scheme and chicken to bootstrap a sufficient environment to do anything. This is equally true in the interpreter, but doesn't come up much because most people don't type module forms to the REPL or try to execute modules as scripts. -- John Cowan http://www.ccil.org/~cowan [email protected] You are a child of the universe no less than the trees and all other acyclic graphs; you have a right to be here. --DeXiderata by Sean McGrath _______________________________________________ Chicken-users mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/chicken-users
