diff options
author | simonpj@microsoft.com <unknown> | 2009-03-03 11:15:13 +0000 |
---|---|---|
committer | simonpj@microsoft.com <unknown> | 2009-03-03 11:15:13 +0000 |
commit | 6d38e24ea3da7ca9b435e9b1e59b2de8fcd91da4 (patch) | |
tree | 1daf340188584b599dbbf2c6d3a463be991c363e | |
parent | 1b9618c37bb254e1d16aa286ceedc9a81f41e871 (diff) | |
download | haskell-6d38e24ea3da7ca9b435e9b1e59b2de8fcd91da4.tar.gz |
Comments only
-rw-r--r-- | compiler/typecheck/TcSimplify.lhs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/compiler/typecheck/TcSimplify.lhs b/compiler/typecheck/TcSimplify.lhs index 0e1e5b0077..4cf93e83da 100644 --- a/compiler/typecheck/TcSimplify.lhs +++ b/compiler/typecheck/TcSimplify.lhs @@ -710,6 +710,12 @@ tcSimplifyInfer doc tau_tvs wanted -- irreds2 will be empty. But we don't want to generalise over b! ; let preds2 = fdPredsOfInsts irreds2 -- irreds2 is zonked qtvs = growInstsTyVars irreds2 tau_tvs2 `minusVarSet` oclose preds2 gbl_tvs2 + --------------------------------------------------- + -- BUG WARNING: there's a nasty bug lurking here + -- fdPredsOfInsts may return preds that mention variables quantified in + -- one of the implication constraints in irreds2; and that is clearly wrong: + -- we might quantify over too many variables through accidental capture + --------------------------------------------------- ; let (free, irreds3) = partition (isFreeWhenInferring qtvs) irreds2 ; extendLIEs free |