packages feed

hlint 1.8.43 → 1.8.44

raw patch · 2 files changed

+12/−1 lines, 2 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

hlint.cabal view
@@ -1,7 +1,7 @@ cabal-version:      >= 1.6 build-type:         Simple name:               hlint-version:            1.8.43+version:            1.8.44 license:            BSD3 license-file:       LICENSE category:           Development
src/Hint/Structure.hs view
@@ -25,6 +25,11 @@ foo = case v of v -> x -- x foo = case v of z -> z foo = case v of _ | False -> x+foo = case v of !True -> x -- True+foo = case v of !(Just x) -> x -- (Just x)+foo = case v of !(x : xs) -> x -- (x:xs)+foo = case v of !1 -> x -- 1+foo = case v of !x -> x </TEST> -} @@ -101,6 +106,12 @@ -- Or perhaps the entire module should be renamed Pattern, since it's all about patterns patHint :: Pat_ -> [Idea] patHint o@(PApp _ name args) | length args >= 3 && all isPWildCard args = [warn "Use record patterns" o $ PRec an name []]+patHint o@(PBangPat _ x) | f x = [err "Redundant bang pattern" o x]+    where f (PParen _ x) = f x+          f PLit{} = True+          f PApp{} = True+          f PInfixApp{} = True+          f _ = False patHint _ = []