White space only
authorsimonpj@microsoft.com <unknown>
Thu, 13 Jan 2011 09:39:31 +0000 (09:39 +0000)
committersimonpj@microsoft.com <unknown>
Thu, 13 Jan 2011 09:39:31 +0000 (09:39 +0000)
compiler/typecheck/TcRnTypes.lhs
compiler/typecheck/TcSimplify.lhs

index fc781df..dc7bf5e 100644 (file)
@@ -792,7 +792,7 @@ data Implication
                                  --   which is also the location of all the
                                  --   given evidence variables
 
-      ic_wanted  :: WantedConstraints, -- The wanted
+      ic_wanted :: WantedConstraints,  -- The wanted
       ic_insol  :: Bool,               -- True iff insolubleWC ic_wantted is true
 
       ic_binds  :: EvBindsVar   -- Points to the place to fill in the
index 197d682..e25f510 100644 (file)
@@ -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)