Skip to content
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

Generate SML module opens for dependent modules #13

Open
michaelsproul opened this issue May 30, 2019 · 2 comments
Open

Generate SML module opens for dependent modules #13

michaelsproul opened this issue May 30, 2019 · 2 comments

Comments

@michaelsproul
Copy link
Collaborator

Holmake analyses the open statements in Script.sml files in order to work out the order that it should build files. Annoyingly, if you fail to specify a dependency in this way, Holmake will try and build the dependency in parallel with the module, which of course fails.

Instead it might be nice to generate an open which contains all the dependent theories like:

(* Unbaked *)
require a b c;

(* Baked *)
open aTheory bTheory cTheory;
val _ = translation_extends "c";
@michaelsproul
Copy link
Collaborator Author

michaelsproul commented Jun 5, 2019

Johannes suggested a clever fix for this, which is to combine the act of defining a module, with the act of declaring its dependencies, so something like:

package sysinit requires utils;

which expands to:

open utilsTheory;
val _ = new_theory "sysinit";
val _ = translation_extends "utils";

The rename from module -> package also seems like a good idea, given that module is already overloaded to mean SML-level module and CakeML-level module.

@LukeMondy
Copy link

This sounds good (this is also a test comment).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants