[Git][ghc/ghc][wip/T25266] Wibbles to short cuts
Simon Peyton Jones (@simonpj)
gitlab at gitlab.haskell.org
Thu Oct 3 13:55:31 UTC 2024
Simon Peyton Jones pushed to branch wip/T25266 at Glasgow Haskell Compiler / GHC
Commits:
5f60c70e by Simon Peyton Jones at 2024-10-03T14:55:09+01:00
Wibbles to short cuts
- - - - -
1 changed file:
- compiler/GHC/Tc/Solver/Solve.hs
Changes:
=====================================
compiler/GHC/Tc/Solver/Solve.hs
=====================================
@@ -73,9 +73,6 @@ simplifyWantedsTcM wanted
solveWanteds :: WantedConstraints -> TcS WantedConstraints
solveWanteds wc@(WC { wc_errors = errs })
- | isEmptyWC wc -- Fast path
- = return wc
- | otherwise
= do { cur_lvl <- TcS.getTcLevel
; traceTcS "solveWanteds {" $
vcat [ text "Level =" <+> ppr cur_lvl
@@ -106,6 +103,9 @@ simplify_loop :: Int -> IntWithInf -> Bool
-- else, so we do them once, at the end in solveWanteds
simplify_loop n limit definitely_redo_implications
wc@(WC { wc_simple = simples, wc_impl = implics })
+ | isSolvedWC wc -- Fast path
+ = return wc
+ | otherwise
= do { csTraceTcS $
text "simplify_loop iteration=" <> int n
<+> (parens $ hsep [ text "definitely_redo =" <+> ppr definitely_redo_implications <> comma
@@ -145,7 +145,7 @@ maybe_simplify_again n limit unif_happened wc@(WC { wc_simple = simples })
| unif_happened
= simplify_loop n limit True wc
- | superClassesMightHelp wc
+ | superClassesMightHelp wc -- Returns False quickly if wc is solved
= -- We still have unsolved goals, and apparently no way to solve them,
-- so try expanding superclasses at this level, both Given and Wanted
do { pending_given <- getPendingGivenScs
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/5f60c70edc5d7286f4f6730a019ba02d4e14d9f7
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/5f60c70edc5d7286f4f6730a019ba02d4e14d9f7
You're receiving this email because of your account on gitlab.haskell.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20241003/4ec2bf96/attachment-0001.html>
More information about the ghc-commits
mailing list