diff options
author | Simon Peyton Jones <simonpj@microsoft.com> | 2015-08-05 13:37:18 +0100 |
---|---|---|
committer | Simon Peyton Jones <simonpj@microsoft.com> | 2015-08-05 14:25:24 +0100 |
commit | a4261549afaee56b00fbea1b4bc1a07c95e60929 (patch) | |
tree | 37623ab8542a364e0e680ccf8afd9d2f7fdd4458 /compiler/main/DynFlags.hs | |
parent | 617f6966b5aaedd3ecd3f4c0f3735253187b7ff5 (diff) | |
download | haskell-a4261549afaee56b00fbea1b4bc1a07c95e60929.tar.gz |
Warn about missed specialisations for imports
This change was provoked by Trac #10720, where a missing
INLINEABLE pragma gave very poor performance.
The change is to warn when an imported function is not specialised
in a situation where the user expects it to be.
New flags
-fwarn-missed-specialisations
-fwarn-all-missed-specialisations
Documented in user manual.
See Note [Warning about missed specialisations]
Diffstat (limited to 'compiler/main/DynFlags.hs')
-rw-r--r-- | compiler/main/DynFlags.hs | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/compiler/main/DynFlags.hs b/compiler/main/DynFlags.hs index effe80354b..29200c5130 100644 --- a/compiler/main/DynFlags.hs +++ b/compiler/main/DynFlags.hs @@ -524,7 +524,8 @@ data WarningFlag = | Opt_WarnUnsafe | Opt_WarnSafe | Opt_WarnTrustworthySafe - | Opt_WarnPointlessPragmas + | Opt_WarnMissedSpecs + | Opt_WarnAllMissedSpecs | Opt_WarnUnsupportedCallingConventions | Opt_WarnUnsupportedLlvmVersion | Opt_WarnInlineRuleShadowing @@ -2907,7 +2908,8 @@ fWarningFlags = [ flagSpec "warn-orphans" Opt_WarnOrphans, flagSpec "warn-overflowed-literals" Opt_WarnOverflowedLiterals, flagSpec "warn-overlapping-patterns" Opt_WarnOverlappingPatterns, - flagSpec "warn-pointless-pragmas" Opt_WarnPointlessPragmas, + flagSpec "warn-missed-specialisations" Opt_WarnMissedSpecs, + flagSpec "warn-all-missed-specialisations" Opt_WarnAllMissedSpecs, flagSpec' "warn-safe" Opt_WarnSafe setWarnSafe, flagSpec "warn-trustworthy-safe" Opt_WarnTrustworthySafe, flagSpec "warn-tabs" Opt_WarnTabs, @@ -3389,7 +3391,6 @@ standardWarnings -- see Note [Documenting warning flags] Opt_WarnTypedHoles, Opt_WarnPartialTypeSignatures, Opt_WarnUnrecognisedPragmas, - Opt_WarnPointlessPragmas, Opt_WarnRedundantConstraints, Opt_WarnDuplicateExports, Opt_WarnOverflowedLiterals, @@ -3403,7 +3404,8 @@ standardWarnings -- see Note [Documenting warning flags] Opt_WarnAlternativeLayoutRuleTransitional, Opt_WarnUnsupportedLlvmVersion, Opt_WarnContextQuantification, - Opt_WarnTabs + Opt_WarnTabs, + Opt_WarnMissedSpecs ] minusWOpts :: [WarningFlag] @@ -3431,7 +3433,8 @@ minusWallOpts Opt_WarnOrphans, Opt_WarnUnusedDoBind, Opt_WarnTrustworthySafe, - Opt_WarnUntickedPromotedConstructors + Opt_WarnUntickedPromotedConstructors, + Opt_WarnAllMissedSpecs ] enableUnusedBinds :: DynP () |