Commit b659c52b authored by Alexis Williams's avatar Alexis Williams

Remove more dangling bits of the bad warning code

parent fdae5381
......@@ -926,7 +926,6 @@ data WarningFlag =
| Opt_WarnInferredSafeImports -- Since 8.10
| Opt_WarnMissingSafeHaskellMode -- Since 8.10
| Opt_WarnDerivingDefaults
| Opt_WarnAffineRules
deriving (Eq, Show, Enum)
data Language = Haskell98 | Haskell2010
......@@ -4047,7 +4046,6 @@ wWarningFlagsDeps = [
-- See Note [Updating flag description in the User's Guide]
-- See Note [Supporting CLI completion]
-- Please keep the list of flags below sorted alphabetically
flagSpec "affine-rules" Opt_WarnAffineRules,
flagSpec "alternative-layout-rule-transitional"
Opt_WarnAlternativeLayoutRuleTransitional,
depFlagSpec "auto-orphans" Opt_WarnAutoOrphans
......@@ -4881,8 +4879,7 @@ standardWarnings -- see Note [Documenting warning flags]
Opt_WarnSimplifiableClassConstraints,
Opt_WarnStarBinder,
Opt_WarnInaccessibleCode,
Opt_WarnSpaceAfterBang,
Opt_WarnAffineRules
Opt_WarnSpaceAfterBang
]
-- | Things you get with -W
......
......@@ -2042,7 +2042,6 @@ tryRules env rules fn args call_cont
| otherwise
= do -- No rule fires
nodump
printOrThrowWarnings ws
return Nothing
where
dflags = seDynFlags env
......
......@@ -51,20 +51,19 @@ import IdInfo ( RuleInfo( RuleInfo ) )
import Var
import VarEnv
import VarSet
import Name ( Name, NamedThing(..), nameIsLocalOrFrom, getSrcSpan )
import Name ( Name, NamedThing(..), nameIsLocalOrFrom )
import NameSet
import NameEnv
import UniqFM
import Unify ( ruleMatchTyKiX )
import BasicTypes
import DynFlags ( DynFlags, WarnReason ( Reason ), WarningFlag ( Opt_WarnAffineRules ) )
import DynFlags ( DynFlags )
import Outputable
import FastString
import Maybes
import Bag
import Util
import Demand
import ErrUtils
import Data.List
import Data.Ord
import Control.Monad ( guard )
......@@ -513,7 +512,7 @@ matchRule dflags rule_env _is_active fn args _rough_args
Nothing -> Left []
Just expr -> Right expr
matchRule dflags in_scope is_active fn args rough_args
matchRule _ in_scope is_active _ args rough_args
(Rule { ru_name = rule_name, ru_act = act, ru_rough = tpl_tops
, ru_bndrs = tpl_vars, ru_args = tpl_args, ru_rhs = rhs
, ru_auto = rule_auto })
......@@ -1240,7 +1239,7 @@ ruleAppCheck_help env fn args rules
rule_info dflags rule
| Right _ <- match
= text "matches (which is very peculiar!)"
| Left nonAff <- match
| Left nonAff@(_:_) <- match
= text "has non-affine arguments" <+> pprQuotedList nonAff
where
match = matchRule dflags (emptyInScopeSet, rc_id_unf env)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment