diff options
author | Cale Gibbard <cgibbard@gmail.com> | 2021-02-22 15:56:22 -0500 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2021-03-04 23:17:00 -0500 |
commit | 4cdf8b5ef923e4b860b2d7e61d034817cb81ddbc (patch) | |
tree | 46977b11ae67513e46db96b49cf0e30face75963 /compiler/GHC/IfaceToCore.hs-boot | |
parent | 1a52c53bb7bc5ef91e251306cf056fcee6a4e15c (diff) | |
download | haskell-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-boot | 2 |
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 |