[commit: ghc] master: Tiny refactoring (shorter, simpler code) (e4cb837)

git at git.haskell.org git at git.haskell.org
Wed Jan 14 16:08:42 UTC 2015


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/e4cb8370eb910f187a536c208fba15dcf331c910/ghc

>---------------------------------------------------------------

commit e4cb8370eb910f187a536c208fba15dcf331c910
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date:   Wed Jan 14 10:55:17 2015 +0000

    Tiny refactoring (shorter, simpler code)


>---------------------------------------------------------------

e4cb8370eb910f187a536c208fba15dcf331c910
 compiler/typecheck/TcSimplify.hs | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/compiler/typecheck/TcSimplify.hs b/compiler/typecheck/TcSimplify.hs
index a29e1dc..773a5e6 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,



More information about the ghc-commits mailing list