Fix bad interaction between withDict and the Specialiser
This MR fixes a bad bug, where the withDict was inlined too vigorously, which in turn made the type-class Specialiser generate a bogus specialisation, because it saw the same overloaded function applied to two /different/ dictionaries. Solution: inline `withDict` later. See (WD8) of Note [withDict] in GHC.HsToCore.Expr See #21575, which is fixed by this change.
parent
eccdb208
No related branches found
No related tags found
Pipeline #51974 canceled
Stage: tool-lint
Stage: quick-build
Stage: full-build
Stage: packaging
Stage: testing
Stage: deploy
Showing
- compiler/GHC/Core/Coercion.hs 2 additions, 3 deletionscompiler/GHC/Core/Coercion.hs
- compiler/GHC/Core/TyCon.hs 3 additions, 1 deletioncompiler/GHC/Core/TyCon.hs
- compiler/GHC/HsToCore/Expr.hs 78 additions, 47 deletionscompiler/GHC/HsToCore/Expr.hs
- libraries/base/Unsafe/Coerce.hs 9 additions, 0 deletionslibraries/base/Unsafe/Coerce.hs
- testsuite/tests/simplCore/should_run/T21575.hs 107 additions, 0 deletionstestsuite/tests/simplCore/should_run/T21575.hs
- testsuite/tests/simplCore/should_run/T21575.stdout 1 addition, 0 deletionstestsuite/tests/simplCore/should_run/T21575.stdout
- testsuite/tests/simplCore/should_run/all.T 1 addition, 0 deletionstestsuite/tests/simplCore/should_run/all.T
Loading
-
mentioned in merge request !8241 (closed)
-
mentioned in commit 1eba76f5
Please register or sign in to comment