Tags: pvolok/flow
Tags
[hack] Have Typing_decl depend on a separate environment from Typing Summary:We used to thread the `Typing_env.env` through the entire decl code, but in practice there was no need to do so -- non of the decl operations modified the env in a meaningful way. In fact `Typing_hint.hint` was about the only place that decl mode code used the Typing_env.env. In my bid to properly separate decl from typing, I have removed all the unnecessary returning of the unmodified Typing_env, as well as factoring out the data that both decl and typing needed into a `Typing_decl_env.env`, which is in turn nested in `Typing_env.env`. This paves the way for having Typing_env invoke Typing_decl whenever a declaration is found to be missing. It also makes it clear that Typing_decl does not care about things like type variables, the current parent / self / static binding, etc. Next step: I'd like to put all decl mode code into its own top-level folder, and have that folder be a dependency of the stuff in typing/. Reviewed By: dlreeves Differential Revision: D2970130 fb-gh-sync-id: 675b488ba6bf34f554b92e7e3cd29170789dec7e shipit-source-id: 675b488ba6bf34f554b92e7e3cd29170789dec7e
[hack] Have Typing_decl depend on a separate environment from Typing Summary:We used to thread the `Typing_env.env` through the entire decl code, but in practice there was no need to do so -- non of the decl operations modified the env in a meaningful way. In fact `Typing_hint.hint` was about the only place that decl mode code used the Typing_env.env. In my bid to properly separate decl from typing, I have removed all the unnecessary returning of the unmodified Typing_env, as well as factoring out the data that both decl and typing needed into a `Typing_decl_env.env`, which is in turn nested in `Typing_env.env`. This paves the way for having Typing_env invoke Typing_decl whenever a declaration is found to be missing. It also makes it clear that Typing_decl does not care about things like type variables, the current parent / self / static binding, etc. Next step: I'd like to put all decl mode code into its own top-level folder, and have that folder be a dependency of the stuff in typing/. Reviewed By: dlreeves Differential Revision: D2970130 fb-gh-sync-id: 675b488ba6bf34f554b92e7e3cd29170789dec7e shipit-source-id: 675b488ba6bf34f554b92e7e3cd29170789dec7e
PreviousNext