Refactor functional dependencies a bit
authorSimon Peyton Jones <simonpj@microsoft.com>
Thu, 24 Nov 2016 13:47:02 +0000 (13:47 +0000)
committerSimon Peyton Jones <simonpj@microsoft.com>
Fri, 25 Nov 2016 17:46:50 +0000 (17:46 +0000)
commiteb55ec2941239dee05afc6be818b129efe51660e
tree06c348eaad9815ddee7ae31333bf541407c60097
parent5f349fe24066e7b0af85934664e27636d2e84fe5
Refactor functional dependencies a bit

* Rename CoAxiom.Eqn = Pair Type to TypeEqn,
  and use it for fundeps

* Use the FunDepEqn for injectivity, which lets us share a bit
  more code, and (more important) brain cells

* When generating fundeps, take the max depth of the two
  constraints.  This aimed at tackling the strange loop in
  Trac #12860, but there is more to come for that.

* Improve pretty-printing with -ddump-tc-trace
compiler/typecheck/FunDeps.hs
compiler/typecheck/TcInteract.hs
compiler/typecheck/TcRnTypes.hs
compiler/typecheck/TcSMonad.hs
compiler/typecheck/TcTypeNats.hs
compiler/types/CoAxiom.hs