Equality constraint solver is now externally pure
authorManuel M T Chakravarty <chak@cse.unsw.edu.au>
Mon, 27 Apr 2009 14:03:16 +0000 (14:03 +0000)
committerManuel M T Chakravarty <chak@cse.unsw.edu.au>
Mon, 27 Apr 2009 14:03:16 +0000 (14:03 +0000)
commit296058a1cafa80dec0b3f998348bce7c65f668b0
treed7e855255cf519d219bd190a631d0fc6faadefa0
parent25b72d3e7da625732cbfbbe729a3e4321fd91ced
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
compiler/coreSyn/CoreFVs.lhs
compiler/typecheck/Inst.lhs
compiler/typecheck/TcMType.lhs
compiler/typecheck/TcRnMonad.lhs
compiler/typecheck/TcRnTypes.lhs
compiler/typecheck/TcSimplify.lhs
compiler/typecheck/TcTyFuns.lhs
compiler/typecheck/TcType.lhs