diff options
author | Sebastian Graf <sebastian.graf@kit.edu> | 2020-09-01 19:00:37 +0200 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2020-09-12 00:32:13 -0400 |
commit | 2a9422859e0c079aaa38bb9a760034f887501fce (patch) | |
tree | 571a816809930cf86fb302cd524fc050e9f045cc /compiler/GHC/IfaceToCore.hs-boot | |
parent | fb6e29e8d19deaf7581fdef14adc88a02573c83e (diff) | |
download | haskell-2a9422859e0c079aaa38bb9a760034f887501fce.tar.gz |
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
Diffstat (limited to 'compiler/GHC/IfaceToCore.hs-boot')
-rw-r--r-- | compiler/GHC/IfaceToCore.hs-boot | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/compiler/GHC/IfaceToCore.hs-boot b/compiler/GHC/IfaceToCore.hs-boot index 91b538ef41..349c629835 100644 --- a/compiler/GHC/IfaceToCore.hs-boot +++ b/compiler/GHC/IfaceToCore.hs-boot @@ -11,9 +11,9 @@ import GHC.Core ( CoreRule ) import GHC.Driver.Types ( CompleteMatch ) import GHC.Types.Annotations ( Annotation ) -tcIfaceDecl :: Bool -> IfaceDecl -> IfL TyThing -tcIfaceRules :: Bool -> [IfaceRule] -> IfL [CoreRule] -tcIfaceInst :: IfaceClsInst -> IfL ClsInst -tcIfaceFamInst :: IfaceFamInst -> IfL FamInst -tcIfaceAnnotations :: [IfaceAnnotation] -> IfL [Annotation] -tcIfaceCompleteSigs :: [IfaceCompleteMatch] -> IfL [CompleteMatch] +tcIfaceDecl :: Bool -> IfaceDecl -> IfL TyThing +tcIfaceRules :: Bool -> [IfaceRule] -> IfL [CoreRule] +tcIfaceInst :: IfaceClsInst -> IfL ClsInst +tcIfaceFamInst :: IfaceFamInst -> IfL FamInst +tcIfaceAnnotations :: [IfaceAnnotation] -> IfL [Annotation] +tcIfaceCompleteMatches :: [IfaceCompleteMatch] -> IfL [CompleteMatch] |