Properly normalise reduced dicts
authorManuel M T Chakravarty <chak@cse.unsw.edu.au>
Thu, 13 Mar 2008 05:17:08 +0000 (05:17 +0000)
committerManuel M T Chakravarty <chak@cse.unsw.edu.au>
Thu, 13 Mar 2008 05:17:08 +0000 (05:17 +0000)
commit3bbdfc759bf1f466313afab0c0c50547ccde8e24
tree04b227ec0032286ba63046612ab3a789dd383132
parent11a4f9a91213e98c586feeb64c41c0e07037df66
Properly normalise reduced dicts
- Another chapter in the never-ending TcSimplify.reduceContext saga: after
  context reduction of wanted dicts it is not sufficient to normalise them
  wrt to the wanted equalities.  We also need to take top-level equalities
  into account.  (In fact, we probably also have to normalise wrt to given
  equalities, but I have left that open for the moment - but added a TODO
  note.)
- This finally eliminates substEqInDictInsts from TcTyFuns interface and
  suggest some further possible clean up (which will be in a separate patch).

Thanks to Roman for the intricate example that uncovered this bug.
compiler/typecheck/TcSimplify.lhs
compiler/typecheck/TcTyFuns.lhs