Skip to content
  • chak@cse.unsw.edu.au.'s avatar
    Equality constraint solver is now externally pure · 296058a1
    chak@cse.unsw.edu.au. authored
    - 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
    296058a1