summaryrefslogtreecommitdiff
path: root/compiler/GHC/IfaceToCore.hs-boot
diff options
context:
space:
mode:
authorCale Gibbard <cgibbard@gmail.com>2021-02-22 15:56:22 -0500
committerMarge Bot <ben+marge-bot@smart-cactus.org>2021-03-04 23:17:00 -0500
commit4cdf8b5ef923e4b860b2d7e61d034817cb81ddbc (patch)
tree46977b11ae67513e46db96b49cf0e30face75963 /compiler/GHC/IfaceToCore.hs-boot
parent1a52c53bb7bc5ef91e251306cf056fcee6a4e15c (diff)
downloadhaskell-4cdf8b5ef923e4b860b2d7e61d034817cb81ddbc.tar.gz
Bring back COMPLETE sets filtered by result TyCon (#14422)
Commit 2a94228 dramatically simplified the implementation and improved the performance of COMPLETE sets while making them applicable in more scenarios at the same time. But it turned out that there was a change in semantics that (to me unexpectedly) broke users' expectations (see #14422): They relied on the "type signature" of a COMPLETE pragma to restrict the scrutinee types of a pattern match for which they are applicable. This patch brings back that filtering, so the semantics is the same as it was in GHC 9.0. See the updated Note [Implementation of COMPLETE pragmas]. There are a few testsuite output changes (`completesig13`, `T14422`) which assert this change. Co-authored-by: Sebastian Graf <sebastian.graf@kit.edu>
Diffstat (limited to 'compiler/GHC/IfaceToCore.hs-boot')
-rw-r--r--compiler/GHC/IfaceToCore.hs-boot2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/GHC/IfaceToCore.hs-boot b/compiler/GHC/IfaceToCore.hs-boot
index c21c4a3acb..97124237c7 100644
--- a/compiler/GHC/IfaceToCore.hs-boot
+++ b/compiler/GHC/IfaceToCore.hs-boot
@@ -8,7 +8,7 @@ import GHC.Tc.Types ( IfL )
import GHC.Core.InstEnv ( ClsInst )
import GHC.Core.FamInstEnv ( FamInst )
import GHC.Core ( CoreRule )
-import GHC.Types.CompleteMatch ( CompleteMatch )
+import GHC.Types.CompleteMatch
import GHC.Types.Annotations ( Annotation )
import GHC.Types.Name
import GHC.Fingerprint.Type