Extraction of interface files is too conservative
When extracting an interface file, all the modules used by the current module are considered as dependencies. This is correct but leaks implementation details. Ideally, only the modules that define types needed to typecheck the types and function signatures of the current module should be dependencies.