diff options
author | Simon Peyton Jones <simonpj@microsoft.com> | 2015-01-14 10:55:17 +0000 |
---|---|---|
committer | Simon Peyton Jones <simonpj@microsoft.com> | 2015-01-14 16:08:55 +0000 |
commit | e4cb8370eb910f187a536c208fba15dcf331c910 (patch) | |
tree | f265a4fd304021e4ecc1d93549421dc78cf231e2 | |
parent | 6b0cf0e07605d2cde9b4e13b40f52628b6fe64ec (diff) | |
download | haskell-e4cb8370eb910f187a536c208fba15dcf331c910.tar.gz |
Tiny refactoring (shorter, simpler code)
-rw-r--r-- | compiler/typecheck/TcSimplify.hs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/compiler/typecheck/TcSimplify.hs b/compiler/typecheck/TcSimplify.hs index a29e1dc3eb..773a5e6a12 100644 --- a/compiler/typecheck/TcSimplify.hs +++ b/compiler/typecheck/TcSimplify.hs @@ -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, |