Moving compiler sources into the FStarC namespace #3557
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The library and the compiler have been sharing and punning modules for a long time, which complicates making sense of the build and changing one of them without affecting the other. This PR puts all of the compiler into the FStarC namespace, completely separate from FStar, the library.
This is in preparation for a staged build, but already an improvement and "noisy" so I'd like to merge this first to avoid bitrot. I in fact mostly produced this using the staged build, or it would have been a nightmare.
Some subprojects need patches: both Steel and Pulse define their own extraction passes which interact with compiler internals, so they need renaming. Since they compile with
--MLish
they also need the--MLish_effect FStarC.Compiler.Util
option (#3548). Everparse/3D reuses FStar.Getopt from the compiler, so it needs an update too.Projects using normal plugins should not need a patch (HACL* doesn't).
The namespaces could definitely be improved (e.g.
FStarC.Compiler.Range
is redundant). That will be a separate PR possibly after the staged build. I think that one should not break anything of this sort.Companion branches:
https://github.com/mtzguido/pulse/tree/fstarc (there is a script in here that is handy for the renaming)
https://github.com/mtzguido/steel/tree/fstarc
https://github.com/mtzguido/everparse/tree/fstarc
Note: the support ML files for the library and the compiler are still all in ocaml/fstar-lib. The staged build will separate them.
cc @nikswamy @aseemr, does this look OK? It's hard to review, but wondering if you buy the plan.