-
Notifications
You must be signed in to change notification settings - Fork 16
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
Make the Gospel type-checker modular #377
Comments
Thank you @shym for raising this issue. As we plan to soon use This would also remove some blockers for dune integration. I've begun to experiment with different approaches:
|
It can still grab info from environment variables, I expect, which could give us a way to feed it the information we need (namely the paths where to look for dependencies, or is there something else?). |
You are right, this doesn't make this option impossible. I just think that it may make things a bit more delicate. |
Modularizing the type-checker is expected to break how unicity of identifier is guaranteed in the current implementation. |
Currently, when the type checker encounters a dependency, it will load and type it on the fly. So common dependencies get type-checked over and over again, uselessly.
It would be nice to modularize the type-checker so that typing a module requires the digested type information of its dependencies instead of retyping them.
This could be done either with dedicated type files (see #376) or trying to piggy-back on current OCaml infrastructure by storing this information in standard files (it would be possible at least in
.cmti
files, by encoding the information as a special global attribute; could be done incmi
files?).The expected benefits would be:
gospel check abc.mli
require the same files asocamlc -c abc.mli
.The text was updated successfully, but these errors were encountered: