The top-level type checker, which checks all declarations in a module.
Type check all declarations in a module
At this point, many declarations will have been desugared, but it is still necessary to
- Kind-check all types and add them to the
- Type-check all values and add them to the
- Bring type class instances into scope
- Process module imports