PmCheck: Disattach COMPLETE pragma lookup from TyCons
By not attaching COMPLETE pragmas with a particular TyCon and instead assume that every COMPLETE pragma is applicable everywhere, we can drastically simplify the logic that tries to initialise available COMPLETE sets of a variable during the pattern-match checking process, as well as fixing a few bugs. Of course, we have to make sure not to report any of the ill-typed/unrelated COMPLETE sets, which came up in a few regression tests. In doing so, we fix #17207, #18277 and #14422. There was a metric decrease in #18478 by ~20%. Metric Decrease: T18478
parent
fb6e29e8
Pipeline #24569 passed with warnings
Stage: lint
Stage: quick-build
Stage: build
Stage: full-build
Stage: cleanup
Stage: packaging
Stage: testing
Stage: deploy
Showing
- compiler/GHC/Driver/Types.hs 20 additions, 90 deletionscompiler/GHC/Driver/Types.hs
- compiler/GHC/HsToCore.hs 1 addition, 1 deletioncompiler/GHC/HsToCore.hs
- compiler/GHC/HsToCore/Monad.hs 13 additions, 20 deletionscompiler/GHC/HsToCore/Monad.hs
- compiler/GHC/HsToCore/PmCheck/Oracle.hs 170 additions, 124 deletionscompiler/GHC/HsToCore/PmCheck/Oracle.hs
- compiler/GHC/HsToCore/PmCheck/Types.hs 30 additions, 19 deletionscompiler/GHC/HsToCore/PmCheck/Types.hs
- compiler/GHC/Iface/Load.hs 6 additions, 9 deletionscompiler/GHC/Iface/Load.hs
- compiler/GHC/Iface/Make.hs 7 additions, 5 deletionscompiler/GHC/Iface/Make.hs
- compiler/GHC/Iface/Syntax.hs 6 additions, 6 deletionscompiler/GHC/Iface/Syntax.hs
- compiler/GHC/Iface/Tidy.hs 31 additions, 31 deletionscompiler/GHC/Iface/Tidy.hs
- compiler/GHC/IfaceToCore.hs 22 additions, 12 deletionscompiler/GHC/IfaceToCore.hs
- compiler/GHC/IfaceToCore.hs-boot 6 additions, 6 deletionscompiler/GHC/IfaceToCore.hs-boot
- compiler/GHC/Tc/Gen/Bind.hs 10 additions, 101 deletionscompiler/GHC/Tc/Gen/Bind.hs
- compiler/GHC/Tc/Types.hs 4 additions, 5 deletionscompiler/GHC/Tc/Types.hs
- compiler/GHC/Tc/Utils/Env.hs 2 additions, 2 deletionscompiler/GHC/Tc/Utils/Env.hs
- docs/users_guide/exts/pragmas.rst 0 additions, 23 deletionsdocs/users_guide/exts/pragmas.rst
- testsuite/tests/pmcheck/complete_sigs/T14422.hs 3 additions, 0 deletionstestsuite/tests/pmcheck/complete_sigs/T14422.hs
- testsuite/tests/pmcheck/complete_sigs/T18277.hs 13 additions, 0 deletionstestsuite/tests/pmcheck/complete_sigs/T18277.hs
- testsuite/tests/pmcheck/complete_sigs/all.T 3 additions, 2 deletionstestsuite/tests/pmcheck/complete_sigs/all.T
- testsuite/tests/pmcheck/complete_sigs/completesig04.hs 9 additions, 3 deletionstestsuite/tests/pmcheck/complete_sigs/completesig04.hs
- testsuite/tests/pmcheck/complete_sigs/completesig04.stderr 10 additions, 3 deletionstestsuite/tests/pmcheck/complete_sigs/completesig04.stderr
Loading
-
mentioned in merge request !3959 (closed)
-
mentioned in commit 4e28f467
-
mentioned in merge request !5156 (closed)
-
mentioned in commit ac99231f
-
mentioned in commit c9e6e40b
-
mentioned in commit 3b8f06b5
-
mentioned in commit 9c81eff6
-
mentioned in commit 72c4448c
-
mentioned in commit 9a77bdbc
-
mentioned in commit cbc6e313
-
mentioned in commit ad6e549c
-
mentioned in commit 00206b92
-
mentioned in commit 4cdf8b5e
Please register or sign in to comment