[project @ 2003-06-20 11:14:18 by simonpj]
authorsimonpj <unknown>
Fri, 20 Jun 2003 11:14:22 +0000 (11:14 +0000)
committersimonpj <unknown>
Fri, 20 Jun 2003 11:14:22 +0000 (11:14 +0000)
commit1f861358a07a4bf2586964a65aebb4433f16ac70
tree4cdbf297870fbb255b8a8bfa7335819bab26b11c
parent4418c8e913e93e927a91e58abd1bbc6893aa8d27
[project @ 2003-06-20 11:14:18 by simonpj]
------------------------------
Fix a small quantification bug
------------------------------

We were quantifying over too few type variables, because fdPredsOfInsts was
being too eager to discard predicates. This only affects rather obscure
programs.  Here's the one Iavor found:

class C a b where f :: a -> b
g x = fst (f x)

We want to get the type
    g :: forall a b c.  C a (b,c) => a -> b
but GHC 6.0 bogusly gets
    g :: forall a b.  C a (b,()) => a -> b

A test is in should_compile/tc168
ghc/compiler/typecheck/Inst.lhs
ghc/compiler/typecheck/TcRnDriver.lhs
ghc/compiler/typecheck/TcSimplify.lhs
ghc/compiler/typecheck/TcType.lhs