Fix instance rules for functional dependencies
authorsimonpj@microsoft.com <unknown>
Thu, 9 Feb 2006 11:35:31 +0000 (11:35 +0000)
committersimonpj@microsoft.com <unknown>
Thu, 9 Feb 2006 11:35:31 +0000 (11:35 +0000)
commit97fbb266f9a21eb66cf8ea1336b4324376a14567
tree7b35c582f2d05f3a36f7fb6ed4b48402d6997797
parent7a605453ea27e948ff931b8b016fc7c46c2c8270
Fix instance rules for functional dependencies

GHC 6.4 implements a rather relaxed version of the Coverage Condition
which is actually too relaxed: the compiler can get into an infinite loop
as a result.

This commit fixes the problem (see Note [Coverage condition] in FunDeps.lhs)
and documents the change.

I also took the opportunity to add documentation about functional dependencies,
taken from the Hugs manual with kind permission of Mark Jones
ghc/compiler/typecheck/TcMType.lhs
ghc/compiler/types/FunDeps.lhs
ghc/docs/users_guide/glasgow_exts.xml