Tiny refactoring (shorter, simpler code)
authorSimon Peyton Jones <simonpj@microsoft.com>
Wed, 14 Jan 2015 10:55:17 +0000 (10:55 +0000)
committerSimon Peyton Jones <simonpj@microsoft.com>
Wed, 14 Jan 2015 16:08:55 +0000 (16:08 +0000)
compiler/typecheck/TcSimplify.hs

index a29e1dc..773a5e6 100644 (file)
@@ -688,10 +688,9 @@ solveWantedsTcM :: WantedConstraints -> TcM (WantedConstraints, Bag EvBind)
 -- Discards all Derived stuff in result
 -- Postcondition: fully zonked and unflattened constraints
 solveWantedsTcM wanted
-  = do { ev_binds_var <- TcM.newTcEvBinds
-       ; wanteds' <- solveWantedsTcMWithEvBinds ev_binds_var wanted solveWantedsAndDrop
-       ; binds <- TcRnMonad.getTcEvBinds ev_binds_var
-       ; return (wanteds', binds) }
+  = do { (wanted1, binds) <- runTcS (solveWantedsAndDrop wanted)
+       ; wanted2 <- zonkWC wanted1
+       ; return (wanted2, binds) }
 
 solveWantedsAndDrop :: WantedConstraints -> TcS (WantedConstraints)
 -- Since solveWanteds returns the residual WantedConstraints,