simonpj 2003/06/20 04:14:22 PDT
Modified files:
ghc/compiler/typecheck Inst.lhs TcRnDriver.lhs TcSimplify.lhs
TcType.lhs
Log:
------------------------------
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
Revision Changes Path
1.118 +9 -6 fptools/ghc/compiler/typecheck/Inst.lhs
1.35 +5 -5 fptools/ghc/compiler/typecheck/TcRnDriver.lhs
1.117 +1 -0 fptools/ghc/compiler/typecheck/TcSimplify.lhs
1.91 +1 -7 fptools/ghc/compiler/typecheck/TcType.lhs
|
Try Searching:
servers, voip, java, networking, microsoft ...
|
|
|
|