Linker

The Linker recursively traverses the AST using the Visitor pattern, and replaces any duplicate types with their originals, and removes duplicate declarations. References to the removed declarations are replaced with a reference to the original. This action is largely unncessary due to the -m flags, but can still be useful in some situations, such as when you have nested classes defined in separate files. It also converts AST.Modules into AST.MetaModules, which list all the files a module is defined in.