ast: Refactor type checker and environment state
This commit does not change any functionality it just updates the implementation so that type environment mutation only occurs within the type checker. This makes it easier to reason about changes to the type environment data structure(s). Specifically: * The type environment constructor is now private. Callers do not need to instantiate type environments. This should only be done by the checker. No one appears to be using this constructor so while this is backwards incompatible, it should be safe. * The schema set is now held by the checker as opposed to the type environment. The environment should not have to know anything about the schemas. * The global input schema is now loaded by the compiler on init() on and provided as input to the checker along with other global options like the schema set. This avoids having the compiler reach into the type environment to perform updates. Signed-off-by: Torin Sandall <torinsandall@gmail.com>
T
Torin Sandall committed
8b2e9ffc3aaea778812ee8416f888fe4027620ae
Parent: ed75f77