diff options
| author | sheaf <sam.derbyshire@gmail.com> | 2022-05-12 18:32:18 +0000 |
|---|---|---|
| committer | Pavol Vargovcik <pavol.vargovcik@gmail.com> | 2022-05-13 06:17:52 +0200 |
| commit | e21804e3b13e697e2983ec3e65ac118c8dfacdc5 (patch) | |
| tree | 05aeeaa9531f119118e9f5a90afea7fd4df10426 | |
| parent | c1e86eb18acdc1608756fe90296ae6d45be88020 (diff) | |
| download | haskell-e21804e3b13e697e2983ec3e65ac118c8dfacdc5.tar.gz | |
runTcPluginSolvers: call getTcEvBindsVar only once - before loop
| -rw-r--r-- | compiler/GHC/Tc/Solver/Interact.hs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler/GHC/Tc/Solver/Interact.hs b/compiler/GHC/Tc/Solver/Interact.hs index ae59935153..f45d6f1320 100644 --- a/compiler/GHC/Tc/Solver/Interact.hs +++ b/compiler/GHC/Tc/Solver/Interact.hs @@ -268,11 +268,11 @@ getTcPluginSolvers -- the plugin itself should perform this check if necessary. runTcPluginSolvers :: [TcPluginSolver] -> SplitCts -> TcS TcPluginProgress runTcPluginSolvers solvers all_cts - = foldM do_plugin initialProgress solvers + = do { ev_binds_var <- getTcEvBindsVar + ; foldM (do_plugin ev_binds_var) initialProgress solvers } where - do_plugin :: TcPluginProgress -> TcPluginSolver -> TcS TcPluginProgress - do_plugin p solver = do - ev_binds_var <- getTcEvBindsVar + do_plugin :: EvBindsVar -> TcPluginProgress -> TcPluginSolver -> TcS TcPluginProgress + do_plugin ev_binds_var p solver = do result <- runTcPluginTcS (uncurry (solver ev_binds_var) (pluginInputCts p)) return $ progress p result |
