-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Modules #36
Comments
Can the rules for making the .o files for all the modules be added to the Makefile and the object files all be loaded at run-time similar to the libraries? Or should the object files be created and put in a list by some additional code in compile-file.rkt by going through all the imports in the program and then the object files in this list be combined into a library which then is linked by the Makefile? |
Implemented modules by adding the following:
Currently, the following formats for the modules are supported:
Example modules
If a module is the root file, the expression Example RunExecuting Then, the following are done:
Then, running the executable A file called |
It should be possible to write modular programs rather than just single monolithic programs. A module is a program that imports some identifiers via
require
and possibly exports some identifiers withprovide
. The compiler ought to support separate compilation, meaning we might have one module in"f.rkt"
:which can be compiled (to say
"f.o"
).And another module which uses it:
which can be compiled without needing to recompile
"f.rkt"
.It should be possible to follow the design of the standard library feature to implement this, although there will be several added wrinkles in the front end (the client of a module will need to fetch a list of provided identifiers etc.). I'm also not exactly sure how to handle building and linking dependencies when compiling a module.
The text was updated successfully, but these errors were encountered: