Equality constraint solver is now externally pure
- This patch changes the equality constraint solver such that it does not
instantiate any type variables that occur in the constraints that are to be
solved (or in the environment). Instead, it returns a bag of type bindings.
- If these type bindings (together with the other results of the solver) are
discarded, solver invocation has no effect (outside the solver) and can be
repeated (that's imported for TcSimplifyRestricted).
- For the type bindings to take effect, the caller of the solver needs to
execute them.
- The solver will still instantiate type variables thet were created during
solving (e.g., skolem flexibles used during type flattening).
See also http://hackage.haskell.org/trac/ghc/wiki/TypeFunctionsSolving