Is dependency analysis required in order to type a program?
Any use of a type anywhere may place constraints on that type. So, in the absence of explicit type signatures (i.e. when doing type inference) it is necessary to perform inference in a way that doesn't allow specific usages of a type in a particular form to "infect" the most general type it may have. This involves a dependency analysis. Consider

id = \x -&gt; x
foo = id 1


Now if we type foo first, we would unify the first argument of id with Int and thus conclude id had type Int -&gt; Int. So therefore we must first type id and then generalize its signature to the polymorphic type forall a. a -&gt; a, and then instantiate that at type Int when we apply it and attempt to unify the argument type with Int.

Hence, dependencies and topological sort!