Refactoring around FunDeps
authorSimon Peyton Jones <simonpj@microsoft.com>
Fri, 24 Jul 2015 09:40:35 +0000 (10:40 +0100)
committerSimon Peyton Jones <simonpj@microsoft.com>
Fri, 24 Jul 2015 09:42:34 +0000 (10:42 +0100)
commitd53d80890f2762b78071f5d53c88dc9e6c0ca72e
treebff7b59b27beba83c7b212fd09596f4f62b40922
parente1616343de946f872fb0da7689ff242dc345793f
Refactoring around FunDeps

This refactoring was triggered by Trac #10675.

We were using 'improveClsFD' (previously called 'checkClsFD') for
both
  * Improvement: improving a constraint against top-level instances
  * Consistency: checking when two top-level instances are
    consistent

Using the same code for both seemed attractive at the time, but
it's just too complicated.  So I've split it:
 * Improvement: improveClsFD
 * Consistency: checkFunDeps

Much clearer now!
compiler/typecheck/FunDeps.hs
compiler/typecheck/Inst.hs
compiler/types/Unify.hs