A (final) re-engineering of the new typechecker
Regression testing and user feedback for GHC 7.0 taught
us a lot. This patch fixes numerous small bugs, and some
major ones (eg Trac #4484, #4492), and improves type
error messages.
The main changes are:
* Entirely remove the "skolem equivalance class" stuff;
a very useful simplification
* Instead, when flattening "wanted" constraints we generate
unification variables (not flatten-skolems) for the
flattened type function application
* We then need a fixup pass at the end, TcSimplify.solveCTyFunEqs,
which resolves any residual equalities of form
F xi ~ alpha
* When we come across a definite failure (e.g. Int ~ [a]),
we now defer reporting the error until the end, in case we
learn more about 'a'. That is particularly important for
occurs-check errors. These are called "frozen" type errors.
* Other improvements in error message generation.
* Better tracing messages