Collect type dependencies.
The main functionality is provided by depgraph, which builds a directed acyclic graph which can be used with the depgraph package.