[Git][ghc/ghc][wip/issue-23821] 2 commits: ci: Remove manually triggered test-ci job

Matthew Pickering (@mpickering) gitlab at gitlab.haskell.org
Tue Aug 22 10:00:35 UTC 2023



Matthew Pickering pushed to branch wip/issue-23821 at Glasgow Haskell Compiler / GHC


Commits:
7be4a272 by Matthew Pickering at 2023-08-22T08:55:20+01:00
ci: Remove manually triggered test-ci job

This doesn't work on slimmed down pipelines as the needed jobs don't
exist.

If you want to run test-primops then apply the label.

- - - - -
3ad6660e by Gergő Érdi at 2023-08-22T10:00:32+00:00
If we have multiple defaulting plugins, then we should zonk in between them

after any defaulting has taken place, to avoid a defaulting plugin seeing
a metavariable that has already been filled.

Fixes #23821.

- - - - -


2 changed files:

- .gitlab-ci.yml
- compiler/GHC/Tc/Solver.hs


Changes:

=====================================
.gitlab-ci.yml
=====================================
@@ -848,10 +848,6 @@ release-hackage-lint:
       artifacts: false
   extends: .test-primops
 
-test-primops-validate:
-  extends: .test-primops-validate-template
-  when: manual
-
 test-primops-label:
   extends: .test-primops-validate-template
   rules:


=====================================
compiler/GHC/Tc/Solver.hs
=====================================
@@ -3590,20 +3590,14 @@ applyDefaultingRules wanteds
        ; tcg_env <- TcS.getGblEnv
        ; let plugins = tcg_defaulting_plugins tcg_env
 
-       ; plugin_defaulted <- if null plugins then return [] else
+       ; (wanteds, plugin_defaulted) <- if null plugins then return (wanteds, []) else
            do {
              ; traceTcS "defaultingPlugins {" (ppr wanteds)
-             ; defaultedGroups <- mapM (run_defaulting_plugin wanteds) plugins
+             ; (wanteds, defaultedGroups) <- mapAccumLM run_defaulting_plugin wanteds plugins
              ; traceTcS "defaultingPlugins }" (ppr defaultedGroups)
-             ; return defaultedGroups
+             ; return (wanteds, defaultedGroups)
              }
 
-       -- If a defaulting plugin solves a tyvar, some of the wanteds
-       -- will have filled-in metavars by now (see #23281). So we
-       -- re-zonk to make sure the built-in defaulting rules don't try
-       -- to solve the same metavars.
-       ; wanteds <- if or plugin_defaulted then TcS.zonkWC wanteds else pure wanteds
-
        ; let groups = findDefaultableGroups info wanteds
 
        ; traceTcS "applyDefaultingRules {" $
@@ -3625,8 +3619,14 @@ applyDefaultingRules wanteds
                     groups
                ; traceTcS "defaultingPlugin " $ ppr defaultedGroups
                ; case defaultedGroups of
-                 [] -> return False
-                 _  -> return True
+                 [] -> return (wanteds, False)
+                 _  -> do
+                     -- If a defaulting plugin solves any tyvars, some of the wanteds
+                     -- will have filled-in metavars by now (see #23281). So we
+                     -- re-zonk to make sure later defaulting doesn't try to solve
+                     -- the same metavars.
+                     wanteds' <- TcS.zonkWC wanteds
+                     return (wanteds', True)
                }
 
 



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/9b4fe2a39952b0a463bcf67f1b357b8364f6725e...3ad6660ed4da90977486cdae4ba3200e9ec0296f

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/9b4fe2a39952b0a463bcf67f1b357b8364f6725e...3ad6660ed4da90977486cdae4ba3200e9ec0296f
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/20230822/d3edb004/attachment-0001.html>


More information about the ghc-commits mailing list