X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Ftypecheck%2FTcSimplify.lhs;h=5fc6a5bc749a7b2de65b2898bf628f3b77b85902;hb=b24792b081f7f74cf52c0c3178cb71fccfc1fcb3;hp=197d6820b091ebe933aa9446385addf73d700ecd;hpb=27310213397bb89555bb03585e057ba1b017e895;p=ghc-hetmet.git diff --git a/compiler/typecheck/TcSimplify.lhs b/compiler/typecheck/TcSimplify.lhs index 197d682..5fc6a5b 100644 --- a/compiler/typecheck/TcSimplify.lhs +++ b/compiler/typecheck/TcSimplify.lhs @@ -523,7 +523,7 @@ simplifyRule name tv_bndrs lhs_wanted rhs_wanted ; (lhs_results, lhs_binds) <- runTcS SimplRuleLhs untch $ - solveWanteds emptyInert lhs_wanted + solveWanteds emptyInert zonked_lhs ; traceTc "simplifyRule" $ vcat [ text "zonked_lhs" <+> ppr zonked_lhs @@ -642,6 +642,11 @@ solve_wanteds inert wanted@(WC { wc_flat = flats, wc_impl = implics, wc_insol = = do { traceTcS "solveWanteds {" (ppr wanted) -- Try the flat bit + -- Discard from insols all the derived/given constraints + -- because they will show up again when we try to solve + -- everything else. Solving them a second time is a bit + -- of a waste, but the code is simple, and the program is + -- wrong anyway! ; let all_flats = flats `unionBags` keepWanted insols ; inert1 <- solveInteractWanted inert (bagToList all_flats)